blob: cb01b74ce0815554d9d5cf6028810afcccf972ef [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
Christian Heimes985ecdc2013-11-20 11:46:18 +0100795with_hash_algorithm
Matthias Kloseb9621712010-04-24 17:59:49 +0000796with_libs
797with_system_expat
798with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100799with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000800enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700801with_tcltk_includes
802with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000803with_dbmliborder
804with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000805with_threads
806with_thread
807enable_ipv6
808with_doc_strings
809with_tsc
810with_pymalloc
811with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_fpectl
813with_libm
814with_libc
815enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_computed_gotos
817'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000818 ac_precious_vars='build_alias
819host_alias
820target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100821MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822CC
823CFLAGS
824LDFLAGS
825LIBS
826CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200827CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828
Guido van Rossum627b2d71993-12-24 10:39:16 +0000829
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000831ac_init_help=
832ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000833ac_unrecognized_opts=
834ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835# The variables have the same names as the options, with
836# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000837cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840no_recursion=
841prefix=NONE
842program_prefix=NONE
843program_suffix=NONE
844program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849x_includes=NONE
850x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000851
852# Installation directory options.
853# These are left unexpanded so users can "make install exec_prefix=/foo"
854# and all the variables that are supposed to be based on exec_prefix
855# by default will actually change.
856# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858bindir='${exec_prefix}/bin'
859sbindir='${exec_prefix}/sbin'
860libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861datarootdir='${prefix}/share'
862datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863sysconfdir='${prefix}/etc'
864sharedstatedir='${prefix}/com'
865localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866includedir='${prefix}/include'
867oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
869infodir='${datarootdir}/info'
870htmldir='${docdir}'
871dvidir='${docdir}'
872pdfdir='${docdir}'
873psdir='${docdir}'
874libdir='${exec_prefix}/lib'
875localedir='${datarootdir}/locale'
876mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000881do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882 # If the previous option needs an argument, assign it.
883 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885 ac_prev=
886 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000887 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200890 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
891 *=) ac_optarg= ;;
892 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895 # Accept the important Cygnus configure options, so we can diagnose typos.
896
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897 case $ac_dashdash$ac_option in
898 --)
899 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901 -bindir | --bindir | --bindi | --bind | --bin | --bi)
902 ac_prev=bindir ;;
903 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905
906 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000909 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911 -cache-file | --cache-file | --cache-fil | --cache-fi \
912 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
913 ac_prev=cache_file ;;
914 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
915 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 cache_file=$ac_optarg ;;
917
918 --config-cache | -C)
919 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
927 | --dataroo | --dataro | --datar)
928 ac_prev=datarootdir ;;
929 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
930 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
931 datarootdir=$ac_optarg ;;
932
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000934 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000936 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200937 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000938 ac_useropt_orig=$ac_useropt
939 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
940 case $ac_user_opts in
941 *"
942"enable_$ac_useropt"
943"*) ;;
944 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
945 ac_unrecognized_sep=', ';;
946 esac
947 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948
949 -docdir | --docdir | --docdi | --doc | --do)
950 ac_prev=docdir ;;
951 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
952 docdir=$ac_optarg ;;
953
954 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
955 ac_prev=dvidir ;;
956 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
957 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
959 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200963 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 ac_useropt_orig=$ac_useropt
965 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
966 case $ac_user_opts in
967 *"
968"enable_$ac_useropt"
969"*) ;;
970 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
971 ac_unrecognized_sep=', ';;
972 esac
973 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
976 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
977 | --exec | --exe | --ex)
978 ac_prev=exec_prefix ;;
979 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
980 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
981 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
984 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Obsolete; use --with-gas.
986 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 -help | --help | --hel | --he | -h)
989 ac_init_help=long ;;
990 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
991 ac_init_help=recursive ;;
992 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
993 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000996 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001000 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1001 ac_prev=htmldir ;;
1002 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1003 | --ht=*)
1004 htmldir=$ac_optarg ;;
1005
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006 -includedir | --includedir | --includedi | --included | --include \
1007 | --includ | --inclu | --incl | --inc)
1008 ac_prev=includedir ;;
1009 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1010 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
1013 -infodir | --infodir | --infodi | --infod | --info | --inf)
1014 ac_prev=infodir ;;
1015 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
1018 -libdir | --libdir | --libdi | --libd)
1019 ac_prev=libdir ;;
1020 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
1023 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1024 | --libexe | --libex | --libe)
1025 ac_prev=libexecdir ;;
1026 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1027 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001030 -localedir | --localedir | --localedi | --localed | --locale)
1031 ac_prev=localedir ;;
1032 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1033 localedir=$ac_optarg ;;
1034
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001036 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 ac_prev=localstatedir ;;
1038 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001039 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1043 ac_prev=mandir ;;
1044 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048 # Obsolete; use --without-fp.
1049 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
1051 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 no_create=yes ;;
1054
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001055 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1056 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1057 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1060 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1061 | --oldin | --oldi | --old | --ol | --o)
1062 ac_prev=oldincludedir ;;
1063 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1064 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1065 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1069 ac_prev=prefix ;;
1070 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1074 | --program-pre | --program-pr | --program-p)
1075 ac_prev=program_prefix ;;
1076 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1077 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1081 | --program-suf | --program-su | --program-s)
1082 ac_prev=program_suffix ;;
1083 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1084 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -program-transform-name | --program-transform-name \
1088 | --program-transform-nam | --program-transform-na \
1089 | --program-transform-n | --program-transform- \
1090 | --program-transform | --program-transfor \
1091 | --program-transfo | --program-transf \
1092 | --program-trans | --program-tran \
1093 | --progr-tra | --program-tr | --program-t)
1094 ac_prev=program_transform_name ;;
1095 -program-transform-name=* | --program-transform-name=* \
1096 | --program-transform-nam=* | --program-transform-na=* \
1097 | --program-transform-n=* | --program-transform-=* \
1098 | --program-transform=* | --program-transfor=* \
1099 | --program-transfo=* | --program-transf=* \
1100 | --program-trans=* | --program-tran=* \
1101 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001104 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1105 ac_prev=pdfdir ;;
1106 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1107 pdfdir=$ac_optarg ;;
1108
1109 -psdir | --psdir | --psdi | --psd | --ps)
1110 ac_prev=psdir ;;
1111 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1112 psdir=$ac_optarg ;;
1113
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1115 | -silent | --silent | --silen | --sile | --sil)
1116 silent=yes ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1119 ac_prev=sbindir ;;
1120 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1121 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001123
1124 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1125 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1126 | --sharedst | --shareds | --shared | --share | --shar \
1127 | --sha | --sh)
1128 ac_prev=sharedstatedir ;;
1129 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1130 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1131 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1132 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 -site | --site | --sit)
1136 ac_prev=site ;;
1137 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1141 ac_prev=srcdir ;;
1142 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1146 | --syscon | --sysco | --sysc | --sys | --sy)
1147 ac_prev=sysconfdir ;;
1148 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1149 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
1157 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1158 verbose=yes ;;
1159
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 -version | --version | --versio | --versi | --vers | -V)
1161 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162
1163 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001164 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001167 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 ac_useropt_orig=$ac_useropt
1169 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1170 case $ac_user_opts in
1171 *"
1172"with_$ac_useropt"
1173"*) ;;
1174 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1175 ac_unrecognized_sep=', ';;
1176 esac
1177 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
1179 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001180 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001182 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001183 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 ac_useropt_orig=$ac_useropt
1185 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1186 case $ac_user_opts in
1187 *"
1188"with_$ac_useropt"
1189"*) ;;
1190 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1191 ac_unrecognized_sep=', ';;
1192 esac
1193 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195 --x)
1196 # Obsolete; use --with-x.
1197 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1200 | --x-incl | --x-inc | --x-in | --x-i)
1201 ac_prev=x_includes ;;
1202 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1203 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
1206 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1207 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1208 ac_prev=x_libraries ;;
1209 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1210 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001213 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1214Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215 ;;
1216
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 *=*)
1218 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1219 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 case $ac_envvar in #(
1221 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001222 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 export $ac_envvar ;;
1226
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001227 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001229 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001231 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001232 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233 ;;
1234
1235 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236done
1237
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001240 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241fi
1242
Matthias Kloseb9621712010-04-24 17:59:49 +00001243if test -n "$ac_unrecognized_opts"; then
1244 case $enable_option_checking in
1245 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001247 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1248 esac
1249fi
1250
1251# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1253 datadir sysconfdir sharedstatedir localstatedir includedir \
1254 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1255 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001256do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 # Remove trailing slashes.
1259 case $ac_val in
1260 */ )
1261 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1262 eval $ac_var=\$ac_val;;
1263 esac
1264 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 [\\/$]* | ?:[\\/]* ) continue;;
1267 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001269 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001270done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272# There might be people who depend on the old broken behavior: `$host'
1273# used to hold the argument of --host etc.
1274# FIXME: To remove some day.
1275build=$build_alias
1276host=$host_alias
1277target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278
Martin v. Löwis11437992002-04-12 09:54:03 +00001279# FIXME: To remove some day.
1280if test "x$host_alias" != x; then
1281 if test "x$build_alias" = x; then
1282 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001283 elif test "x$build_alias" != "x$host_alias"; then
1284 cross_compiling=yes
1285 fi
1286fi
1287
1288ac_tool_prefix=
1289test -n "$host_alias" && ac_tool_prefix=$host_alias-
1290
1291test "$silent" = yes && exec 6>/dev/null
1292
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294ac_pwd=`pwd` && test -n "$ac_pwd" &&
1295ac_ls_di=`ls -di .` &&
1296ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001297 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001299 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300
1301
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302# Find the source files, if location was not specified.
1303if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001306 ac_confdir=`$as_dirname -- "$as_myself" ||
1307$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1308 X"$as_myself" : 'X\(//\)[^/]' \| \
1309 X"$as_myself" : 'X\(//\)$' \| \
1310 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1311$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001312 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1313 s//\1/
1314 q
1315 }
1316 /^X\(\/\/\)[^/].*/{
1317 s//\1/
1318 q
1319 }
1320 /^X\(\/\/\)$/{
1321 s//\1/
1322 q
1323 }
1324 /^X\(\/\).*/{
1325 s//\1/
1326 q
1327 }
1328 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001329 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331 srcdir=..
1332 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333else
1334 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336if test ! -r "$srcdir/$ac_unique_file"; then
1337 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1341ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 pwd)`
1344# When building in place, set srcdir=.
1345if test "$ac_abs_confdir" = "$ac_pwd"; then
1346 srcdir=.
1347fi
1348# Remove unnecessary trailing slashes from srcdir.
1349# Double slashes in file names in object file debugging info
1350# mess up M-x gdb in Emacs.
1351case $srcdir in
1352*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1353esac
1354for ac_var in $ac_precious_vars; do
1355 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1356 eval ac_env_${ac_var}_value=\$${ac_var}
1357 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1358 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1359done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001360
Martin v. Löwis11437992002-04-12 09:54:03 +00001361#
1362# Report the --help message.
1363#
1364if test "$ac_init_help" = "long"; then
1365 # Omit some internal or obsolete options to make the list less imposing.
1366 # This message is too long to be a string in the A/UX 3.1 sh.
1367 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001368\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370Usage: $0 [OPTION]... [VAR=VALUE]...
1371
1372To assign environment variables (e.g., CC, CFLAGS...), specify them as
1373VAR=VALUE. See below for descriptions of some of the useful variables.
1374
1375Defaults for the options are specified in brackets.
1376
1377Configuration:
1378 -h, --help display this help and exit
1379 --help=short display options specific to this package
1380 --help=recursive display the short help of all the included packages
1381 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001382 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 --cache-file=FILE cache test results in FILE [disabled]
1384 -C, --config-cache alias for \`--cache-file=config.cache'
1385 -n, --no-create do not create output files
1386 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1387
Martin v. Löwis11437992002-04-12 09:54:03 +00001388Installation directories:
1389 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001390 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001392 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001393
1394By default, \`make install' will install all the files in
1395\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1396an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1397for instance \`--prefix=\$HOME'.
1398
1399For better control, use the options below.
1400
1401Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001402 --bindir=DIR user executables [EPREFIX/bin]
1403 --sbindir=DIR system admin executables [EPREFIX/sbin]
1404 --libexecdir=DIR program executables [EPREFIX/libexec]
1405 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1406 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1407 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1408 --libdir=DIR object code libraries [EPREFIX/lib]
1409 --includedir=DIR C header files [PREFIX/include]
1410 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1411 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1412 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1413 --infodir=DIR info documentation [DATAROOTDIR/info]
1414 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1415 --mandir=DIR man documentation [DATAROOTDIR/man]
1416 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1417 --htmldir=DIR html documentation [DOCDIR]
1418 --dvidir=DIR dvi documentation [DOCDIR]
1419 --pdfdir=DIR pdf documentation [DOCDIR]
1420 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001421_ACEOF
1422
1423 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001424
1425System types:
1426 --build=BUILD configure for building on BUILD [guessed]
1427 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428_ACEOF
1429fi
1430
1431if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001432 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001433 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001434 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 cat <<\_ACEOF
1436
1437Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001438 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001439 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1440 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001441 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001442 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001443 --enable-framework[=INSTALLDIR]
1444 Build (MacOSX|Darwin) framework
1445 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001446 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001447 --enable-loadable-sqlite-extensions
1448 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001449 --enable-ipv6 Enable ipv6 (with ipv4) support
1450 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001451 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001453
1454Optional Packages:
1455 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1456 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001457 --with-universal-archs=ARCH
1458 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001459 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001460 --with-framework-name=FRAMEWORK
1461 specify an alternate name of the framework built
1462 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001464 --with-cxx-main=<compiler>
1465 compile main() and link python executable with C++
1466 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --with-suffix=.exe set executable suffix
1468 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001469 --with-hash-algorithm=[fnv|siphash24]
1470 select hash algorithm
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001472 --with-system-expat build pyexpat module using an installed expat
1473 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001474 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001475 --with-system-libmpdec build _decimal module using an installed libmpdec
1476 library
Ned Deilyd819b932013-09-06 01:07:05 -07001477 --with-tcltk-includes='-I...'
1478 override search for Tcl and Tk include files
1479 --with-tcltk-libs='-L...'
1480 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001481 --with-dbmliborder=db1:db2:...
1482 order to check db backends for dbm. Valid value is a
1483 colon separated string with the backend names
1484 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --with(out)-threads[=DIRECTORY]
1487 disable/enable thread support
1488 --with(out)-thread[=DIRECTORY]
1489 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001491 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001493 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with-fpectl enable SIGFPE catching
1495 --with-libm=STRING math library
1496 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001497 --with(out)-computed-gotos
1498 Use computed gotos in evaluation loop (enabled by
1499 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001502 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001503 CC C compiler command
1504 CFLAGS C compiler flags
1505 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1506 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001507 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001508 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 CPP C preprocessor
1511
1512Use these variables to override the choices made by `configure' or to help
1513it to find libraries and programs with nonstandard names/locations.
1514
Georg Brandle2e15612009-05-20 18:25:10 +00001515Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001518fi
1519
1520if test "$ac_init_help" = "recursive"; then
1521 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001522 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001523 test -d "$ac_dir" ||
1524 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1525 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 ac_builddir=.
1527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528case "$ac_dir" in
1529.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1530*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001531 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001532 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001533 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 case $ac_top_builddir_sub in
1535 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1536 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1537 esac ;;
1538esac
1539ac_abs_top_builddir=$ac_pwd
1540ac_abs_builddir=$ac_pwd$ac_dir_suffix
1541# for backward compatibility:
1542ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001543
1544case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001546 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 ac_top_srcdir=$ac_top_builddir_sub
1548 ac_abs_top_srcdir=$ac_pwd ;;
1549 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551 ac_top_srcdir=$srcdir
1552 ac_abs_top_srcdir=$srcdir ;;
1553 *) # Relative name.
1554 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1555 ac_top_srcdir=$ac_top_build_prefix$srcdir
1556 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001557esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 cd "$ac_dir" || { ac_status=$?; continue; }
1561 # Check for guested configure.
1562 if test -f "$ac_srcdir/configure.gnu"; then
1563 echo &&
1564 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1565 elif test -f "$ac_srcdir/configure"; then
1566 echo &&
1567 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570 fi || ac_status=$?
1571 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 done
1573fi
1574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001576if $ac_init_version; then
1577 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001578python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001579generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001580
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001581Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001582This configure script is free software; the Free Software Foundation
1583gives unlimited permission to copy, distribute and modify it.
1584_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001587
1588## ------------------------ ##
1589## Autoconf initialization. ##
1590## ------------------------ ##
1591
1592# ac_fn_c_try_compile LINENO
1593# --------------------------
1594# Try to compile conftest.$ac_ext, and return whether this succeeded.
1595ac_fn_c_try_compile ()
1596{
1597 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1598 rm -f conftest.$ac_objext
1599 if { { ac_try="$ac_compile"
1600case "(($ac_try" in
1601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1602 *) ac_try_echo=$ac_try;;
1603esac
1604eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1605$as_echo "$ac_try_echo"; } >&5
1606 (eval "$ac_compile") 2>conftest.err
1607 ac_status=$?
1608 if test -s conftest.err; then
1609 grep -v '^ *+' conftest.err >conftest.er1
1610 cat conftest.er1 >&5
1611 mv -f conftest.er1 conftest.err
1612 fi
1613 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1614 test $ac_status = 0; } && {
1615 test -z "$ac_c_werror_flag" ||
1616 test ! -s conftest.err
1617 } && test -s conftest.$ac_objext; then :
1618 ac_retval=0
1619else
1620 $as_echo "$as_me: failed program was:" >&5
1621sed 's/^/| /' conftest.$ac_ext >&5
1622
1623 ac_retval=1
1624fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001625 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 as_fn_set_status $ac_retval
1627
1628} # ac_fn_c_try_compile
1629
Matthias Kloseb9621712010-04-24 17:59:49 +00001630# ac_fn_c_try_link LINENO
1631# -----------------------
1632# Try to link conftest.$ac_ext, and return whether this succeeded.
1633ac_fn_c_try_link ()
1634{
1635 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1636 rm -f conftest.$ac_objext conftest$ac_exeext
1637 if { { ac_try="$ac_link"
1638case "(($ac_try" in
1639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1640 *) ac_try_echo=$ac_try;;
1641esac
1642eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1643$as_echo "$ac_try_echo"; } >&5
1644 (eval "$ac_link") 2>conftest.err
1645 ac_status=$?
1646 if test -s conftest.err; then
1647 grep -v '^ *+' conftest.err >conftest.er1
1648 cat conftest.er1 >&5
1649 mv -f conftest.er1 conftest.err
1650 fi
1651 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1652 test $ac_status = 0; } && {
1653 test -z "$ac_c_werror_flag" ||
1654 test ! -s conftest.err
1655 } && test -s conftest$ac_exeext && {
1656 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001657 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 }; then :
1659 ac_retval=0
1660else
1661 $as_echo "$as_me: failed program was:" >&5
1662sed 's/^/| /' conftest.$ac_ext >&5
1663
1664 ac_retval=1
1665fi
1666 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1667 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1668 # interfere with the next link command; also delete a directory that is
1669 # left behind by Apple's compiler. We do this before executing the actions.
1670 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_link
1675
Matthias Kloseb9621712010-04-24 17:59:49 +00001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001697 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
1713# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1714# -------------------------------------------------------
1715# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1716# the include files in INCLUDES and setting the cache variable VAR
1717# accordingly.
1718ac_fn_c_check_header_mongrel ()
1719{
1720 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001721 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1723$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001724if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001725 $as_echo_n "(cached) " >&6
1726fi
1727eval ac_res=\$$3
1728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1729$as_echo "$ac_res" >&6; }
1730else
1731 # Is the header compilable?
1732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1733$as_echo_n "checking $2 usability... " >&6; }
1734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1735/* end confdefs.h. */
1736$4
1737#include <$2>
1738_ACEOF
1739if ac_fn_c_try_compile "$LINENO"; then :
1740 ac_header_compiler=yes
1741else
1742 ac_header_compiler=no
1743fi
1744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1746$as_echo "$ac_header_compiler" >&6; }
1747
1748# Is the header present?
1749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1750$as_echo_n "checking $2 presence... " >&6; }
1751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1752/* end confdefs.h. */
1753#include <$2>
1754_ACEOF
1755if ac_fn_c_try_cpp "$LINENO"; then :
1756 ac_header_preproc=yes
1757else
1758 ac_header_preproc=no
1759fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001760rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1762$as_echo "$ac_header_preproc" >&6; }
1763
1764# So? What about this header?
1765case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1766 yes:no: )
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1768$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1770$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1771 ;;
1772 no:yes:* )
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1774$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1776$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1778$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1780$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1782$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001783( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001784## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001785## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001786 ) | sed "s/^/$as_me: WARNING: /" >&2
1787 ;;
1788esac
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1790$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001791if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 $as_echo_n "(cached) " >&6
1793else
1794 eval "$3=\$ac_header_compiler"
1795fi
1796eval ac_res=\$$3
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1798$as_echo "$ac_res" >&6; }
1799fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001800 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001801
1802} # ac_fn_c_check_header_mongrel
1803
1804# ac_fn_c_try_run LINENO
1805# ----------------------
1806# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1807# that executables *can* be run.
1808ac_fn_c_try_run ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 if { { ac_try="$ac_link"
1812case "(($ac_try" in
1813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1814 *) ac_try_echo=$ac_try;;
1815esac
1816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1817$as_echo "$ac_try_echo"; } >&5
1818 (eval "$ac_link") 2>&5
1819 ac_status=$?
1820 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1821 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1822 { { case "(($ac_try" in
1823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1824 *) ac_try_echo=$ac_try;;
1825esac
1826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1827$as_echo "$ac_try_echo"; } >&5
1828 (eval "$ac_try") 2>&5
1829 ac_status=$?
1830 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1831 test $ac_status = 0; }; }; then :
1832 ac_retval=0
1833else
1834 $as_echo "$as_me: program exited with status $ac_status" >&5
1835 $as_echo "$as_me: failed program was:" >&5
1836sed 's/^/| /' conftest.$ac_ext >&5
1837
1838 ac_retval=$ac_status
1839fi
1840 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001841 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 as_fn_set_status $ac_retval
1843
1844} # ac_fn_c_try_run
1845
1846# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1847# -------------------------------------------------------
1848# Tests whether HEADER exists and can be compiled using the include files in
1849# INCLUDES, setting the cache variable VAR accordingly.
1850ac_fn_c_check_header_compile ()
1851{
1852 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001855if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001856 $as_echo_n "(cached) " >&6
1857else
1858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1859/* end confdefs.h. */
1860$4
1861#include <$2>
1862_ACEOF
1863if ac_fn_c_try_compile "$LINENO"; then :
1864 eval "$3=yes"
1865else
1866 eval "$3=no"
1867fi
1868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1869fi
1870eval ac_res=\$$3
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1872$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001873 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001874
1875} # ac_fn_c_check_header_compile
1876
Matthias Kloseb9621712010-04-24 17:59:49 +00001877# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1878# -------------------------------------------
1879# Tests whether TYPE exists after having included INCLUDES, setting cache
1880# variable VAR accordingly.
1881ac_fn_c_check_type ()
1882{
1883 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1885$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001886if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001887 $as_echo_n "(cached) " >&6
1888else
1889 eval "$3=no"
1890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891/* end confdefs.h. */
1892$4
1893int
1894main ()
1895{
1896if (sizeof ($2))
1897 return 0;
1898 ;
1899 return 0;
1900}
1901_ACEOF
1902if ac_fn_c_try_compile "$LINENO"; then :
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905$4
1906int
1907main ()
1908{
1909if (sizeof (($2)))
1910 return 0;
1911 ;
1912 return 0;
1913}
1914_ACEOF
1915if ac_fn_c_try_compile "$LINENO"; then :
1916
1917else
1918 eval "$3=yes"
1919fi
1920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1921fi
1922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1923fi
1924eval ac_res=\$$3
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1926$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001927 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001928
1929} # ac_fn_c_check_type
1930
1931# ac_fn_c_find_uintX_t LINENO BITS VAR
1932# ------------------------------------
1933# Finds an unsigned integer type with width BITS, setting cache variable VAR
1934# accordingly.
1935ac_fn_c_find_uintX_t ()
1936{
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1939$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001940if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001941 $as_echo_n "(cached) " >&6
1942else
1943 eval "$3=no"
1944 # Order is important - never check a type that is potentially smaller
1945 # than half of the expected target width.
1946 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1947 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$ac_includes_default
1951int
1952main ()
1953{
1954static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001955test_array [0] = 0;
1956return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001957
1958 ;
1959 return 0;
1960}
1961_ACEOF
1962if ac_fn_c_try_compile "$LINENO"; then :
1963 case $ac_type in #(
1964 uint$2_t) :
1965 eval "$3=yes" ;; #(
1966 *) :
1967 eval "$3=\$ac_type" ;;
1968esac
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001971 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001972
1973else
1974 break
1975fi
1976 done
1977fi
1978eval ac_res=\$$3
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1980$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001981 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001982
1983} # ac_fn_c_find_uintX_t
1984
1985# ac_fn_c_find_intX_t LINENO BITS VAR
1986# -----------------------------------
1987# Finds a signed integer type with width BITS, setting cache variable VAR
1988# accordingly.
1989ac_fn_c_find_intX_t ()
1990{
1991 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1993$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001994if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001995 $as_echo_n "(cached) " >&6
1996else
1997 eval "$3=no"
1998 # Order is important - never check a type that is potentially smaller
1999 # than half of the expected target width.
2000 for ac_type in int$2_t 'int' 'long int' \
2001 'long long int' 'short int' 'signed char'; do
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002005 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002006int
2007main ()
2008{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002009static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002010test_array [0] = 0;
2011return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h. */
2020$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002021 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002022int
2023main ()
2024{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002025static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002026 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002027test_array [0] = 0;
2028return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002029
2030 ;
2031 return 0;
2032}
2033_ACEOF
2034if ac_fn_c_try_compile "$LINENO"; then :
2035
2036else
2037 case $ac_type in #(
2038 int$2_t) :
2039 eval "$3=yes" ;; #(
2040 *) :
2041 eval "$3=\$ac_type" ;;
2042esac
2043fi
2044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2045fi
2046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002047 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002048
2049else
2050 break
2051fi
2052 done
2053fi
2054eval ac_res=\$$3
2055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2056$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002057 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002058
2059} # ac_fn_c_find_intX_t
2060
2061# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2062# --------------------------------------------
2063# Tries to find the compile-time value of EXPR in a program that includes
2064# INCLUDES, setting VAR accordingly. Returns whether the value could be
2065# computed
2066ac_fn_c_compute_int ()
2067{
2068 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069 if test "$cross_compiling" = yes; then
2070 # Depending upon the size, compute the lo and hi bounds.
2071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002078test_array [0] = 0;
2079return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_lo=0 ac_mid=0
2087 while :; do
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002095test_array [0] = 0;
2096return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid; break
2104else
2105 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2106 if test $ac_lo -le $ac_mid; then
2107 ac_lo= ac_hi=
2108 break
2109 fi
2110 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113 done
2114else
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118int
2119main ()
2120{
2121static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002122test_array [0] = 0;
2123return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002124
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129if ac_fn_c_try_compile "$LINENO"; then :
2130 ac_hi=-1 ac_mid=-1
2131 while :; do
2132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h. */
2134$4
2135int
2136main ()
2137{
2138static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002139test_array [0] = 0;
2140return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002141
2142 ;
2143 return 0;
2144}
2145_ACEOF
2146if ac_fn_c_try_compile "$LINENO"; then :
2147 ac_lo=$ac_mid; break
2148else
2149 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2150 if test $ac_mid -le $ac_hi; then
2151 ac_lo= ac_hi=
2152 break
2153 fi
2154 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2155fi
2156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157 done
2158else
2159 ac_lo= ac_hi=
2160fi
2161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2162fi
2163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2164# Binary search between lo and hi bounds.
2165while test "x$ac_lo" != "x$ac_hi"; do
2166 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h. */
2169$4
2170int
2171main ()
2172{
2173static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002174test_array [0] = 0;
2175return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002176
2177 ;
2178 return 0;
2179}
2180_ACEOF
2181if ac_fn_c_try_compile "$LINENO"; then :
2182 ac_hi=$ac_mid
2183else
2184 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2185fi
2186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187done
2188case $ac_lo in #((
2189?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2190'') ac_retval=1 ;;
2191esac
2192 else
2193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194/* end confdefs.h. */
2195$4
2196static long int longval () { return $2; }
2197static unsigned long int ulongval () { return $2; }
2198#include <stdio.h>
2199#include <stdlib.h>
2200int
2201main ()
2202{
2203
2204 FILE *f = fopen ("conftest.val", "w");
2205 if (! f)
2206 return 1;
2207 if (($2) < 0)
2208 {
2209 long int i = longval ();
2210 if (i != ($2))
2211 return 1;
2212 fprintf (f, "%ld", i);
2213 }
2214 else
2215 {
2216 unsigned long int i = ulongval ();
2217 if (i != ($2))
2218 return 1;
2219 fprintf (f, "%lu", i);
2220 }
2221 /* Do not output a trailing newline, as this causes \r\n confusion
2222 on some platforms. */
2223 return ferror (f) || fclose (f) != 0;
2224
2225 ;
2226 return 0;
2227}
2228_ACEOF
2229if ac_fn_c_try_run "$LINENO"; then :
2230 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2231else
2232 ac_retval=1
2233fi
2234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2235 conftest.$ac_objext conftest.beam conftest.$ac_ext
2236rm -f conftest.val
2237
2238 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002239 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002240 as_fn_set_status $ac_retval
2241
2242} # ac_fn_c_compute_int
2243
2244# ac_fn_c_check_func LINENO FUNC VAR
2245# ----------------------------------
2246# Tests whether FUNC exists, setting the cache variable VAR accordingly
2247ac_fn_c_check_func ()
2248{
2249 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2251$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002252if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002253 $as_echo_n "(cached) " >&6
2254else
2255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2256/* end confdefs.h. */
2257/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2258 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2259#define $2 innocuous_$2
2260
2261/* System header to define __stub macros and hopefully few prototypes,
2262 which can conflict with char $2 (); below.
2263 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2264 <limits.h> exists even on freestanding compilers. */
2265
2266#ifdef __STDC__
2267# include <limits.h>
2268#else
2269# include <assert.h>
2270#endif
2271
2272#undef $2
2273
2274/* Override any GCC internal prototype to avoid an error.
2275 Use char because int might match the return type of a GCC
2276 builtin and then its argument prototype would still apply. */
2277#ifdef __cplusplus
2278extern "C"
2279#endif
2280char $2 ();
2281/* The GNU C library defines this for functions which it implements
2282 to always fail with ENOSYS. Some functions are actually named
2283 something starting with __ and the normal name is an alias. */
2284#if defined __stub_$2 || defined __stub___$2
2285choke me
2286#endif
2287
2288int
2289main ()
2290{
2291return $2 ();
2292 ;
2293 return 0;
2294}
2295_ACEOF
2296if ac_fn_c_try_link "$LINENO"; then :
2297 eval "$3=yes"
2298else
2299 eval "$3=no"
2300fi
2301rm -f core conftest.err conftest.$ac_objext \
2302 conftest$ac_exeext conftest.$ac_ext
2303fi
2304eval ac_res=\$$3
2305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2306$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002307 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002308
2309} # ac_fn_c_check_func
2310
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002311# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2312# ---------------------------------------------
2313# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2314# accordingly.
2315ac_fn_c_check_decl ()
2316{
2317 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2318 as_decl_name=`echo $2|sed 's/ *(.*//'`
2319 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2321$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2322if eval \${$3+:} false; then :
2323 $as_echo_n "(cached) " >&6
2324else
2325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2326/* end confdefs.h. */
2327$4
2328int
2329main ()
2330{
2331#ifndef $as_decl_name
2332#ifdef __cplusplus
2333 (void) $as_decl_use;
2334#else
2335 (void) $as_decl_name;
2336#endif
2337#endif
2338
2339 ;
2340 return 0;
2341}
2342_ACEOF
2343if ac_fn_c_try_compile "$LINENO"; then :
2344 eval "$3=yes"
2345else
2346 eval "$3=no"
2347fi
2348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349fi
2350eval ac_res=\$$3
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352$as_echo "$ac_res" >&6; }
2353 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2354
2355} # ac_fn_c_check_decl
2356
Matthias Kloseb9621712010-04-24 17:59:49 +00002357# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2358# ----------------------------------------------------
2359# Tries to find if the field MEMBER exists in type AGGR, after including
2360# INCLUDES, setting cache variable VAR accordingly.
2361ac_fn_c_check_member ()
2362{
2363 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2365$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002366if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002367 $as_echo_n "(cached) " >&6
2368else
2369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370/* end confdefs.h. */
2371$5
2372int
2373main ()
2374{
2375static $2 ac_aggr;
2376if (ac_aggr.$3)
2377return 0;
2378 ;
2379 return 0;
2380}
2381_ACEOF
2382if ac_fn_c_try_compile "$LINENO"; then :
2383 eval "$4=yes"
2384else
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386/* end confdefs.h. */
2387$5
2388int
2389main ()
2390{
2391static $2 ac_aggr;
2392if (sizeof ac_aggr.$3)
2393return 0;
2394 ;
2395 return 0;
2396}
2397_ACEOF
2398if ac_fn_c_try_compile "$LINENO"; then :
2399 eval "$4=yes"
2400else
2401 eval "$4=no"
2402fi
2403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2404fi
2405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2406fi
2407eval ac_res=\$$4
2408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2409$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002410 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002411
2412} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002414This file contains any messages produced by compilers while
2415running configure, to aid debugging if configure makes a mistake.
2416
Georg Brandl08a90122012-09-29 09:34:13 +02002417It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002418generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002419
2420 $ $0 $@
2421
2422_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002424{
2425cat <<_ASUNAME
2426## --------- ##
2427## Platform. ##
2428## --------- ##
2429
2430hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2431uname -m = `(uname -m) 2>/dev/null || echo unknown`
2432uname -r = `(uname -r) 2>/dev/null || echo unknown`
2433uname -s = `(uname -s) 2>/dev/null || echo unknown`
2434uname -v = `(uname -v) 2>/dev/null || echo unknown`
2435
2436/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2437/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2438
2439/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2440/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2441/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002443/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2444/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2445/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2446
2447_ASUNAME
2448
2449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2450for as_dir in $PATH
2451do
2452 IFS=$as_save_IFS
2453 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002454 $as_echo "PATH: $as_dir"
2455 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002457
2458} >&5
2459
2460cat >&5 <<_ACEOF
2461
2462
2463## ----------- ##
2464## Core tests. ##
2465## ----------- ##
2466
2467_ACEOF
2468
2469
2470# Keep a trace of the command line.
2471# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002472# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002473# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002474# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002475ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002476ac_configure_args0=
2477ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002478ac_must_keep_next=false
2479for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002480do
Skip Montanaro6dead952003-09-25 14:50:04 +00002481 for ac_arg
2482 do
2483 case $ac_arg in
2484 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2485 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2486 | -silent | --silent | --silen | --sile | --sil)
2487 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 esac
2491 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002492 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002496 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002498 case $ac_arg in
2499 *=* | --config-cache | -C | -disable-* | --disable-* \
2500 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2501 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2502 | -with-* | --with-* | -without-* | --without-* | --x)
2503 case "$ac_configure_args0 " in
2504 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2505 esac
2506 ;;
2507 -* ) ac_must_keep_next=true ;;
2508 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 ;;
2512 esac
2513 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002514done
Matthias Kloseb9621712010-04-24 17:59:49 +00002515{ ac_configure_args0=; unset ac_configure_args0;}
2516{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002517
2518# When interrupted or exit'd, cleanup temporary files, and complete
2519# config.log. We remove comments because anyway the quotes in there
2520# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521# WARNING: Use '\'' to represent an apostrophe within the trap.
2522# 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 +00002523trap 'exit_status=$?
2524 # Save into config.log some information that might help in debugging.
2525 {
2526 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002527
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002528 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002529## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002530## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
2532 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533(
2534 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2535 eval ac_val=\$$ac_var
2536 case $ac_val in #(
2537 *${as_nl}*)
2538 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2540$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 esac
2542 case $ac_var in #(
2543 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2545 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 esac ;;
2547 esac
2548 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2551 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 "s/'\''/'\''\\\\'\'''\''/g;
2554 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2555 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002556 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002558 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 esac |
2560 sort
2561)
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002563
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002564 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002565## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002566## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002567 echo
2568 for ac_var in $ac_subst_vars
2569 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 eval ac_val=\$$ac_var
2571 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002572 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002575 done | sort
2576 echo
2577
2578 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002579 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002581## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002582 echo
2583 for ac_var in $ac_subst_files
2584 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 eval ac_val=\$$ac_var
2586 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002590 done | sort
2591 echo
2592 fi
2593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002595 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002596## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002597## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 echo
2601 fi
2602 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 $as_echo "$as_me: caught signal $ac_signal"
2604 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 rm -f core *.core core.conftest.* &&
2607 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002610for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002612done
2613ac_signal=0
2614
2615# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002617
Matthias Kloseb9621712010-04-24 17:59:49 +00002618$as_echo "/* confdefs.h */" > confdefs.h
2619
Martin v. Löwis11437992002-04-12 09:54:03 +00002620# Predefined preprocessor variables.
2621
2622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_NAME "$PACKAGE_NAME"
2624_ACEOF
2625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2628_ACEOF
2629
Martin v. Löwis11437992002-04-12 09:54:03 +00002630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_VERSION "$PACKAGE_VERSION"
2632_ACEOF
2633
Martin v. Löwis11437992002-04-12 09:54:03 +00002634cat >>confdefs.h <<_ACEOF
2635#define PACKAGE_STRING "$PACKAGE_STRING"
2636_ACEOF
2637
Martin v. Löwis11437992002-04-12 09:54:03 +00002638cat >>confdefs.h <<_ACEOF
2639#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2640_ACEOF
2641
Matthias Kloseb9621712010-04-24 17:59:49 +00002642cat >>confdefs.h <<_ACEOF
2643#define PACKAGE_URL "$PACKAGE_URL"
2644_ACEOF
2645
Martin v. Löwis11437992002-04-12 09:54:03 +00002646
2647# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002648# Prefer an explicitly selected file to automatically selected ones.
2649ac_site_file1=NONE
2650ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002651if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002652 # We do not want a PATH search for config.site.
2653 case $CONFIG_SITE in #((
2654 -*) ac_site_file1=./$CONFIG_SITE;;
2655 */*) ac_site_file1=$CONFIG_SITE;;
2656 *) ac_site_file1=./$CONFIG_SITE;;
2657 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 ac_site_file1=$prefix/share/config.site
2660 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661else
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 ac_site_file1=$ac_default_prefix/share/config.site
2663 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002665for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002666do
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 test "x$ac_site_file" = xNONE && continue
2668 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2670$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002672 . "$ac_site_file" \
2673 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2675as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002676See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677 fi
2678done
2679
2680if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 # Some versions of bash will fail to source /dev/null (special files
2682 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2683 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2685$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2688 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 esac
2690 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691else
Matthias Kloseb9621712010-04-24 17:59:49 +00002692 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2693$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 >$cache_file
2695fi
2696
2697# Check that the precious variables saved in the cache have kept the same
2698# value.
2699ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2702 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002703 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2704 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 case $ac_old_set,$ac_new_set in
2706 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002707 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2708$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 +00002709 ac_cache_corrupted=: ;;
2710 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002711 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2712$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 ac_cache_corrupted=: ;;
2714 ,);;
2715 *)
2716 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002717 # differences in whitespace do not lead to failure.
2718 ac_old_val_w=`echo x $ac_old_val`
2719 ac_new_val_w=`echo x $ac_new_val`
2720 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2722$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2723 ac_cache_corrupted=:
2724 else
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2726$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2727 eval $ac_var=\$ac_old_val
2728 fi
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2730$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2732$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 fi;;
2734 esac
2735 # Pass precious variables to config.status.
2736 if test "$ac_new_set" = set; then
2737 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002738 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 *) ac_arg=$ac_var=$ac_new_val ;;
2740 esac
2741 case " $ac_configure_args " in
2742 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002743 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 esac
2745 fi
2746done
2747if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002748 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2751$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002752 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002754## -------------------- ##
2755## Main body of script. ##
2756## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002757
Guido van Rossum7f43da71994-08-01 12:15:30 +00002758ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002759ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002760ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2761ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2762ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002763
Guido van Rossum627b2d71993-12-24 10:39:16 +00002764
Michael W. Hudson54241132001-12-07 15:38:26 +00002765
Trent Nelson4d4ec652012-10-16 08:51:24 -04002766
Trent Nelson5595ab52012-10-17 04:47:31 -04002767if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002768 # If we're building out-of-tree, we need to make sure the following
2769 # resources get picked up before their $srcdir counterparts.
2770 # Objects/ -> typeslots.inc
2771 # Include/ -> Python-ast.h, graminit.h
2772 # Python/ -> importlib.h
2773 # (A side effect of this is that these resources will automatically be
2774 # regenerated when building out-of-tree, regardless of whether or not
2775 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2776 # off.)
2777 BASECPPFLAGS="-IObjects -IInclude -IPython"
2778else
2779 BASECPPFLAGS=""
2780fi
2781
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002782
2783
2784
2785
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002786if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002787then
2788# Extract the first word of "hg", so it can be a program name with args.
2789set dummy hg; ac_word=$2
2790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2791$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002792if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002793 $as_echo_n "(cached) " >&6
2794else
2795 if test -n "$HAS_HG"; then
2796 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2797else
2798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2799for as_dir in $PATH
2800do
2801 IFS=$as_save_IFS
2802 test -z "$as_dir" && as_dir=.
2803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002805 ac_cv_prog_HAS_HG="found"
2806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2807 break 2
2808 fi
2809done
2810 done
2811IFS=$as_save_IFS
2812
2813 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2814fi
2815fi
2816HAS_HG=$ac_cv_prog_HAS_HG
2817if test -n "$HAS_HG"; then
2818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2819$as_echo "$HAS_HG" >&6; }
2820else
2821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2822$as_echo "no" >&6; }
2823fi
2824
2825
2826else
2827HAS_HG=no-repository
2828fi
2829if test $HAS_HG = found
2830then
2831 HGVERSION="hg id -i \$(srcdir)"
2832 HGTAG="hg id -t \$(srcdir)"
2833 HGBRANCH="hg id -b \$(srcdir)"
2834else
2835 HGVERSION=""
2836 HGTAG=""
2837 HGBRANCH=""
2838fi
2839
2840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002841ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002842
2843
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002844ac_aux_dir=
2845for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2846 if test -f "$ac_dir/install-sh"; then
2847 ac_aux_dir=$ac_dir
2848 ac_install_sh="$ac_aux_dir/install-sh -c"
2849 break
2850 elif test -f "$ac_dir/install.sh"; then
2851 ac_aux_dir=$ac_dir
2852 ac_install_sh="$ac_aux_dir/install.sh -c"
2853 break
2854 elif test -f "$ac_dir/shtool"; then
2855 ac_aux_dir=$ac_dir
2856 ac_install_sh="$ac_aux_dir/shtool install -c"
2857 break
2858 fi
2859done
2860if test -z "$ac_aux_dir"; then
2861 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2862fi
2863
2864# These three variables are undocumented and unsupported,
2865# and are intended to be withdrawn in a future Autoconf release.
2866# They can cause serious problems if a builder's source tree is in a directory
2867# whose full name contains unusual characters.
2868ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2869ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2870ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2871
2872
2873# Make sure we can run config.sub.
2874$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2875 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2876
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2878$as_echo_n "checking build system type... " >&6; }
2879if ${ac_cv_build+:} false; then :
2880 $as_echo_n "(cached) " >&6
2881else
2882 ac_build_alias=$build_alias
2883test "x$ac_build_alias" = x &&
2884 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2885test "x$ac_build_alias" = x &&
2886 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2887ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2888 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2889
2890fi
2891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2892$as_echo "$ac_cv_build" >&6; }
2893case $ac_cv_build in
2894*-*-*) ;;
2895*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2896esac
2897build=$ac_cv_build
2898ac_save_IFS=$IFS; IFS='-'
2899set x $ac_cv_build
2900shift
2901build_cpu=$1
2902build_vendor=$2
2903shift; shift
2904# Remember, the first character of IFS is used to create $*,
2905# except with old shells:
2906build_os=$*
2907IFS=$ac_save_IFS
2908case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2909
2910
2911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2912$as_echo_n "checking host system type... " >&6; }
2913if ${ac_cv_host+:} false; then :
2914 $as_echo_n "(cached) " >&6
2915else
2916 if test "x$host_alias" = x; then
2917 ac_cv_host=$ac_cv_build
2918else
2919 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2920 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2921fi
2922
2923fi
2924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2925$as_echo "$ac_cv_host" >&6; }
2926case $ac_cv_host in
2927*-*-*) ;;
2928*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2929esac
2930host=$ac_cv_host
2931ac_save_IFS=$IFS; IFS='-'
2932set x $ac_cv_host
2933shift
2934host_cpu=$1
2935host_vendor=$2
2936shift; shift
2937# Remember, the first character of IFS is used to create $*,
2938# except with old shells:
2939host_os=$*
2940IFS=$ac_save_IFS
2941case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2942
2943
2944
doko@python.orga10e4a92013-01-25 18:45:12 +01002945
2946
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002947if test "$cross_compiling" = yes; then
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2949$as_echo_n "checking for python interpreter for cross build... " >&6; }
2950 if test -z "$PYTHON_FOR_BUILD"; then
2951 for interp in python$PACKAGE_VERSION python3 python; do
2952 which $interp >/dev/null 2>&1 || continue
2953 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2954 break
2955 fi
2956 interp=
2957 done
2958 if test x$interp = x; then
2959 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2960 fi
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2962$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002963 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 +02002964 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002965elif test "$cross_compiling" = maybe; then
2966 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002967else
2968 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2969fi
2970
2971
Martin v. Löwis11437992002-04-12 09:54:03 +00002972
Benjamin Petersond23f8222009-04-05 19:13:16 +00002973if test "$prefix" != "/"; then
2974 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2975fi
2976
2977
Martin v. Löwis11437992002-04-12 09:54:03 +00002978
2979
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002980# We don't use PACKAGE_ variables, and they cause conflicts
2981# with other autoconf-based packages that include Python.h
2982grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2983rm confdefs.h
2984mv confdefs.h.new confdefs.h
2985
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002986
Georg Brandl08a90122012-09-29 09:34:13 +02002987VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002988
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002989# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002990
2991SOVERSION=1.0
2992
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002993# The later defininition of _XOPEN_SOURCE disables certain features
2994# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2995
Matthias Kloseb9621712010-04-24 17:59:49 +00002996$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002997
2998
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002999# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3000# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3001# them.
3002
Matthias Kloseb9621712010-04-24 17:59:49 +00003003$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003004
3005
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003006# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3007# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3008# them.
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003011
3012
Martin v. Löwisd6320502004-08-12 13:45:08 +00003013# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3014# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003017
3018
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003019# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3020# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3021# them.
3022
Matthias Kloseb9621712010-04-24 17:59:49 +00003023$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003024
3025
3026
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003027define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003028
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003029# Arguments passed to configure.
3030
3031CONFIG_ARGS="$ac_configure_args"
3032
Matthias Kloseb9621712010-04-24 17:59:49 +00003033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3034$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003035# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003036if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003037 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038 case $enableval in
3039 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003040 # Locate the best usable SDK, see Mac/README.txt for more
3041 # information
3042 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003043 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003045 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3046 if test ! -d "${enableval}"
3047 then
3048 enableval=/
3049 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051 ;;
3052 esac
3053 case $enableval in
3054 no)
3055 UNIVERSALSDK=
3056 enable_universalsdk=
3057 ;;
3058 *)
3059 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060 if test ! -d "${UNIVERSALSDK}"
3061 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003062 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064 ;;
3065 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003066
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003067
Thomas Wouters477c8d52006-05-27 19:21:47 +00003068else
3069
3070 UNIVERSALSDK=
3071 enable_universalsdk=
3072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003073fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003074
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003075if test -n "${UNIVERSALSDK}"
3076then
Matthias Kloseb9621712010-04-24 17:59:49 +00003077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3078$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003079else
Matthias Kloseb9621712010-04-24 17:59:49 +00003080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3081$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003084
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003085
Ned Deily87adb6e2013-10-18 21:09:56 -07003086ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003087
Ned Deilycbfb9a52012-06-23 16:02:19 -07003088# For backward compatibility reasons we prefer to select '32-bit' if available,
3089# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003091if test "`uname -s`" = "Darwin"
3092then
3093 if test -n "${UNIVERSALSDK}"
3094 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003095 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003096 then
3097 UNIVERSAL_ARCHS="intel"
3098 fi
3099 fi
3100fi
3101
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003102
Matthias Kloseb9621712010-04-24 17:59:49 +00003103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3104$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105
3106# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003107if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003108 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003109 UNIVERSAL_ARCHS="$withval"
3110
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003111fi
3112
Ned Deily87adb6e2013-10-18 21:09:56 -07003113if test -n "${UNIVERSALSDK}"
3114then
3115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3116$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3117else
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3119$as_echo "no" >&6; }
3120fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003121
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003122
3123# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003124if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003125 withval=$with_framework_name;
3126 PYTHONFRAMEWORK=${withval}
3127 PYTHONFRAMEWORKDIR=${withval}.framework
3128 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3129
3130else
3131
3132 PYTHONFRAMEWORK=Python
3133 PYTHONFRAMEWORKDIR=Python.framework
3134 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3135
3136fi
3137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003139if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003141 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003142 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003143 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003144 esac
3145 case $enableval in
3146 no)
3147 PYTHONFRAMEWORK=
3148 PYTHONFRAMEWORKDIR=no-framework
3149 PYTHONFRAMEWORKPREFIX=
3150 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003151 FRAMEWORKINSTALLFIRST=
3152 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003153 FRAMEWORKALTINSTALLFIRST=
3154 FRAMEWORKALTINSTALLLAST=
3155 if test "x${prefix}" = "xNONE"; then
3156 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3157 else
3158 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3159 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003160 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003161 ;;
3162 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003163 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003164 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003165 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003166 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003167 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3168 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003169 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003170
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003171 if test "x${prefix}" = "xNONE" ; then
3172 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003173
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003174 else
3175 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3176 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003177
3178 case "${enableval}" in
3179 /System*)
3180 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3181 if test "${prefix}" = "NONE" ; then
3182 # See below
3183 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3184 fi
3185 ;;
3186
3187 /Library*)
3188 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3189 ;;
3190
3191 */Library/Frameworks)
3192 MDIR="`dirname "${enableval}"`"
3193 MDIR="`dirname "${MDIR}"`"
3194 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3195
3196 if test "${prefix}" = "NONE"; then
3197 # User hasn't specified the
3198 # --prefix option, but wants to install
3199 # the framework in a non-default location,
3200 # ensure that the compatibility links get
3201 # installed relative to that prefix as well
3202 # instead of in /usr/local.
3203 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3204 fi
3205 ;;
3206
3207 *)
3208 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3209 ;;
3210 esac
3211
Jack Jansen127e56e2001-09-11 14:41:54 +00003212 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003213
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003214 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003215 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003219
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003220 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3221
3222 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3223
Jack Jansene578a632001-08-15 01:27:14 +00003224 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003225
Guido van Rossum563e7081996-09-10 18:20:48 +00003226else
Martin v. Löwis11437992002-04-12 09:54:03 +00003227
Jack Jansene578a632001-08-15 01:27:14 +00003228 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003229 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003230 PYTHONFRAMEWORKPREFIX=
3231 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232 FRAMEWORKINSTALLFIRST=
3233 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003234 FRAMEWORKALTINSTALLFIRST=
3235 FRAMEWORKALTINSTALLLAST=
3236 if test "x${prefix}" = "xNONE" ; then
3237 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3238 else
3239 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3240 fi
Jack Jansene578a632001-08-15 01:27:14 +00003241 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003243
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244fi
3245
Thomas Wouters477c8d52006-05-27 19:21:47 +00003246
3247
Michael W. Hudson54241132001-12-07 15:38:26 +00003248
3249
3250
3251
Jack Jansene578a632001-08-15 01:27:14 +00003252
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003253
3254
3255
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003256
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003257
Jack Jansene578a632001-08-15 01:27:14 +00003258##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003259## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003260## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003261##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003262# Set name for machine-dependent library files
3263
Matthias Kloseb9621712010-04-24 17:59:49 +00003264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3265$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003266if test -z "$MACHDEP"
3267then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003268 # avoid using uname for cross builds
3269 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003270 # ac_sys_system and ac_sys_release are used for setting
3271 # a lot of different things including 'define_xopen_source'
3272 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003273 case "$host" in
3274 *-*-linux*)
3275 ac_sys_system=Linux
3276 ;;
3277 *-*-cygwin*)
3278 ac_sys_system=Cygwin
3279 ;;
3280 *)
3281 # for now, limit cross builds to known configurations
3282 MACHDEP="unknown"
3283 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3284 esac
3285 ac_sys_release=
3286 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003287 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003288 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003289 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003290 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003292 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003293 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003294 fi
3295 ac_md_system=`echo $ac_sys_system |
3296 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3297 ac_md_release=`echo $ac_sys_release |
3298 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3299 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003300
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003301 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003302 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003303 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003304 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003305 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003306 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003307 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003308fi
Guido van Rossum91922671997-10-09 20:24:13 +00003309
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003310
3311if test "$cross_compiling" = yes; then
3312 case "$host" in
3313 *-*-linux*)
3314 case "$host_cpu" in
3315 arm*)
3316 _host_cpu=arm
3317 ;;
3318 *)
3319 _host_cpu=$host_cpu
3320 esac
3321 ;;
3322 *-*-cygwin*)
3323 _host_cpu=
3324 ;;
3325 *)
3326 # for now, limit cross builds to known configurations
3327 MACHDEP="unknown"
3328 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3329 esac
3330 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3331fi
3332
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003333# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3334# disable features if it is defined, without any means to access these
3335# features as extensions. For these systems, we skip the definition of
3336# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3337# some feature, make sure there is no alternative way to access this
3338# feature. Also, when using wildcards, make sure you have verified the
3339# need for not defining _XOPEN_SOURCE on all systems matching the
3340# wildcard, and that the wildcard does not include future systems
3341# (which may remove their limitations).
3342case $ac_sys_system/$ac_sys_release in
3343 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3344 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003345 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003346 # In addition, Stefan Krah confirms that issue #1244610 exists through
3347 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003348 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003349 define_xopen_source=no
3350 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3351 # also defined. This can be overridden by defining _BSD_SOURCE
3352 # As this has a different meaning on Linux, only define it on OpenBSD
3353
Matthias Kloseb9621712010-04-24 17:59:49 +00003354$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003355
3356 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003357 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003358 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3359 # also defined. This can be overridden by defining _BSD_SOURCE
3360 # As this has a different meaning on Linux, only define it on OpenBSD
3361
Matthias Kloseb9621712010-04-24 17:59:49 +00003362$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003363
3364 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003365 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3366 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3367 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003368 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 +00003369 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003370 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3371 # request to enable features supported by the standard as a request
3372 # to disable features not supported by the standard. The best way
3373 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3374 # entirely and define __EXTENSIONS__ instead.
3375 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003376 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003377 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3378 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003379 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003380 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003381 define_xopen_source=no;;
3382 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003383 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003384 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003385 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003386 # On FreeBSD 4, the math functions C89 does not cover are never defined
3387 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3388 FreeBSD/4.*)
3389 define_xopen_source=no;;
3390 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3391 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3392 # identifies itself as Darwin/7.*
3393 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3394 # disables platform specific features beyond repair.
3395 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3396 # has no effect, don't bother defining them
3397 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003398 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003399 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003400 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003401 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3402 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3403 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003404 AIX/4)
3405 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003406 AIX/5)
3407 if test `uname -r` -eq 1; then
3408 define_xopen_source=no
3409 fi
3410 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003411 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3412 # defining NI_NUMERICHOST.
3413 QNX/6.3.2)
3414 define_xopen_source=no
3415 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003416
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003417esac
3418
3419if test $define_xopen_source = yes
3420then
Victor Stinner14d098d2011-09-07 22:29:43 +02003421 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
Victor Stinner14d098d2011-09-07 22:29:43 +02003423$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003424
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003425
3426 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3427 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3428 # several APIs are not declared. Since this is also needed in some
3429 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003430
Matthias Kloseb9621712010-04-24 17:59:49 +00003431$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003432
3433
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003434
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003435$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003436
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003437fi
3438
Guido van Rossum91922671997-10-09 20:24:13 +00003439#
3440# SGI compilers allow the specification of the both the ABI and the
3441# ISA on the command line. Depending on the values of these switches,
3442# different and often incompatable code will be generated.
3443#
3444# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3445# thus supply support for various ABI/ISA combinations. The MACHDEP
3446# variable is also adjusted.
3447#
3448
3449if test ! -z "$SGI_ABI"
3450then
3451 CC="cc $SGI_ABI"
3452 LDFLAGS="$SGI_ABI $LDFLAGS"
3453 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3456$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003457
Jack Jansen6b08a402004-06-03 12:41:45 +00003458# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3459# it may influence the way we can build extensions, so distutils
3460# needs to check it
3461
Thomas Wouters477c8d52006-05-27 19:21:47 +00003462
Jack Jansen6b08a402004-06-03 12:41:45 +00003463CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003464EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003465
Guido van Rossum627b2d71993-12-24 10:39:16 +00003466# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003467
3468# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3469# for debug/optimization stuff. BASECFLAGS is for flags that are required
3470# just to get things to compile and link. Users are free to override OPT
3471# when running configure or make. The build should not break if they do.
3472# BASECFLAGS should generally not be messed with, however.
3473
3474# XXX shouldn't some/most/all of this code be merged with the stuff later
3475# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3477$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003478
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003480if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003481 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003482 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003483 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003484 without_gcc=yes;;
3485 yes) CC=gcc
3486 without_gcc=no;;
3487 *) CC=$withval
3488 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003489 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003490else
Martin v. Löwis11437992002-04-12 09:54:03 +00003491
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003492 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003493 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003494 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003495 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003496 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003497fi
3498
Matthias Kloseb9621712010-04-24 17:59:49 +00003499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3500$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003501
Guido van Rossum8b131c51995-03-09 14:10:13 +00003502# If the user switches compilers, we can't believe the cache
3503if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3504then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003505 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003506(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003507fi
3508
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003509# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3510# when the compiler supports them, but we don't always want -O2, and
3511# we set -g later.
3512if test -z "$CFLAGS"; then
3513 CFLAGS=
3514fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003515
3516if test "$ac_sys_system" = "Darwin"
3517then
3518 # Compiler selection on MacOSX is more complicated than
3519 # AC_PROG_CC can handle, see Mac/README.txt for more
3520 # information
3521 if test -z "${CC}"
3522 then
3523 found_gcc=
3524 found_clang=
3525 as_save_IFS=$IFS; IFS=:
3526 for as_dir in $PATH
3527 do
3528 IFS=$as_save_IFS
3529 if test -x $as_dir/gcc; then
3530 if test -z "${found_gcc}"; then
3531 found_gcc=$as_dir/gcc
3532 fi
3533 fi
3534 if test -x $as_dir/clang; then
3535 if test -z "${found_clang}"; then
3536 found_clang=$as_dir/clang
3537 fi
3538 fi
3539 done
3540 IFS=$as_save_IFS
3541
3542 if test -n "$found_gcc" -a -n "$found_clang"
3543 then
3544 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3545 then
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3547$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3548 CC="$found_clang"
3549 CXX="$found_clang++"
3550 fi
3551
3552
3553 elif test -z "$found_gcc" -a -n "$found_clang"
3554 then
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3556$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3557 CC="$found_clang"
3558 CXX="$found_clang++"
3559
3560 elif test -z "$found_gcc" -a -z "$found_clang"
3561 then
3562 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3563 if test -n "${found_clang}"
3564 then
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3566$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3567 CC="${found_clang}"
3568 CXX="`/usr/bin/xcrun -find clang++`"
3569
3570 # else: use default behaviour
3571 fi
3572 fi
3573 fi
3574fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003575ac_ext=c
3576ac_cpp='$CPP $CPPFLAGS'
3577ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3578ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3579ac_compiler_gnu=$ac_cv_c_compiler_gnu
3580if test -n "$ac_tool_prefix"; then
3581 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3582set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3584$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003585if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003587else
3588 if test -n "$CC"; then
3589 ac_cv_prog_CC="$CC" # Let the user override the test.
3590else
Martin v. Löwis11437992002-04-12 09:54:03 +00003591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3592for as_dir in $PATH
3593do
3594 IFS=$as_save_IFS
3595 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003597 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003598 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 $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 +00003600 break 2
3601 fi
3602done
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003605
Jack Jansendd19cf82001-12-06 22:36:17 +00003606fi
3607fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003608CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003609if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3611$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003612else
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3614$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003615fi
3616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617
Martin v. Löwis11437992002-04-12 09:54:03 +00003618fi
3619if test -z "$ac_cv_prog_CC"; then
3620 ac_ct_CC=$CC
3621 # Extract the first word of "gcc", so it can be a program name with args.
3622set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3624$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003625if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003627else
3628 if test -n "$ac_ct_CC"; then
3629 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3630else
3631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3632for as_dir in $PATH
3633do
3634 IFS=$as_save_IFS
3635 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 $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 +00003640 break 2
3641 fi
3642done
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003645
3646fi
3647fi
3648ac_ct_CC=$ac_cv_prog_ac_ct_CC
3649if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3651$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003652else
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3654$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003655fi
3656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657 if test "x$ac_ct_CC" = x; then
3658 CC=""
3659 else
3660 case $cross_compiling:$ac_tool_warned in
3661yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003662{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3663$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664ac_tool_warned=yes ;;
3665esac
3666 CC=$ac_ct_CC
3667 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003668else
3669 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003670fi
3671
Jack Jansendd19cf82001-12-06 22:36:17 +00003672if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673 if test -n "$ac_tool_prefix"; then
3674 # 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 +00003675set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3677$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003678if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003680else
3681 if test -n "$CC"; then
3682 ac_cv_prog_CC="$CC" # Let the user override the test.
3683else
Martin v. Löwis11437992002-04-12 09:54:03 +00003684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3685for as_dir in $PATH
3686do
3687 IFS=$as_save_IFS
3688 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 $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 +00003693 break 2
3694 fi
3695done
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003698
3699fi
3700fi
3701CC=$ac_cv_prog_CC
3702if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3704$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003705else
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3707$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003708fi
3709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710
Martin v. Löwis11437992002-04-12 09:54:03 +00003711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003712fi
3713if test -z "$CC"; then
3714 # Extract the first word of "cc", so it can be a program name with args.
3715set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3717$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003718if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003720else
3721 if test -n "$CC"; then
3722 ac_cv_prog_CC="$CC" # Let the user override the test.
3723else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003724 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3726for as_dir in $PATH
3727do
3728 IFS=$as_save_IFS
3729 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3733 ac_prog_rejected=yes
3734 continue
3735 fi
3736 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 $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 +00003738 break 2
3739 fi
3740done
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003743
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744if test $ac_prog_rejected = yes; then
3745 # We found a bogon in the path, so make sure we never use it.
3746 set dummy $ac_cv_prog_CC
3747 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749 # We chose a different compiler from the bogus one.
3750 # However, it has the same basename, so the bogon will be chosen
3751 # first if we set CC to just the basename; use the full file name.
3752 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003753 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754 fi
3755fi
3756fi
3757fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003758CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3761$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762else
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3764$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003765fi
3766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767
Martin v. Löwis11437992002-04-12 09:54:03 +00003768fi
3769if test -z "$CC"; then
3770 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003772 do
3773 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3774set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3776$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003777if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003779else
3780 if test -n "$CC"; then
3781 ac_cv_prog_CC="$CC" # Let the user override the test.
3782else
Martin v. Löwis11437992002-04-12 09:54:03 +00003783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3784for as_dir in $PATH
3785do
3786 IFS=$as_save_IFS
3787 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003789 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 $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 +00003792 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003793 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003794done
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003797
3798fi
3799fi
3800CC=$ac_cv_prog_CC
3801if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3803$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003804else
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3806$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003807fi
3808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 test -n "$CC" && break
3811 done
3812fi
3813if test -z "$CC"; then
3814 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003816do
3817 # Extract the first word of "$ac_prog", so it can be a program name with args.
3818set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003821if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003823else
3824 if test -n "$ac_ct_CC"; then
3825 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3826else
3827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3828for as_dir in $PATH
3829do
3830 IFS=$as_save_IFS
3831 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003833 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003834 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 $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 +00003836 break 2
3837 fi
3838done
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003841
Martin v. Löwis11437992002-04-12 09:54:03 +00003842fi
3843fi
3844ac_ct_CC=$ac_cv_prog_ac_ct_CC
3845if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3847$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848else
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3850$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003851fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 test -n "$ac_ct_CC" && break
3855done
Michael W. Hudson54241132001-12-07 15:38:26 +00003856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857 if test "x$ac_ct_CC" = x; then
3858 CC=""
3859 else
3860 case $cross_compiling:$ac_tool_warned in
3861yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003862{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3863$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864ac_tool_warned=yes ;;
3865esac
3866 CC=$ac_ct_CC
3867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003868fi
3869
3870fi
3871
3872
Matthias Kloseb9621712010-04-24 17:59:49 +00003873test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003875as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003876See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003877
3878# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003879$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3880set X $ac_compile
3881ac_compiler=$2
3882for ac_option in --version -v -V -qversion; do
3883 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884case "(($ac_try" in
3885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3886 *) ac_try_echo=$ac_try;;
3887esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003888eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3889$as_echo "$ac_try_echo"; } >&5
3890 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003891 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 if test -s conftest.err; then
3893 sed '10a\
3894... rest of stderr output deleted ...
3895 10q' conftest.err >conftest.er1
3896 cat conftest.er1 >&5
3897 fi
3898 rm -f conftest.er1 conftest.err
3899 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3900 test $ac_status = 0; }
3901done
Martin v. Löwis11437992002-04-12 09:54:03 +00003902
Matthias Kloseb9621712010-04-24 17:59:49 +00003903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003904/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003905
Martin v. Löwis11437992002-04-12 09:54:03 +00003906int
3907main ()
3908{
3909
3910 ;
3911 return 0;
3912}
3913_ACEOF
3914ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003915ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003916# Try to create an executable without -o first, disregard a.out.
3917# It will help us diagnose broken compilers, and finding out an intuition
3918# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3920$as_echo_n "checking whether the C compiler works... " >&6; }
3921ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3922
3923# The possible output files:
3924ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926ac_rmfiles=
3927for ac_file in $ac_files
3928do
3929 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003930 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3932 esac
3933done
3934rm -f $ac_rmfiles
3935
Matthias Kloseb9621712010-04-24 17:59:49 +00003936if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937case "(($ac_try" in
3938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3939 *) ac_try_echo=$ac_try;;
3940esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003941eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3942$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003944 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3946 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3948# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3949# in a Makefile. We should not override ac_cv_exeext if it was cached,
3950# so that the user can short-circuit this test for compilers unknown to
3951# Autoconf.
3952for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003953do
3954 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003957 ;;
3958 [ab].out )
3959 # We found the default executable, but exeext='' is most
3960 # certainly right.
3961 break;;
3962 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003963 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 then :; else
3965 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3966 fi
3967 # We set ac_cv_exeext here because the later test for it is not
3968 # safe: cross compilers may not add the suffix if given an `-o'
3969 # argument, so we may need to know it at that point already.
3970 # Even if this section looks crufty: it has the advantage of
3971 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972 break;;
3973 * )
3974 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003975 esac
3976done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977test "$ac_cv_exeext" = no && ac_cv_exeext=
3978
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003979else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003980 ac_file=''
3981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003982if test -z "$ac_file"; then :
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3984$as_echo "no" >&6; }
3985$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003986sed 's/^/| /' conftest.$ac_ext >&5
3987
Matthias Kloseb9621712010-04-24 17:59:49 +00003988{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003990as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003991See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003992else
3993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3994$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3997$as_echo_n "checking for C compiler default output file name... " >&6; }
3998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3999$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001
Matthias Kloseb9621712010-04-24 17:59:49 +00004002rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4005$as_echo_n "checking for suffix of executables... " >&6; }
4006if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004007case "(($ac_try" in
4008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4009 *) ac_try_echo=$ac_try;;
4010esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004011eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4012$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004014 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4016 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004017 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4018# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4019# work properly (i.e., refer to `conftest.exe'), while it won't with
4020# `rm'.
4021for ac_file in conftest.exe conftest conftest.*; do
4022 test -f "$ac_file" || continue
4023 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4026 break;;
4027 * ) break;;
4028 esac
4029done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004030else
Matthias Kloseb9621712010-04-24 17:59:49 +00004031 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4032$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004033as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004034See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004036rm -f conftest conftest$ac_cv_exeext
4037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4038$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004039
4040rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004041EXEEXT=$ac_cv_exeext
4042ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4044/* end confdefs.h. */
4045#include <stdio.h>
4046int
4047main ()
4048{
4049FILE *f = fopen ("conftest.out", "w");
4050 return ferror (f) || fclose (f) != 0;
4051
4052 ;
4053 return 0;
4054}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004056ac_clean_files="$ac_clean_files conftest.out"
4057# Check that the compiler produces executables we can run. If not, either
4058# the compiler is broken, or we cross compile.
4059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4060$as_echo_n "checking whether we are cross compiling... " >&6; }
4061if test "$cross_compiling" != yes; then
4062 { { ac_try="$ac_link"
4063case "(($ac_try" in
4064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4065 *) ac_try_echo=$ac_try;;
4066esac
4067eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4068$as_echo "$ac_try_echo"; } >&5
4069 (eval "$ac_link") 2>&5
4070 ac_status=$?
4071 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4072 test $ac_status = 0; }
4073 if { ac_try='./conftest$ac_cv_exeext'
4074 { { case "(($ac_try" in
4075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4076 *) ac_try_echo=$ac_try;;
4077esac
4078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4079$as_echo "$ac_try_echo"; } >&5
4080 (eval "$ac_try") 2>&5
4081 ac_status=$?
4082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4083 test $ac_status = 0; }; }; then
4084 cross_compiling=no
4085 else
4086 if test "$cross_compiling" = maybe; then
4087 cross_compiling=yes
4088 else
4089 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004091as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004092If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004093See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 fi
4095 fi
4096fi
4097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4098$as_echo "$cross_compiling" >&6; }
4099
4100rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4101ac_clean_files=$ac_clean_files_save
4102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4103$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004104if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 $as_echo_n "(cached) " >&6
4106else
4107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004108/* end confdefs.h. */
4109
4110int
4111main ()
4112{
4113
4114 ;
4115 return 0;
4116}
4117_ACEOF
4118rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004119if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004120case "(($ac_try" in
4121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4122 *) ac_try_echo=$ac_try;;
4123esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004124eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4125$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004126 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4129 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130 for ac_file in conftest.o conftest.obj conftest.*; do
4131 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004132 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004134 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4135 break;;
4136 esac
4137done
4138else
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004140sed 's/^/| /' conftest.$ac_ext >&5
4141
Matthias Kloseb9621712010-04-24 17:59:49 +00004142{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4143$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004144as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004145See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004146fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004147rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4150$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004151OBJEXT=$ac_cv_objext
4152ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4154$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004155if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004157else
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004160
Martin v. Löwis11437992002-04-12 09:54:03 +00004161int
4162main ()
4163{
4164#ifndef __GNUC__
4165 choke me
4166#endif
4167
4168 ;
4169 return 0;
4170}
4171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004172if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004173 ac_compiler_gnu=yes
4174else
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004178ac_cv_c_compiler_gnu=$ac_compiler_gnu
4179
4180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4182$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4183if test $ac_compiler_gnu = yes; then
4184 GCC=yes
4185else
4186 GCC=
4187fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004188ac_test_CFLAGS=${CFLAGS+set}
4189ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4191$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004192if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004193 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004194else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195 ac_save_c_werror_flag=$ac_c_werror_flag
4196 ac_c_werror_flag=yes
4197 ac_cv_prog_cc_g=no
4198 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004201
Martin v. Löwis11437992002-04-12 09:54:03 +00004202int
4203main ()
4204{
4205
4206 ;
4207 return 0;
4208}
4209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004210if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004211 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004212else
Matthias Kloseb9621712010-04-24 17:59:49 +00004213 CFLAGS=""
4214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215/* end confdefs.h. */
4216
4217int
4218main ()
4219{
4220
4221 ;
4222 return 0;
4223}
4224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004225if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226
Matthias Kloseb9621712010-04-24 17:59:49 +00004227else
4228 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231/* end confdefs.h. */
4232
4233int
4234main ()
4235{
4236
4237 ;
4238 return 0;
4239}
4240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004241if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4249 ac_c_werror_flag=$ac_save_c_werror_flag
4250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4252$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004253if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004255elif test $ac_cv_prog_cc_g = yes; then
4256 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004257 CFLAGS="-g -O2"
4258 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004259 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260 fi
4261else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004262 if test "$GCC" = yes; then
4263 CFLAGS="-O2"
4264 else
4265 CFLAGS=
4266 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4269$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004270if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004271 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004272else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004274ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004276/* end confdefs.h. */
4277#include <stdarg.h>
4278#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004279struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004280/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4281struct buf { int x; };
4282FILE * (*rcsopen) (struct buf *, struct stat *, int);
4283static char *e (p, i)
4284 char **p;
4285 int i;
4286{
4287 return p[i];
4288}
4289static char *f (char * (*g) (char **, int), char **p, ...)
4290{
4291 char *s;
4292 va_list v;
4293 va_start (v,p);
4294 s = g (p, va_arg (v,int));
4295 va_end (v);
4296 return s;
4297}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004298
4299/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4300 function prototypes and stuff, but not '\xHH' hex character constants.
4301 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004303 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4304 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004306int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4307
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4309 inside strings and character constants. */
4310#define FOO(x) 'x'
4311int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4312
Skip Montanaro6dead952003-09-25 14:50:04 +00004313int test (int i, double x);
4314struct s1 {int (*f) (int a);};
4315struct s2 {int (*f) (double a);};
4316int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4317int argc;
4318char **argv;
4319int
4320main ()
4321{
4322return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4323 ;
4324 return 0;
4325}
4326_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4328 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004329do
4330 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004331 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334rm -f core conftest.err conftest.$ac_objext
4335 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004336done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004338CC=$ac_save_CC
4339
4340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341# AC_CACHE_VAL
4342case "x$ac_cv_prog_cc_c89" in
4343 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4345$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4348$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004349 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4352$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004353esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004354if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004355
Matthias Kloseb9621712010-04-24 17:59:49 +00004356fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004357
Martin v. Löwis11437992002-04-12 09:54:03 +00004358ac_ext=c
4359ac_cpp='$CPP $CPPFLAGS'
4360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4362ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004363
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004364
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004365
4366
Matthias Kloseb9621712010-04-24 17:59:49 +00004367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4368$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004369
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004371if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004373
4374 case $withval in
4375 no) with_cxx_main=no
4376 MAINCC='$(CC)';;
4377 yes) with_cxx_main=yes
4378 MAINCC='$(CXX)';;
4379 *) with_cxx_main=yes
4380 MAINCC=$withval
4381 if test -z "$CXX"
4382 then
4383 CXX=$withval
4384 fi;;
4385 esac
4386else
4387
4388 with_cxx_main=no
4389 MAINCC='$(CC)'
4390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391fi
4392
Matthias Kloseb9621712010-04-24 17:59:49 +00004393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4394$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004395
4396preset_cxx="$CXX"
4397if test -z "$CXX"
4398then
4399 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004400 gcc) if test -n "$ac_tool_prefix"; then
4401 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4402set dummy ${ac_tool_prefix}g++; ac_word=$2
4403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4404$as_echo_n "checking for $ac_word... " >&6; }
4405if ${ac_cv_path_CXX+:} false; then :
4406 $as_echo_n "(cached) " >&6
4407else
4408 case $CXX in
4409 [\\/]* | ?:[\\/]*)
4410 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4411 ;;
4412 *)
4413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4414for as_dir in notfound
4415do
4416 IFS=$as_save_IFS
4417 test -z "$as_dir" && as_dir=.
4418 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004419 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004420 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4421 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4422 break 2
4423 fi
4424done
4425 done
4426IFS=$as_save_IFS
4427
4428 ;;
4429esac
4430fi
4431CXX=$ac_cv_path_CXX
4432if test -n "$CXX"; then
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4434$as_echo "$CXX" >&6; }
4435else
4436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4437$as_echo "no" >&6; }
4438fi
4439
4440
4441fi
4442if test -z "$ac_cv_path_CXX"; then
4443 ac_pt_CXX=$CXX
4444 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004445set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4447$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004448if ${ac_cv_path_ac_pt_CXX+:} false; then :
4449 $as_echo_n "(cached) " >&6
4450else
4451 case $ac_pt_CXX in
4452 [\\/]* | ?:[\\/]*)
4453 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4454 ;;
4455 *)
4456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4457for as_dir in notfound
4458do
4459 IFS=$as_save_IFS
4460 test -z "$as_dir" && as_dir=.
4461 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004462 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004463 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4464 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4465 break 2
4466 fi
4467done
4468 done
4469IFS=$as_save_IFS
4470
4471 ;;
4472esac
4473fi
4474ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4475if test -n "$ac_pt_CXX"; then
4476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4477$as_echo "$ac_pt_CXX" >&6; }
4478else
4479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4480$as_echo "no" >&6; }
4481fi
4482
4483 if test "x$ac_pt_CXX" = x; then
4484 CXX="g++"
4485 else
4486 case $cross_compiling:$ac_tool_warned in
4487yes:)
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4489$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4490ac_tool_warned=yes ;;
4491esac
4492 CXX=$ac_pt_CXX
4493 fi
4494else
4495 CXX="$ac_cv_path_CXX"
4496fi
4497 ;;
4498 cc) if test -n "$ac_tool_prefix"; then
4499 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4500set dummy ${ac_tool_prefix}c++; ac_word=$2
4501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4502$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004503if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004504 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004505else
4506 case $CXX in
4507 [\\/]* | ?:[\\/]*)
4508 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4509 ;;
4510 *)
4511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4512for as_dir in notfound
4513do
4514 IFS=$as_save_IFS
4515 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004517 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004518 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004520 break 2
4521 fi
4522done
Matthias Kloseb9621712010-04-24 17:59:49 +00004523 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004524IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004525
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004526 ;;
4527esac
4528fi
4529CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004530if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4532$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004533else
Matthias Kloseb9621712010-04-24 17:59:49 +00004534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4535$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004537
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004538
4539fi
4540if test -z "$ac_cv_path_CXX"; then
4541 ac_pt_CXX=$CXX
4542 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004543set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4545$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004546if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004547 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004548else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004549 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004551 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 +00004552 ;;
4553 *)
4554 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4555for as_dir in notfound
4556do
4557 IFS=$as_save_IFS
4558 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004560 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004561 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004562 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004563 break 2
4564 fi
4565done
Matthias Kloseb9621712010-04-24 17:59:49 +00004566 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004567IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004568
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004569 ;;
4570esac
4571fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004572ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4573if test -n "$ac_pt_CXX"; then
4574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4575$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004576else
Matthias Kloseb9621712010-04-24 17:59:49 +00004577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4578$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004580
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004581 if test "x$ac_pt_CXX" = x; then
4582 CXX="c++"
4583 else
4584 case $cross_compiling:$ac_tool_warned in
4585yes:)
4586{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4587$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4588ac_tool_warned=yes ;;
4589esac
4590 CXX=$ac_pt_CXX
4591 fi
4592else
4593 CXX="$ac_cv_path_CXX"
4594fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004595 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004596 clang|*/clang) if test -n "$ac_tool_prefix"; then
4597 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4598set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4600$as_echo_n "checking for $ac_word... " >&6; }
4601if ${ac_cv_path_CXX+:} false; then :
4602 $as_echo_n "(cached) " >&6
4603else
4604 case $CXX in
4605 [\\/]* | ?:[\\/]*)
4606 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4607 ;;
4608 *)
4609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4610for as_dir in notfound
4611do
4612 IFS=$as_save_IFS
4613 test -z "$as_dir" && as_dir=.
4614 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004615 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004616 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4618 break 2
4619 fi
4620done
4621 done
4622IFS=$as_save_IFS
4623
Ned Deilycbfb9a52012-06-23 16:02:19 -07004624 ;;
4625esac
4626fi
4627CXX=$ac_cv_path_CXX
4628if test -n "$CXX"; then
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4630$as_echo "$CXX" >&6; }
4631else
4632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4633$as_echo "no" >&6; }
4634fi
4635
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004636
4637fi
4638if test -z "$ac_cv_path_CXX"; then
4639 ac_pt_CXX=$CXX
4640 # Extract the first word of "clang++", so it can be a program name with args.
4641set dummy clang++; ac_word=$2
4642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4643$as_echo_n "checking for $ac_word... " >&6; }
4644if ${ac_cv_path_ac_pt_CXX+:} false; then :
4645 $as_echo_n "(cached) " >&6
4646else
4647 case $ac_pt_CXX in
4648 [\\/]* | ?:[\\/]*)
4649 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4650 ;;
4651 *)
4652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4653for as_dir in notfound
4654do
4655 IFS=$as_save_IFS
4656 test -z "$as_dir" && as_dir=.
4657 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004659 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4661 break 2
4662 fi
4663done
4664 done
4665IFS=$as_save_IFS
4666
4667 ;;
4668esac
4669fi
4670ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4671if test -n "$ac_pt_CXX"; then
4672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4673$as_echo "$ac_pt_CXX" >&6; }
4674else
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4676$as_echo "no" >&6; }
4677fi
4678
4679 if test "x$ac_pt_CXX" = x; then
4680 CXX="clang++"
4681 else
4682 case $cross_compiling:$ac_tool_warned in
4683yes:)
4684{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4685$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4686ac_tool_warned=yes ;;
4687esac
4688 CXX=$ac_pt_CXX
4689 fi
4690else
4691 CXX="$ac_cv_path_CXX"
4692fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004693 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004694 esac
4695 if test "$CXX" = "notfound"
4696 then
4697 CXX=""
4698 fi
4699fi
4700if test -z "$CXX"
4701then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004702 if test -n "$ac_tool_prefix"; then
4703 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4704 do
4705 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4706set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4708$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004709if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004710 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004711else
4712 if test -n "$CXX"; then
4713 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4714else
4715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4716for as_dir in $PATH
4717do
4718 IFS=$as_save_IFS
4719 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004720 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004721 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004722 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004724 break 2
4725 fi
4726done
Matthias Kloseb9621712010-04-24 17:59:49 +00004727 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004728IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004729
4730fi
4731fi
4732CXX=$ac_cv_prog_CXX
4733if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4735$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736else
Matthias Kloseb9621712010-04-24 17:59:49 +00004737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4738$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739fi
4740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004741
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004742 test -n "$CXX" && break
4743 done
4744fi
4745if test -z "$CXX"; then
4746 ac_ct_CXX=$CXX
4747 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4748do
4749 # Extract the first word of "$ac_prog", so it can be a program name with args.
4750set dummy $ac_prog; ac_word=$2
4751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4752$as_echo_n "checking for $ac_word... " >&6; }
4753if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4754 $as_echo_n "(cached) " >&6
4755else
4756 if test -n "$ac_ct_CXX"; then
4757 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4758else
4759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4760for as_dir in $PATH
4761do
4762 IFS=$as_save_IFS
4763 test -z "$as_dir" && as_dir=.
4764 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004765 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766 ac_cv_prog_ac_ct_CXX="$ac_prog"
4767 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4768 break 2
4769 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771 done
4772IFS=$as_save_IFS
4773
4774fi
4775fi
4776ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4777if test -n "$ac_ct_CXX"; then
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4779$as_echo "$ac_ct_CXX" >&6; }
4780else
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4782$as_echo "no" >&6; }
4783fi
4784
4785
4786 test -n "$ac_ct_CXX" && break
4787done
4788
4789 if test "x$ac_ct_CXX" = x; then
4790 CXX="notfound"
4791 else
4792 case $cross_compiling:$ac_tool_warned in
4793yes:)
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4795$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4796ac_tool_warned=yes ;;
4797esac
4798 CXX=$ac_ct_CXX
4799 fi
4800fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801
4802 if test "$CXX" = "notfound"
4803 then
4804 CXX=""
4805 fi
4806fi
4807if test "$preset_cxx" != "$CXX"
4808then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004809 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810
4811 By default, distutils will build C++ extension modules with \"$CXX\".
4812 If this is not intended, then set CXX on the configure command line.
4813 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004814$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815
4816 By default, distutils will build C++ extension modules with \"$CXX\".
4817 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004818 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819fi
4820
4821
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4823$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4824save_LDFLAGS="$LDFLAGS"
4825LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004826
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4828/* end confdefs.h. */
4829
4830int
4831main ()
4832{
4833
4834 ;
4835 return 0;
4836}
4837_ACEOF
4838if ac_fn_c_try_link "$LINENO"; then :
4839 NO_AS_NEEDED="-Wl,--no-as-needed"
4840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4841$as_echo "yes" >&6; }
4842else
4843 NO_AS_NEEDED=""
4844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4845$as_echo "no" >&6; }
4846fi
4847rm -f core conftest.err conftest.$ac_objext \
4848 conftest$ac_exeext conftest.$ac_ext
4849LDFLAGS="$save_LDFLAGS"
4850
4851
4852
4853# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004854ac_ext=c
4855ac_cpp='$CPP $CPPFLAGS'
4856ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4857ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4858ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4860$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004861# On Suns, sometimes $CPP names a directory.
4862if test -n "$CPP" && test -d "$CPP"; then
4863 CPP=
4864fi
4865if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004866 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004867 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004868else
Martin v. Löwis11437992002-04-12 09:54:03 +00004869 # Double quotes because CPP needs to be expanded
4870 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4871 do
4872 ac_preproc_ok=false
4873for ac_c_preproc_warn_flag in '' yes
4874do
4875 # Use a header file that comes with gcc, so configuring glibc
4876 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004877 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4878 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004879 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004880 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004882/* end confdefs.h. */
4883#ifdef __STDC__
4884# include <limits.h>
4885#else
4886# include <assert.h>
4887#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004888 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004890if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004891
Matthias Kloseb9621712010-04-24 17:59:49 +00004892else
Martin v. Löwis11437992002-04-12 09:54:03 +00004893 # Broken: fails on valid input.
4894continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004895fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004896rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004898 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004899 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004902#include <ac_nonexistent.h>
4903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004904if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004905 # Broken: success on invalid input.
4906continue
4907else
Martin v. Löwis11437992002-04-12 09:54:03 +00004908 # Passes both tests.
4909ac_preproc_ok=:
4910break
4911fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004912rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004913
4914done
4915# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004916rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004917if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004918 break
4919fi
4920
4921 done
4922 ac_cv_prog_CPP=$CPP
4923
4924fi
4925 CPP=$ac_cv_prog_CPP
4926else
4927 ac_cv_prog_CPP=$CPP
4928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4930$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004931ac_preproc_ok=false
4932for ac_c_preproc_warn_flag in '' yes
4933do
4934 # Use a header file that comes with gcc, so configuring glibc
4935 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004936 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4937 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004938 # On the NeXT, cc -E runs the code through the compiler's parser,
4939 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004941/* end confdefs.h. */
4942#ifdef __STDC__
4943# include <limits.h>
4944#else
4945# include <assert.h>
4946#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004947 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004949if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004950
Matthias Kloseb9621712010-04-24 17:59:49 +00004951else
Martin v. Löwis11437992002-04-12 09:54:03 +00004952 # Broken: fails on valid input.
4953continue
4954fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004955rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004957 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004958 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004961#include <ac_nonexistent.h>
4962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004963if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004964 # Broken: success on invalid input.
4965continue
4966else
Martin v. Löwis11437992002-04-12 09:54:03 +00004967 # Passes both tests.
4968ac_preproc_ok=:
4969break
4970fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004971rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004972
4973done
4974# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004975rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004976if $ac_preproc_ok; then :
4977
Martin v. Löwis11437992002-04-12 09:54:03 +00004978else
Matthias Kloseb9621712010-04-24 17:59:49 +00004979 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4980$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004981as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004982See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004983fi
4984
4985ac_ext=c
4986ac_cpp='$CPP $CPPFLAGS'
4987ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4988ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4989ac_compiler_gnu=$ac_cv_c_compiler_gnu
4990
4991
Matthias Kloseb9621712010-04-24 17:59:49 +00004992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4993$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004994if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004996else
Matthias Kloseb9621712010-04-24 17:59:49 +00004997 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004998 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004999 # Loop through the user's path and test for each of PROGNAME-LIST
5000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005001for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5002do
5003 IFS=$as_save_IFS
5004 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005005 for ac_prog in grep ggrep; do
5006 for ac_exec_ext in '' $ac_executable_extensions; do
5007 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005008 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005009# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005010 # Check for GNU $ac_path_GREP
5011case `"$ac_path_GREP" --version 2>&1` in
5012*GNU*)
5013 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5014*)
5015 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005017 while :
5018 do
5019 cat "conftest.in" "conftest.in" >"conftest.tmp"
5020 mv "conftest.tmp" "conftest.in"
5021 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005023 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5024 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5027 # Best one so far, save it but keep looking for a better one
5028 ac_cv_path_GREP="$ac_path_GREP"
5029 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005030 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005031 # 10*(2^10) chars as input seems more than enough
5032 test $ac_count -gt 10 && break
5033 done
5034 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5035esac
5036
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 $ac_path_GREP_found && break 3
5038 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005039 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005041IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005043 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 +00005044 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005045else
5046 ac_cv_path_GREP=$GREP
5047fi
5048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5051$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005052 GREP="$ac_cv_path_GREP"
5053
5054
Matthias Kloseb9621712010-04-24 17:59:49 +00005055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5056$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005057if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059else
5060 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5061 then ac_cv_path_EGREP="$GREP -E"
5062 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 # Loop through the user's path and test for each of PROGNAME-LIST
5066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005067for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5068do
5069 IFS=$as_save_IFS
5070 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 for ac_prog in egrep; do
5072 for ac_exec_ext in '' $ac_executable_extensions; do
5073 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005074 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005075# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005076 # Check for GNU $ac_path_EGREP
5077case `"$ac_path_EGREP" --version 2>&1` in
5078*GNU*)
5079 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5080*)
5081 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005083 while :
5084 do
5085 cat "conftest.in" "conftest.in" >"conftest.tmp"
5086 mv "conftest.tmp" "conftest.in"
5087 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5090 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5093 # Best one so far, save it but keep looking for a better one
5094 ac_cv_path_EGREP="$ac_path_EGREP"
5095 ac_path_EGREP_max=$ac_count
5096 fi
5097 # 10*(2^10) chars as input seems more than enough
5098 test $ac_count -gt 10 && break
5099 done
5100 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5101esac
5102
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 $ac_path_EGREP_found && break 3
5104 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005105 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005107IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005109 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 +00005110 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005111else
5112 ac_cv_path_EGREP=$EGREP
5113fi
5114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005115 fi
5116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5118$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005119 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005120
5121
Matthias Kloseb9621712010-04-24 17:59:49 +00005122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5123$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005124if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 $as_echo_n "(cached) " >&6
5126else
5127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005128/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005129#include <stdlib.h>
5130#include <stdarg.h>
5131#include <string.h>
5132#include <float.h>
5133
5134int
5135main ()
5136{
5137
5138 ;
5139 return 0;
5140}
5141_ACEOF
5142if ac_fn_c_try_compile "$LINENO"; then :
5143 ac_cv_header_stdc=yes
5144else
5145 ac_cv_header_stdc=no
5146fi
5147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5148
5149if test $ac_cv_header_stdc = yes; then
5150 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5152/* end confdefs.h. */
5153#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005154
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005155_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005159else
Matthias Kloseb9621712010-04-24 17:59:49 +00005160 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005161fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005162rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005163
Matthias Kloseb9621712010-04-24 17:59:49 +00005164fi
5165
5166if test $ac_cv_header_stdc = yes; then
5167 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5169/* end confdefs.h. */
5170#include <stdlib.h>
5171
5172_ACEOF
5173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5174 $EGREP "free" >/dev/null 2>&1; then :
5175
5176else
5177 ac_cv_header_stdc=no
5178fi
5179rm -f conftest*
5180
5181fi
5182
5183if test $ac_cv_header_stdc = yes; then
5184 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5185 if test "$cross_compiling" = yes; then :
5186 :
5187else
5188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5189/* end confdefs.h. */
5190#include <ctype.h>
5191#include <stdlib.h>
5192#if ((' ' & 0x0FF) == 0x020)
5193# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5194# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5195#else
5196# define ISLOWER(c) \
5197 (('a' <= (c) && (c) <= 'i') \
5198 || ('j' <= (c) && (c) <= 'r') \
5199 || ('s' <= (c) && (c) <= 'z'))
5200# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5201#endif
5202
5203#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5204int
5205main ()
5206{
5207 int i;
5208 for (i = 0; i < 256; i++)
5209 if (XOR (islower (i), ISLOWER (i))
5210 || toupper (i) != TOUPPER (i))
5211 return 2;
5212 return 0;
5213}
5214_ACEOF
5215if ac_fn_c_try_run "$LINENO"; then :
5216
5217else
5218 ac_cv_header_stdc=no
5219fi
5220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5221 conftest.$ac_objext conftest.beam conftest.$ac_ext
5222fi
5223
5224fi
5225fi
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5227$as_echo "$ac_cv_header_stdc" >&6; }
5228if test $ac_cv_header_stdc = yes; then
5229
5230$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5231
5232fi
5233
5234# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5235for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5236 inttypes.h stdint.h unistd.h
5237do :
5238 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5239ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5240"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005241if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005242 cat >>confdefs.h <<_ACEOF
5243#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5244_ACEOF
5245
5246fi
5247
5248done
5249
5250
5251
5252 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 +02005253if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005254 MINIX=yes
5255else
5256 MINIX=
5257fi
5258
5259
5260 if test "$MINIX" = yes; then
5261
5262$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5263
5264
5265$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5266
5267
5268$as_echo "#define _MINIX 1" >>confdefs.h
5269
5270 fi
5271
5272
5273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5274$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005275if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005276 $as_echo_n "(cached) " >&6
5277else
5278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5279/* end confdefs.h. */
5280
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005281# define __EXTENSIONS__ 1
5282 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005283int
5284main ()
5285{
5286
5287 ;
5288 return 0;
5289}
5290_ACEOF
5291if ac_fn_c_try_compile "$LINENO"; then :
5292 ac_cv_safe_to_define___extensions__=yes
5293else
5294 ac_cv_safe_to_define___extensions__=no
5295fi
5296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5297fi
5298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5299$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5300 test $ac_cv_safe_to_define___extensions__ = yes &&
5301 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5302
5303 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5304
5305 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5306
5307 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5308
5309 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5310
5311
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313# Check for unsupported systems
5314case $ac_sys_system/$ac_sys_release in
5315atheos*|Linux*/1*)
5316 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5317 echo See README for details.
5318 exit 1;;
5319esac
5320
5321
Matthias Kloseb9621712010-04-24 17:59:49 +00005322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5323$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324
5325# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005326if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327 withval=$with_suffix;
5328 case $withval in
5329 no) EXEEXT=;;
5330 yes) EXEEXT=.exe;;
5331 *) EXEEXT=$withval;;
5332 esac
5333fi
5334
Matthias Kloseb9621712010-04-24 17:59:49 +00005335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5336$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337
5338# Test whether we're running on a non-case-sensitive system, in which
5339# case we give a warning if no ext is given
5340
Matthias Kloseb9621712010-04-24 17:59:49 +00005341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5342$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343if test ! -d CaseSensitiveTestDir; then
5344mkdir CaseSensitiveTestDir
5345fi
5346
5347if test -d casesensitivetestdir
5348then
Matthias Kloseb9621712010-04-24 17:59:49 +00005349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5350$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351 BUILDEXEEXT=.exe
5352else
Matthias Kloseb9621712010-04-24 17:59:49 +00005353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5354$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355 BUILDEXEEXT=$EXEEXT
5356fi
5357rmdir CaseSensitiveTestDir
5358
5359case $MACHDEP in
5360bsdos*)
5361 case $CC in
5362 gcc) CC="$CC -D_HAVE_BSDI";;
5363 esac;;
5364esac
5365
5366case $ac_sys_system in
5367hp*|HP*)
5368 case $CC in
5369 cc|*/cc) CC="$CC -Ae";;
5370 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371esac
5372
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005373MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5374
5375
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376
5377
Matthias Kloseb9621712010-04-24 17:59:49 +00005378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5379$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380if test -z "$LIBRARY"
5381then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005382 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5385$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386
5387# LDLIBRARY is the name of the library to link against (as opposed to the
5388# name of the library into which to insert object files). BLDLIBRARY is also
5389# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5390# is blank as the main program is not linked directly against LDLIBRARY.
5391# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5392# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5393# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5394# DLLLIBRARY is the shared (i.e., DLL) library.
5395#
5396# RUNSHARED is used to run shared python without installed libraries
5397#
5398# INSTSONAME is the name of the shared library that will be use to install
5399# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005400#
5401# LDVERSION is the shared library version number, normally the Python version
5402# with the ABI build flags appended.
5403
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
5405
5406
5407
5408
5409
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005410
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411LDLIBRARY="$LIBRARY"
5412BLDLIBRARY='$(LDLIBRARY)'
5413INSTSONAME='$(LDLIBRARY)'
5414DLLLIBRARY=''
5415LDLIBRARYDIR=''
5416RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005417LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418
5419# LINKCC is the command that links the python executable -- default is $(CC).
5420# If CXX is set, and if it is needed to link a main function that was
5421# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5422# python might then depend on the C++ runtime
5423# This is altered for AIX in order to build the export list before
5424# linking.
5425
Matthias Kloseb9621712010-04-24 17:59:49 +00005426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5427$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428if test -z "$LINKCC"
5429then
5430 LINKCC='$(PURIFY) $(MAINCC)'
5431 case $ac_sys_system in
5432 AIX*)
5433 exp_extra="\"\""
5434 if test $ac_sys_release -ge 5 -o \
5435 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5436 exp_extra="."
5437 fi
5438 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439 QNX*)
5440 # qcc must be used because the other compilers do not
5441 # support -N.
5442 LINKCC=qcc;;
5443 esac
5444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5446$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447
5448# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5449# make sure we default having it set to "no": this is used by
5450# distutils.unixccompiler to know if it should add --enable-new-dtags
5451# to linker command lines, and failing to detect GNU ld simply results
5452# in the same bahaviour as before.
5453
Matthias Kloseb9621712010-04-24 17:59:49 +00005454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5455$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456ac_prog=ld
5457if test "$GCC" = yes; then
5458 ac_prog=`$CC -print-prog-name=ld`
5459fi
5460case `"$ac_prog" -V 2>&1 < /dev/null` in
5461 *GNU*)
5462 GNULD=yes;;
5463 *)
5464 GNULD=no;;
5465esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5467$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5470$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005471if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005472 $as_echo_n "(cached) " >&6
5473else
5474 ac_cv_c_inline=no
5475for ac_kw in inline __inline__ __inline; do
5476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5477/* end confdefs.h. */
5478#ifndef __cplusplus
5479typedef int foo_t;
5480static $ac_kw foo_t static_foo () {return 0; }
5481$ac_kw foo_t foo () {return 0; }
5482#endif
5483
5484_ACEOF
5485if ac_fn_c_try_compile "$LINENO"; then :
5486 ac_cv_c_inline=$ac_kw
5487fi
5488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5489 test "$ac_cv_c_inline" != no && break
5490done
5491
5492fi
5493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5494$as_echo "$ac_cv_c_inline" >&6; }
5495
5496case $ac_cv_c_inline in
5497 inline | yes) ;;
5498 *)
5499 case $ac_cv_c_inline in
5500 no) ac_val=;;
5501 *) ac_val=$ac_cv_c_inline;;
5502 esac
5503 cat >>confdefs.h <<_ACEOF
5504#ifndef __cplusplus
5505#define inline $ac_val
5506#endif
5507_ACEOF
5508 ;;
5509esac
5510
5511if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005512
5513$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005514
5515
5516fi
5517
5518
Matthias Kloseb9621712010-04-24 17:59:49 +00005519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5520$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005521# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005522if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005523 enableval=$enable_shared;
5524fi
5525
5526
5527if test -z "$enable_shared"
5528then
5529 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005530 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531 enable_shared="yes";;
5532 *)
5533 enable_shared="no";;
5534 esac
5535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5537$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538
Matthias Kloseb9621712010-04-24 17:59:49 +00005539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5540$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005542if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005543 enableval=$enable_profiling;
5544fi
5545
5546if test "x$enable_profiling" = xyes; then
5547 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005548 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550/* end confdefs.h. */
5551int main() { return 0; }
5552_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005553if ac_fn_c_try_link "$LINENO"; then :
5554
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005556 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005557fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005558rm -f core conftest.err conftest.$ac_objext \
5559 conftest$ac_exeext conftest.$ac_ext
5560 CC="$ac_save_cc"
5561else
5562 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5565$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566
doko@ubuntu.comba015832012-06-30 16:52:05 +02005567if test "x$enable_profiling" = xyes; then
5568 BASECFLAGS="-pg $BASECFLAGS"
5569 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570fi
5571
Matthias Kloseb9621712010-04-24 17:59:49 +00005572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5573$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005574
5575# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5576# library that we build, but we do not want to link against it (we
5577# will find it with a -framework option). For this reason there is an
5578# extra variable BLDLIBRARY against which Python and the extension
5579# modules are linked, BLDLIBRARY. This is normally the same as
5580# LDLIBRARY, but empty for MacOSX framework builds.
5581if test "$enable_framework"
5582then
5583 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5584 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5585 BLDLIBRARY=''
5586else
5587 BLDLIBRARY='$(LDLIBRARY)'
5588fi
5589
5590# Other platforms follow
5591if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005592 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593
Matthias Kloseb9621712010-04-24 17:59:49 +00005594$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595
5596 case $ac_sys_system in
5597 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005598 LDLIBRARY='libpython$(LDVERSION).dll.a'
5599 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005600 ;;
5601 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005602 LDLIBRARY='libpython$(LDVERSION).so'
5603 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5605 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005606 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005607 then
5608 PY3LIBRARY=libpython3.so
5609 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005611 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005612 LDLIBRARY='libpython$(LDVERSION).so'
5613 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5615 case $ac_sys_system in
5616 FreeBSD*)
5617 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5618 ;;
5619 esac
5620 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005621 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005622 then
5623 PY3LIBRARY=libpython3.so
5624 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625 ;;
5626 hp*|HP*)
5627 case `uname -m` in
5628 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005629 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 ;;
5631 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005632 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633 ;;
5634 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005635 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005636 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5637 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005639 LDLIBRARY='libpython$(LDVERSION).dylib'
5640 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5642 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005643 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005644 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005645 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5646 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647
5648 esac
5649else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005650 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651 case $ac_sys_system in
5652 CYGWIN*)
5653 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005654 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 ;;
5656 esac
5657fi
5658
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005659if test "$cross_compiling" = yes; then
5660 RUNSHARED=
5661fi
5662
Matthias Kloseb9621712010-04-24 17:59:49 +00005663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5664$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665
5666if test -n "$ac_tool_prefix"; then
5667 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5668set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5670$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005671if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005672 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673else
5674 if test -n "$RANLIB"; then
5675 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5676else
5677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5678for as_dir in $PATH
5679do
5680 IFS=$as_save_IFS
5681 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005682 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686 break 2
5687 fi
5688done
Matthias Kloseb9621712010-04-24 17:59:49 +00005689 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690IFS=$as_save_IFS
5691
5692fi
5693fi
5694RANLIB=$ac_cv_prog_RANLIB
5695if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5697$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698else
Matthias Kloseb9621712010-04-24 17:59:49 +00005699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701fi
5702
5703
5704fi
5705if test -z "$ac_cv_prog_RANLIB"; then
5706 ac_ct_RANLIB=$RANLIB
5707 # Extract the first word of "ranlib", so it can be a program name with args.
5708set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005711if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005712 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713else
5714 if test -n "$ac_ct_RANLIB"; then
5715 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5716else
5717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5718for as_dir in $PATH
5719do
5720 IFS=$as_save_IFS
5721 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726 break 2
5727 fi
5728done
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730IFS=$as_save_IFS
5731
5732fi
5733fi
5734ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5735if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5737$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738else
Matthias Kloseb9621712010-04-24 17:59:49 +00005739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5740$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741fi
5742
5743 if test "x$ac_ct_RANLIB" = x; then
5744 RANLIB=":"
5745 else
5746 case $cross_compiling:$ac_tool_warned in
5747yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750ac_tool_warned=yes ;;
5751esac
5752 RANLIB=$ac_ct_RANLIB
5753 fi
5754else
5755 RANLIB="$ac_cv_prog_RANLIB"
5756fi
5757
5758
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005759if test -n "$ac_tool_prefix"; then
5760 for ac_prog in ar aal
5761 do
5762 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5763set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5765$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005766if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768else
5769 if test -n "$AR"; then
5770 ac_cv_prog_AR="$AR" # Let the user override the test.
5771else
5772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5773for as_dir in $PATH
5774do
5775 IFS=$as_save_IFS
5776 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005778 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005779 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781 break 2
5782 fi
5783done
Matthias Kloseb9621712010-04-24 17:59:49 +00005784 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785IFS=$as_save_IFS
5786
5787fi
5788fi
5789AR=$ac_cv_prog_AR
5790if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5792$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793else
Matthias Kloseb9621712010-04-24 17:59:49 +00005794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796fi
5797
5798
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005799 test -n "$AR" && break
5800 done
5801fi
5802if test -z "$AR"; then
5803 ac_ct_AR=$AR
5804 for ac_prog in ar aal
5805do
5806 # Extract the first word of "$ac_prog", so it can be a program name with args.
5807set dummy $ac_prog; ac_word=$2
5808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5809$as_echo_n "checking for $ac_word... " >&6; }
5810if ${ac_cv_prog_ac_ct_AR+:} false; then :
5811 $as_echo_n "(cached) " >&6
5812else
5813 if test -n "$ac_ct_AR"; then
5814 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5815else
5816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5817for as_dir in $PATH
5818do
5819 IFS=$as_save_IFS
5820 test -z "$as_dir" && as_dir=.
5821 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005822 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005823 ac_cv_prog_ac_ct_AR="$ac_prog"
5824 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5825 break 2
5826 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005828 done
5829IFS=$as_save_IFS
5830
5831fi
5832fi
5833ac_ct_AR=$ac_cv_prog_ac_ct_AR
5834if test -n "$ac_ct_AR"; then
5835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5836$as_echo "$ac_ct_AR" >&6; }
5837else
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5839$as_echo "no" >&6; }
5840fi
5841
5842
5843 test -n "$ac_ct_AR" && break
5844done
5845
5846 if test "x$ac_ct_AR" = x; then
5847 AR="ar"
5848 else
5849 case $cross_compiling:$ac_tool_warned in
5850yes:)
5851{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5852$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5853ac_tool_warned=yes ;;
5854esac
5855 AR=$ac_ct_AR
5856 fi
5857fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
5859
5860# tweak ARFLAGS only if the user didn't set it on the command line
5861
5862if test -z "$ARFLAGS"
5863then
5864 ARFLAGS="rc"
5865fi
5866
doko@ubuntu.com58844492012-06-30 18:25:32 +02005867if test -n "$ac_tool_prefix"; then
5868 for ac_prog in readelf
5869 do
5870 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5871set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5873$as_echo_n "checking for $ac_word... " >&6; }
5874if ${ac_cv_prog_READELF+:} false; then :
5875 $as_echo_n "(cached) " >&6
5876else
5877 if test -n "$READELF"; then
5878 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5879else
5880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5881for as_dir in $PATH
5882do
5883 IFS=$as_save_IFS
5884 test -z "$as_dir" && as_dir=.
5885 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005887 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5889 break 2
5890 fi
5891done
5892 done
5893IFS=$as_save_IFS
5894
5895fi
5896fi
5897READELF=$ac_cv_prog_READELF
5898if test -n "$READELF"; then
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5900$as_echo "$READELF" >&6; }
5901else
5902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5903$as_echo "no" >&6; }
5904fi
5905
5906
5907 test -n "$READELF" && break
5908 done
5909fi
5910if test -z "$READELF"; then
5911 ac_ct_READELF=$READELF
5912 for ac_prog in readelf
5913do
5914 # Extract the first word of "$ac_prog", so it can be a program name with args.
5915set dummy $ac_prog; ac_word=$2
5916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5917$as_echo_n "checking for $ac_word... " >&6; }
5918if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5919 $as_echo_n "(cached) " >&6
5920else
5921 if test -n "$ac_ct_READELF"; then
5922 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5923else
5924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5925for as_dir in $PATH
5926do
5927 IFS=$as_save_IFS
5928 test -z "$as_dir" && as_dir=.
5929 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005930 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005931 ac_cv_prog_ac_ct_READELF="$ac_prog"
5932 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5933 break 2
5934 fi
5935done
5936 done
5937IFS=$as_save_IFS
5938
5939fi
5940fi
5941ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5942if test -n "$ac_ct_READELF"; then
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5944$as_echo "$ac_ct_READELF" >&6; }
5945else
5946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948fi
5949
5950
5951 test -n "$ac_ct_READELF" && break
5952done
5953
5954 if test "x$ac_ct_READELF" = x; then
5955 READELF=":"
5956 else
5957 case $cross_compiling:$ac_tool_warned in
5958yes:)
5959{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5960$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5961ac_tool_warned=yes ;;
5962esac
5963 READELF=$ac_ct_READELF
5964 fi
5965fi
5966
5967if test "$cross_compiling" = yes; then
5968 case "$READELF" in
5969 readelf|:)
5970 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5971 ;;
5972 esac
5973fi
5974
5975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976
Matthias Klosec4c48422012-10-21 23:05:35 +02005977for ac_prog in python$PACKAGE_VERSION python3 python
5978do
5979 # Extract the first word of "$ac_prog", so it can be a program name with args.
5980set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5982$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005983if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005984 $as_echo_n "(cached) " >&6
5985else
Matthias Klosec4c48422012-10-21 23:05:35 +02005986 if test -n "$PYTHON"; then
5987 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005988else
5989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5990for as_dir in $PATH
5991do
5992 IFS=$as_save_IFS
5993 test -z "$as_dir" && as_dir=.
5994 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005995 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005996 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005997 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5998 break 2
5999 fi
6000done
6001 done
6002IFS=$as_save_IFS
6003
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006004fi
6005fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006006PYTHON=$ac_cv_prog_PYTHON
6007if test -n "$PYTHON"; then
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6009$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006010else
6011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6012$as_echo "no" >&6; }
6013fi
6014
6015
Matthias Klosec4c48422012-10-21 23:05:35 +02006016 test -n "$PYTHON" && break
6017done
6018test -n "$PYTHON" || PYTHON="not-found"
6019
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006020if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006021 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6022else
6023 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006024fi
6025
6026
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027case $MACHDEP in
6028bsdos*|hp*|HP*)
6029 # install -d does not work on BSDI or HP-UX
6030 if test -z "$INSTALL"
6031 then
6032 INSTALL="${srcdir}/install-sh -c"
6033 fi
6034esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035# Find a good install program. We prefer a C program (faster),
6036# so one script is as good as another. But avoid the broken or
6037# incompatible versions:
6038# SysV /etc/install, /usr/sbin/install
6039# SunOS /usr/etc/install
6040# IRIX /sbin/install
6041# AIX /bin/install
6042# AmigaOS /C/install, which installs bootblocks on floppy discs
6043# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6044# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6045# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6046# OS/2's system install, which has a completely different semantic
6047# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006048# Reject install programs that cannot install multiple files.
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6050$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006052if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054else
6055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6056for as_dir in $PATH
6057do
6058 IFS=$as_save_IFS
6059 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 # Account for people who put trailing slashes in PATH elements.
6061case $as_dir/ in #((
6062 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006064 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065 /usr/ucb/* ) ;;
6066 *)
6067 # OSF1 and SCO ODT 3.0 have their own names for install.
6068 # Don't use installbsd from OSF since it installs stuff as root
6069 # by default.
6070 for ac_prog in ginstall scoinst install; do
6071 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006072 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073 if test $ac_prog = install &&
6074 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6075 # AIX install. It has an incompatible calling convention.
6076 :
6077 elif test $ac_prog = install &&
6078 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6079 # program-specific install script used by HP pwplus--don't use.
6080 :
6081 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 rm -rf conftest.one conftest.two conftest.dir
6083 echo one > conftest.one
6084 echo two > conftest.two
6085 mkdir conftest.dir
6086 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6087 test -s conftest.one && test -s conftest.two &&
6088 test -s conftest.dir/conftest.one &&
6089 test -s conftest.dir/conftest.two
6090 then
6091 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6092 break 3
6093 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094 fi
6095 fi
6096 done
6097 done
6098 ;;
6099esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006100
6101 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102IFS=$as_save_IFS
6103
Matthias Kloseb9621712010-04-24 17:59:49 +00006104rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105
6106fi
6107 if test "${ac_cv_path_install+set}" = set; then
6108 INSTALL=$ac_cv_path_install
6109 else
6110 # As a last resort, use the slow shell script. Don't cache a
6111 # value for INSTALL within a source directory, because that will
6112 # break other packages using the cache if that directory is
6113 # removed, or if the value is a relative name.
6114 INSTALL=$ac_install_sh
6115 fi
6116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6118$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006119
6120# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6121# It thinks the first close brace ends the variable substitution.
6122test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6123
6124test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6125
6126test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6127
Matthias Klose93a0ef12012-03-15 18:08:34 +01006128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6129$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6130if test -z "$MKDIR_P"; then
6131 if ${ac_cv_path_mkdir+:} false; then :
6132 $as_echo_n "(cached) " >&6
6133else
6134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6136do
6137 IFS=$as_save_IFS
6138 test -z "$as_dir" && as_dir=.
6139 for ac_prog in mkdir gmkdir; do
6140 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006141 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006142 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6143 'mkdir (GNU coreutils) '* | \
6144 'mkdir (coreutils) '* | \
6145 'mkdir (fileutils) '4.1*)
6146 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6147 break 3;;
6148 esac
6149 done
6150 done
6151 done
6152IFS=$as_save_IFS
6153
6154fi
6155
6156 test -d ./--version && rmdir ./--version
6157 if test "${ac_cv_path_mkdir+set}" = set; then
6158 MKDIR_P="$ac_cv_path_mkdir -p"
6159 else
6160 # As a last resort, use the slow shell script. Don't cache a
6161 # value for MKDIR_P within a source directory, because that will
6162 # break other packages using the cache if that directory is
6163 # removed, or if the value is a relative name.
6164 MKDIR_P="$ac_install_sh -d"
6165 fi
6166fi
6167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6168$as_echo "$MKDIR_P" >&6; }
6169
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170
6171# Not every filesystem supports hard links
6172
6173if test -z "$LN" ; then
6174 case $ac_sys_system in
6175 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176 *) LN=ln;;
6177 esac
6178fi
6179
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006180# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006181
6182ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006183
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6186$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187
6188# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006189if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190 withval=$with_pydebug;
6191if test "$withval" != no
6192then
6193
Matthias Kloseb9621712010-04-24 17:59:49 +00006194$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195
Matthias Kloseb9621712010-04-24 17:59:49 +00006196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6197$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006199 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006200else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6201$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202fi
6203else
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006206fi
6207
6208
6209# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6210# merged with this chunk of code?
6211
6212# Optimizer/debugger flags
6213# ------------------------
6214# (The following bit of code is complicated enough - please keep things
6215# indented properly. Just pretend you're editing Python code. ;-)
6216
6217# There are two parallel sets of case statements below, one that checks to
6218# see if OPT was set and one that does BASECFLAGS setting based upon
6219# compiler and platform. BASECFLAGS tweaks need to be made even if the
6220# user set OPT.
6221
6222# tweak OPT based on compiler and platform, only if the user didn't set
6223# it on the command line
6224
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006225if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226then
6227 case $GCC in
6228 yes)
6229 if test "$CC" != 'g++' ; then
6230 STRICT_PROTO="-Wstrict-prototypes"
6231 fi
6232 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6233 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6234 WRAP="-fwrapv"
6235 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006236
6237 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006238 case $CC in
6239 *clang*) WRAP="-fwrapv"
6240 ;;
6241 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006242
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243 case $ac_cv_prog_cc_g in
6244 yes)
6245 if test "$Py_DEBUG" = 'true' ; then
6246 # Optimization messes up debuggers, so turn it off for
6247 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006248 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249 else
6250 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6251 fi
6252 ;;
6253 *)
6254 OPT="-O3 -Wall $STRICT_PROTO"
6255 ;;
6256 esac
6257 case $ac_sys_system in
6258 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6259 ;;
6260 esac
6261 ;;
6262
6263 *)
6264 OPT="-O"
6265 ;;
6266 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267fi
6268
6269
6270
6271# The -arch flags for universal builds on OSX
6272UNIVERSAL_ARCH_FLAGS=
6273
6274
6275# tweak BASECFLAGS based on compiler and platform
6276case $GCC in
6277yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006278 # Python doesn't violate C99 aliasing rules, but older versions of
6279 # GCC produce warnings for legal Python code. Enable
6280 # -fno-strict-aliasing on versions of GCC that support but produce
6281 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6283$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284 ac_save_cc="$CC"
6285 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006286 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006287 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006288 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006289else
Matthias Kloseb9621712010-04-24 17:59:49 +00006290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006292
Matthias Kloseb159a552010-04-25 21:00:44 +00006293
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006294int
6295main ()
6296{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006297
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006298 ;
6299 return 0;
6300}
Matthias Kloseb159a552010-04-25 21:00:44 +00006301
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006303if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006304
6305 CC="$ac_save_cc -fstrict-aliasing"
6306 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006308/* end confdefs.h. */
6309
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006310 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006311int
6312main ()
6313{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006314double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006315 ;
6316 return 0;
6317}
Matthias Kloseb159a552010-04-25 21:00:44 +00006318
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006320if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006321
6322 ac_cv_no_strict_aliasing=no
6323
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324else
Matthias Kloseb159a552010-04-25 21:00:44 +00006325
6326 ac_cv_no_strict_aliasing=yes
6327
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006328fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006330
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006331else
Matthias Kloseb159a552010-04-25 21:00:44 +00006332
6333 ac_cv_no_strict_aliasing=no
6334
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006337fi
6338
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006339 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6342$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006343 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344 then
6345 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6346 fi
6347
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6349$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6350 ac_save_cc="$CC"
6351 CC="$CC -Wunused-result -Werror"
6352 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006353 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006354 $as_echo_n "(cached) " >&6
6355else
6356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6357/* end confdefs.h. */
6358
6359
6360int
6361main ()
6362{
6363
6364 ;
6365 return 0;
6366}
6367
6368_ACEOF
6369if ac_fn_c_try_compile "$LINENO"; then :
6370
6371 ac_cv_disable_unused_result_warning=yes
6372
6373else
6374
6375 ac_cv_disable_unused_result_warning=no
6376
6377fi
6378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6379fi
6380
6381 CFLAGS="$save_CFLAGS"
6382 CC="$ac_save_cc"
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6384$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6385
6386 if test $ac_cv_disable_unused_result_warning = yes
6387 then
6388 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6389 fi
6390
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6392$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6393 ac_save_cc="$CC"
6394 CC="$CC -Werror=declaration-after-statement"
6395 save_CFLAGS="$CFLAGS"
6396 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6397 $as_echo_n "(cached) " >&6
6398else
6399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6400/* end confdefs.h. */
6401
6402
6403int
6404main ()
6405{
6406
6407 ;
6408 return 0;
6409}
6410
6411_ACEOF
6412if ac_fn_c_try_compile "$LINENO"; then :
6413
6414 ac_cv_declaration_after_statement_warning=yes
6415
6416else
6417
6418 ac_cv_declaration_after_statement_warning=no
6419
6420fi
6421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6422fi
6423
6424 CFLAGS="$save_CFLAGS"
6425 CC="$ac_save_cc"
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6427$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6428
6429 if test $ac_cv_declaration_after_statement_warning = yes
6430 then
6431 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6432 fi
6433
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6435 # support. Without this, treatment of subnormals doesn't follow
6436 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006437 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438 alpha*)
6439 BASECFLAGS="$BASECFLAGS -mieee"
6440 ;;
6441 esac
6442
6443 case $ac_sys_system in
6444 SCO_SV*)
6445 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6446 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006447
6448 # is there any other compiler on Darwin besides gcc?
6449 Darwin*)
6450 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6451 # used to be here, but non-Apple gcc doesn't accept them.
6452 if test "${CC}" = gcc
6453 then
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006455$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006456 case "${UNIVERSALSDK}" in
6457 */MacOSX10.4u.sdk)
6458 # Build using 10.4 SDK, force usage of gcc when the
6459 # compiler is gcc, otherwise the user will get very
6460 # confusing error messages when building on OSX 10.6
6461 CC=gcc-4.0
6462 CPP=cpp-4.0
6463 ;;
6464 esac
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006466$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006467 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006468
Ned Deily87adb6e2013-10-18 21:09:56 -07006469 if test "${enable_universalsdk}"
6470 then
6471 case "$UNIVERSAL_ARCHS" in
6472 32-bit)
6473 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6474 LIPO_32BIT_FLAGS=""
6475 ARCH_RUN_32BIT=""
6476 ;;
6477 64-bit)
6478 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6479 LIPO_32BIT_FLAGS=""
6480 ARCH_RUN_32BIT="true"
6481 ;;
6482 all)
6483 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6484 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6485 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6486 ;;
6487 intel)
6488 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6489 LIPO_32BIT_FLAGS="-extract i386"
6490 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6491 ;;
6492 intel-32)
6493 UNIVERSAL_ARCH_FLAGS="-arch i386"
6494 LIPO_32BIT_FLAGS=""
6495 ARCH_RUN_32BIT=""
6496 ;;
6497 3-way)
6498 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6499 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6500 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6501 ;;
6502 *)
6503 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6504 ;;
6505 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006506
Ned Deily87adb6e2013-10-18 21:09:56 -07006507 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6508 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6509 if test "${UNIVERSALSDK}" != "/"
6510 then
6511 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6512 fi
6513 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006514
Ned Deily87adb6e2013-10-18 21:09:56 -07006515 # Calculate an appropriate deployment target for this build:
6516 # The deployment target value is used explicitly to enable certain
6517 # features are enabled (such as builtin libedit support for readline)
6518 # through the use of Apple's Availabiliy Macros and is used as a
6519 # component of the string returned by distutils.get_platform().
6520 #
6521 # Use the value from:
6522 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6523 # 2. the operating system version of the build machine if >= 10.6
6524 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6525 # below to pick either 10.3, 10.4, or 10.5 as the target.
6526 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006527
Ned Deily87adb6e2013-10-18 21:09:56 -07006528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6529$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
6530 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6531 if test ${cur_target} '>' 10.2 && \
6532 test ${cur_target} '<' 10.6
6533 then
6534 cur_target=10.3
6535 if test ${enable_universalsdk}
6536 then
6537 case "$UNIVERSAL_ARCHS" in
6538 all|3-way|intel|64-bit)
6539 # These configurations were first supported in 10.5
6540 cur_target='10.5'
6541 ;;
6542 esac
6543 else
6544 if test `/usr/bin/arch` = "i386"
6545 then
6546 # 10.4 was the first release to support Intel archs
6547 cur_target="10.4"
6548 fi
6549 fi
6550 fi
6551 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006552
Ned Deily87adb6e2013-10-18 21:09:56 -07006553 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6554 # environment with a value that is the same as what we'll use
6555 # in the Makefile to ensure that we'll get the same compiler
6556 # environment during configure and build time.
6557 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6558 export MACOSX_DEPLOYMENT_TARGET
6559 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6561$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006562
Ned Deily87adb6e2013-10-18 21:09:56 -07006563 # end of Darwin* tests
6564 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006565 esac
6566 ;;
6567
6568*)
6569 case $ac_sys_system in
6570 OpenUNIX*|UnixWare*)
6571 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6572 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006573 SCO_SV*)
6574 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6575 ;;
6576 esac
6577 ;;
6578esac
6579
6580if test "$Py_DEBUG" = 'true'; then
6581 :
6582else
6583 OPT="-DNDEBUG $OPT"
6584fi
6585
6586if test "$ac_arch_flags"
6587then
6588 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6589fi
6590
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006591# On some compilers, pthreads are available without further options
6592# (e.g. MacOS X). On some of these systems, the compiler will not
6593# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6594# So we have to see first whether pthreads are available without
6595# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6597$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006598if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006599 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006600else
Matthias Kloseb9621712010-04-24 17:59:49 +00006601 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006602 ac_cv_pthread_is_default=no
6603else
Matthias Kloseb9621712010-04-24 17:59:49 +00006604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605/* end confdefs.h. */
6606
Stefan Krah7dba5942012-11-22 22:49:11 +01006607#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006608#include <pthread.h>
6609
6610void* routine(void* p){return NULL;}
6611
6612int main(){
6613 pthread_t p;
6614 if(pthread_create(&p,NULL,routine,NULL)!=0)
6615 return 1;
6616 (void)pthread_detach(p);
6617 return 0;
6618}
6619
6620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006621if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006622
6623 ac_cv_pthread_is_default=yes
6624 ac_cv_kthread=no
6625 ac_cv_pthread=no
6626
6627else
Matthias Kloseb9621712010-04-24 17:59:49 +00006628 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006632fi
6633
6634
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006635fi
6636
Matthias Kloseb9621712010-04-24 17:59:49 +00006637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6638$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006639
6640
6641if test $ac_cv_pthread_is_default = yes
6642then
6643 ac_cv_kpthread=no
6644else
6645# -Kpthread, if available, provides the right #defines
6646# and linker options to make pthread_create available
6647# Some compilers won't report that they do not support -Kpthread,
6648# so we need to run a program to see whether it really made the
6649# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6651$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006652if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006653 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006654else
6655 ac_save_cc="$CC"
6656CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006657if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658 ac_cv_kpthread=no
6659else
Matthias Kloseb9621712010-04-24 17:59:49 +00006660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006661/* end confdefs.h. */
6662
Stefan Krah7dba5942012-11-22 22:49:11 +01006663#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664#include <pthread.h>
6665
6666void* routine(void* p){return NULL;}
6667
6668int main(){
6669 pthread_t p;
6670 if(pthread_create(&p,NULL,routine,NULL)!=0)
6671 return 1;
6672 (void)pthread_detach(p);
6673 return 0;
6674}
6675
6676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006677if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678 ac_cv_kpthread=yes
6679else
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684fi
6685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686CC="$ac_save_cc"
6687fi
6688
Matthias Kloseb9621712010-04-24 17:59:49 +00006689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6690$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691fi
6692
6693if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6694then
6695# -Kthread, if available, provides the right #defines
6696# and linker options to make pthread_create available
6697# Some compilers won't report that they do not support -Kthread,
6698# so we need to run a program to see whether it really made the
6699# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6701$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006702if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006703 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006704else
6705 ac_save_cc="$CC"
6706CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006707if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708 ac_cv_kthread=no
6709else
Matthias Kloseb9621712010-04-24 17:59:49 +00006710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711/* end confdefs.h. */
6712
Stefan Krah7dba5942012-11-22 22:49:11 +01006713#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714#include <pthread.h>
6715
6716void* routine(void* p){return NULL;}
6717
6718int main(){
6719 pthread_t p;
6720 if(pthread_create(&p,NULL,routine,NULL)!=0)
6721 return 1;
6722 (void)pthread_detach(p);
6723 return 0;
6724}
6725
6726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006727if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006728 ac_cv_kthread=yes
6729else
Matthias Kloseb9621712010-04-24 17:59:49 +00006730 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734fi
6735
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736CC="$ac_save_cc"
6737fi
6738
Matthias Kloseb9621712010-04-24 17:59:49 +00006739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6740$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741fi
6742
6743if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6744then
6745# -pthread, if available, provides the right #defines
6746# and linker options to make pthread_create available
6747# Some compilers won't report that they do not support -pthread,
6748# so we need to run a program to see whether it really made the
6749# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6751$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006752if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006753 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754else
6755 ac_save_cc="$CC"
6756CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006757if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758 ac_cv_pthread=no
6759else
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761/* end confdefs.h. */
6762
Stefan Krah7dba5942012-11-22 22:49:11 +01006763#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764#include <pthread.h>
6765
6766void* routine(void* p){return NULL;}
6767
6768int main(){
6769 pthread_t p;
6770 if(pthread_create(&p,NULL,routine,NULL)!=0)
6771 return 1;
6772 (void)pthread_detach(p);
6773 return 0;
6774}
6775
6776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006777if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006778 ac_cv_pthread=yes
6779else
Matthias Kloseb9621712010-04-24 17:59:49 +00006780 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784fi
6785
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786CC="$ac_save_cc"
6787fi
6788
Matthias Kloseb9621712010-04-24 17:59:49 +00006789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6790$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006791fi
6792
6793# If we have set a CC compiler flag for thread support then
6794# check if it works for CXX, too.
6795ac_cv_cxx_thread=no
6796if test ! -z "$CXX"
6797then
Matthias Kloseb9621712010-04-24 17:59:49 +00006798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6799$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800ac_save_cxx="$CXX"
6801
6802if test "$ac_cv_kpthread" = "yes"
6803then
6804 CXX="$CXX -Kpthread"
6805 ac_cv_cxx_thread=yes
6806elif test "$ac_cv_kthread" = "yes"
6807then
6808 CXX="$CXX -Kthread"
6809 ac_cv_cxx_thread=yes
6810elif test "$ac_cv_pthread" = "yes"
6811then
6812 CXX="$CXX -pthread"
6813 ac_cv_cxx_thread=yes
6814fi
6815
6816if test $ac_cv_cxx_thread = yes
6817then
6818 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6819 $CXX -c conftest.$ac_ext 2>&5
6820 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6821 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6822 then
6823 ac_cv_cxx_thread=yes
6824 else
6825 ac_cv_cxx_thread=no
6826 fi
6827 rm -fr conftest*
6828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6830$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831fi
6832CXX="$ac_save_cxx"
6833
6834
6835# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6837$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006838if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840else
Matthias Kloseb9621712010-04-24 17:59:49 +00006841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842/* end confdefs.h. */
6843#include <stdlib.h>
6844#include <stdarg.h>
6845#include <string.h>
6846#include <float.h>
6847
6848int
6849main ()
6850{
6851
6852 ;
6853 return 0;
6854}
6855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006856if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857 ac_cv_header_stdc=yes
6858else
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6862
6863if test $ac_cv_header_stdc = yes; then
6864 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866/* end confdefs.h. */
6867#include <string.h>
6868
6869_ACEOF
6870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 $EGREP "memchr" >/dev/null 2>&1; then :
6872
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006873else
6874 ac_cv_header_stdc=no
6875fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006876rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877
6878fi
6879
6880if test $ac_cv_header_stdc = yes; then
6881 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006883/* end confdefs.h. */
6884#include <stdlib.h>
6885
6886_ACEOF
6887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 $EGREP "free" >/dev/null 2>&1; then :
6889
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890else
6891 ac_cv_header_stdc=no
6892fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006893rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006894
6895fi
6896
6897if test $ac_cv_header_stdc = yes; then
6898 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900 :
6901else
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903/* end confdefs.h. */
6904#include <ctype.h>
6905#include <stdlib.h>
6906#if ((' ' & 0x0FF) == 0x020)
6907# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6908# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6909#else
6910# define ISLOWER(c) \
6911 (('a' <= (c) && (c) <= 'i') \
6912 || ('j' <= (c) && (c) <= 'r') \
6913 || ('s' <= (c) && (c) <= 'z'))
6914# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6915#endif
6916
6917#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6918int
6919main ()
6920{
6921 int i;
6922 for (i = 0; i < 256; i++)
6923 if (XOR (islower (i), ISLOWER (i))
6924 || toupper (i) != TOUPPER (i))
6925 return 2;
6926 return 0;
6927}
6928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006929if ac_fn_c_try_run "$LINENO"; then :
6930
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006931else
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006934rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6935 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936fi
6937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938fi
6939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6941$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942if test $ac_cv_header_stdc = yes; then
6943
Matthias Kloseb9621712010-04-24 17:59:49 +00006944$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945
6946fi
6947
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006948ac_save_cppflags="$CPPFLAGS"
6949CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006950for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006951fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006952ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006953sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006954unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006955poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006956sys/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 +01006957sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006958sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006959sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006960sys/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 -07006961libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01006962bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
6963sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006964do :
6965 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6966ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006967if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006968 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006969#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006970_ACEOF
6971
6972fi
6973
Guido van Rossum627b2d71993-12-24 10:39:16 +00006974done
6975
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006976CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006977ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006978for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006979 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6981$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006982if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006984else
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006986/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987#include <sys/types.h>
6988#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006989
Martin v. Löwis11437992002-04-12 09:54:03 +00006990int
6991main ()
6992{
6993if ((DIR *) 0)
6994return 0;
6995 ;
6996 return 0;
6997}
6998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006999if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007000 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007001else
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007006eval ac_res=\$$as_ac_Header
7007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7008$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007009if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007010 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007011#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007012_ACEOF
7013
7014ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007015fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007017done
7018# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7019if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7021$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007022if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007024else
Martin v. Löwis11437992002-04-12 09:54:03 +00007025 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007029/* Override any GCC internal prototype to avoid an error.
7030 Use char because int might match the return type of a GCC
7031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007032#ifdef __cplusplus
7033extern "C"
7034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007035char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007036int
7037main ()
7038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007039return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007040 ;
7041 return 0;
7042}
7043_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044for ac_lib in '' dir; do
7045 if test -z "$ac_lib"; then
7046 ac_res="none required"
7047 else
7048 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007049 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007050 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007052 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007054rm -f core conftest.err conftest.$ac_objext \
7055 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007056 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007059done
Victor Stinnere0be4232011-10-25 13:06:09 +02007060if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007062else
7063 ac_cv_search_opendir=no
7064fi
7065rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007066LIBS=$ac_func_search_save_LIBS
7067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7069$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007070ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007071if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007072 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007075
Michael W. Hudson54241132001-12-07 15:38:26 +00007076else
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7078$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007079if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007081else
7082 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086/* Override any GCC internal prototype to avoid an error.
7087 Use char because int might match the return type of a GCC
7088 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007089#ifdef __cplusplus
7090extern "C"
7091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007092char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007093int
7094main ()
7095{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007096return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007097 ;
7098 return 0;
7099}
7100_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101for ac_lib in '' x; do
7102 if test -z "$ac_lib"; then
7103 ac_res="none required"
7104 else
7105 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007106 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007107 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007109 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007111rm -f core conftest.err conftest.$ac_objext \
7112 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007113 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007114 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007116done
Victor Stinnere0be4232011-10-25 13:06:09 +02007117if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007119else
7120 ac_cv_search_opendir=no
7121fi
7122rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007123LIBS=$ac_func_search_save_LIBS
7124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7126$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007127ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007128if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007129 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007130
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007131fi
7132
7133fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007134
Matthias Kloseb9621712010-04-24 17:59:49 +00007135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7136$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007137if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007138 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007139else
Matthias Kloseb9621712010-04-24 17:59:49 +00007140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007141/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007142#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007143int
7144main ()
7145{
7146return makedev(0, 0);
7147 ;
7148 return 0;
7149}
7150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007152 ac_cv_header_sys_types_h_makedev=yes
7153else
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007156rm -f core conftest.err conftest.$ac_objext \
7157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007158
7159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7161$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007162
7163if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007164ac_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 +02007165if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007166
Matthias Kloseb9621712010-04-24 17:59:49 +00007167$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007168
7169fi
7170
7171
7172
7173 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007174 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 +02007175if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007176
Matthias Kloseb9621712010-04-24 17:59:49 +00007177$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007178
7179fi
7180
7181
7182 fi
7183fi
7184
Michael W. Hudson54241132001-12-07 15:38:26 +00007185
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007186# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7187for ac_header in net/if.h
7188do :
7189 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7190#ifdef STDC_HEADERS
7191# include <stdlib.h>
7192# include <stddef.h>
7193#else
7194# ifdef HAVE_STDLIB_H
7195# include <stdlib.h>
7196# endif
7197#endif
7198#ifdef HAVE_SYS_SOCKET_H
7199# include <sys/socket.h>
7200#endif
7201
7202"
Victor Stinnere0be4232011-10-25 13:06:09 +02007203if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007204 cat >>confdefs.h <<_ACEOF
7205#define HAVE_NET_IF_H 1
7206_ACEOF
7207
7208fi
7209
7210done
7211
7212
7213
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007214# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007215for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007216do :
7217 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007218#ifdef HAVE_CURSES_H
7219#include <curses.h>
7220#endif
7221
Matthias Kloseb9621712010-04-24 17:59:49 +00007222"
Victor Stinnere0be4232011-10-25 13:06:09 +02007223if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007224 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007225#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007226_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007227
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007228fi
7229
7230done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007231
7232
Martin v. Löwis11017b12006-01-14 18:12:57 +00007233# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007234for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007235do :
7236 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 +00007237#ifdef HAVE_ASM_TYPES_H
7238#include <asm/types.h>
7239#endif
7240#ifdef HAVE_SYS_SOCKET_H
7241#include <sys/socket.h>
7242#endif
7243
Matthias Kloseb9621712010-04-24 17:59:49 +00007244"
Victor Stinnere0be4232011-10-25 13:06:09 +02007245if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007246 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007247#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007248_ACEOF
7249
7250fi
7251
7252done
7253
7254
Charles-François Natali47413c12011-10-06 19:47:44 +02007255# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007256for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007257do :
7258 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7259ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7260#ifdef HAVE_SYS_SOCKET_H
7261#include <sys/socket.h>
7262#endif
7263
7264"
7265if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7266 cat >>confdefs.h <<_ACEOF
7267#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7268_ACEOF
7269
7270fi
7271
7272done
7273
7274
Guido van Rossum627b2d71993-12-24 10:39:16 +00007275# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007276was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7278$as_echo_n "checking for clock_t in time.h... " >&6; }
7279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007280/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007281#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007282
7283_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007285 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007286 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007287else
Martin v. Löwis11437992002-04-12 09:54:03 +00007288
7289
Matthias Kloseb9621712010-04-24 17:59:49 +00007290$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007291
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007292
Guido van Rossum627b2d71993-12-24 10:39:16 +00007293fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007294rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007295
Matthias Kloseb9621712010-04-24 17:59:49 +00007296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7297$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007298
Matthias Kloseb9621712010-04-24 17:59:49 +00007299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7300$as_echo_n "checking for makedev... " >&6; }
7301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007302/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007303
Jesus Cea740f53a2010-04-28 11:35:30 +00007304#if defined(MAJOR_IN_MKDEV)
7305#include <sys/mkdev.h>
7306#elif defined(MAJOR_IN_SYSMACROS)
7307#include <sys/sysmacros.h>
7308#else
7309#include <sys/types.h>
7310#endif
7311
Neal Norwitz11690112002-07-30 01:08:28 +00007312int
7313main ()
7314{
Jesus Cea740f53a2010-04-28 11:35:30 +00007315
7316 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007317 ;
7318 return 0;
7319}
Matthias Kloseb159a552010-04-25 21:00:44 +00007320
Neal Norwitz11690112002-07-30 01:08:28 +00007321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007322if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007323 ac_cv_has_makedev=yes
7324else
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007327rm -f core conftest.err conftest.$ac_objext \
7328 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7330$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007331if test "$ac_cv_has_makedev" = "yes"; then
7332
Matthias Kloseb9621712010-04-24 17:59:49 +00007333$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007334
7335fi
7336
Christian Heimes985ecdc2013-11-20 11:46:18 +01007337# byte swapping
7338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7339$as_echo_n "checking for le64toh... " >&6; }
7340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7341/* end confdefs.h. */
7342
7343#ifdef HAVE_ENDIAN_H
7344#include <endian.h>
7345#elif defined(HAVE_SYS_ENDIAN_H)
7346#include <sys/endian.h>
7347#endif
7348
7349int
7350main ()
7351{
7352
7353 le64toh(1)
7354 ;
7355 return 0;
7356}
7357
7358_ACEOF
7359if ac_fn_c_try_link "$LINENO"; then :
7360 ac_cv_has_le64toh=yes
7361else
7362 ac_cv_has_le64toh=no
7363fi
7364rm -f core conftest.err conftest.$ac_objext \
7365 conftest$ac_exeext conftest.$ac_ext
7366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7367$as_echo "$ac_cv_has_le64toh" >&6; }
7368if test "$ac_cv_has_le64toh" = "yes"; then
7369
7370$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7371
7372fi
7373
Martin v. Löwis399a6892002-10-04 10:22:02 +00007374# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7375# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7376# defined, but the compiler does not support pragma redefine_extname,
7377# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7378# structures (such as rlimit64) without declaring them. As a
7379# work-around, disable LFS on such configurations
7380
7381use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7383$as_echo_n "checking Solaris LFS bug... " >&6; }
7384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007385/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007386
7387#define _LARGEFILE_SOURCE 1
7388#define _FILE_OFFSET_BITS 64
7389#include <sys/resource.h>
7390
Martin v. Löwis399a6892002-10-04 10:22:02 +00007391int
7392main ()
7393{
7394struct rlimit foo;
7395 ;
7396 return 0;
7397}
7398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007399if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007400 sol_lfs_bug=no
7401else
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7406$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007407if test "$sol_lfs_bug" = "yes"; then
7408 use_lfs=no
7409fi
7410
7411if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007412# Two defines needed to enable largefile support on various platforms
7413# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007414case $ac_sys_system/$ac_sys_release in
7415AIX*)
7416
7417$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7418
7419 ;;
7420esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007421
Matthias Kloseb9621712010-04-24 17:59:49 +00007422$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007423
7424
Matthias Kloseb9621712010-04-24 17:59:49 +00007425$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007426
Martin v. Löwis399a6892002-10-04 10:22:02 +00007427fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007428
Guido van Rossum84e7b241996-08-19 21:59:00 +00007429# Add some code to confdefs.h so that the test for off_t works on SCO
7430cat >> confdefs.h <<\EOF
7431#if defined(SCO_DS)
7432#undef _OFF_T
7433#endif
7434EOF
7435
Guido van Rossumef2255b2000-03-10 22:30:29 +00007436# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007437ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007438if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007439
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007440else
Martin v. Löwis11437992002-04-12 09:54:03 +00007441
7442cat >>confdefs.h <<_ACEOF
7443#define mode_t int
7444_ACEOF
7445
7446fi
7447
Matthias Kloseb9621712010-04-24 17:59:49 +00007448ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007449if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007450
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007451else
Martin v. Löwis11437992002-04-12 09:54:03 +00007452
7453cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007454#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007455_ACEOF
7456
7457fi
7458
Matthias Kloseb9621712010-04-24 17:59:49 +00007459ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007460if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007462else
Martin v. Löwis11437992002-04-12 09:54:03 +00007463
7464cat >>confdefs.h <<_ACEOF
7465#define pid_t int
7466_ACEOF
7467
7468fi
7469
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007470
Martin v. Löwis11437992002-04-12 09:54:03 +00007471cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007472#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007473_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007474
Matthias Kloseb9621712010-04-24 17:59:49 +00007475ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007476if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007477
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007478else
Martin v. Löwis11437992002-04-12 09:54:03 +00007479
7480cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007481#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007482_ACEOF
7483
7484fi
7485
Matthias Kloseb9621712010-04-24 17:59:49 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7487$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007488if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007489 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007490else
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007492/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007493#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007494
7495_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007497 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007498 ac_cv_type_uid_t=yes
7499else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007500 ac_cv_type_uid_t=no
7501fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007502rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007503
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7506$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007507if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007508
Matthias Kloseb9621712010-04-24 17:59:49 +00007509$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007510
7511
Matthias Kloseb9621712010-04-24 17:59:49 +00007512$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007513
7514fi
7515
Mark Dickinson983bc162012-12-02 12:11:38 +00007516
7517# There are two separate checks for each of the exact-width integer types we
7518# need. First we check whether the type is available using the usual
7519# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7520# and <stdint.h> where available). We then also use the special type checks of
7521# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7522# directly, #define's uint32_t to be a suitable type.
7523
7524ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7525if test "x$ac_cv_type_uint32_t" = xyes; then :
7526
7527$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7528
7529fi
7530
Matthias Kloseb9621712010-04-24 17:59:49 +00007531ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7532case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007533 no|yes) ;; #(
7534 *)
7535
Matthias Kloseb9621712010-04-24 17:59:49 +00007536$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007537
7538
7539cat >>confdefs.h <<_ACEOF
7540#define uint32_t $ac_cv_c_uint32_t
7541_ACEOF
7542;;
7543 esac
7544
Mark Dickinson983bc162012-12-02 12:11:38 +00007545
7546ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7547if test "x$ac_cv_type_uint64_t" = xyes; then :
7548
7549$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7550
7551fi
7552
Matthias Kloseb9621712010-04-24 17:59:49 +00007553ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7554case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007555 no|yes) ;; #(
7556 *)
7557
Matthias Kloseb9621712010-04-24 17:59:49 +00007558$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007559
7560
7561cat >>confdefs.h <<_ACEOF
7562#define uint64_t $ac_cv_c_uint64_t
7563_ACEOF
7564;;
7565 esac
7566
Mark Dickinson983bc162012-12-02 12:11:38 +00007567
7568ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7569if test "x$ac_cv_type_int32_t" = xyes; then :
7570
7571$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7572
7573fi
7574
Matthias Kloseb9621712010-04-24 17:59:49 +00007575ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7576case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007577 no|yes) ;; #(
7578 *)
7579
7580cat >>confdefs.h <<_ACEOF
7581#define int32_t $ac_cv_c_int32_t
7582_ACEOF
7583;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007584esac
7585
Mark Dickinson983bc162012-12-02 12:11:38 +00007586
7587ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7588if test "x$ac_cv_type_int64_t" = xyes; then :
7589
7590$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7591
7592fi
7593
Matthias Kloseb9621712010-04-24 17:59:49 +00007594ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7595case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007596 no|yes) ;; #(
7597 *)
7598
7599cat >>confdefs.h <<_ACEOF
7600#define int64_t $ac_cv_c_int64_t
7601_ACEOF
7602;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007603esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007604
Mark Dickinson983bc162012-12-02 12:11:38 +00007605
Matthias Kloseb9621712010-04-24 17:59:49 +00007606ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007607if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608
Matthias Kloseb9621712010-04-24 17:59:49 +00007609$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007610
7611fi
7612
Stefan Krah1919b7e2012-03-21 18:25:23 +01007613ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7614if test "x$ac_cv_type___uint128_t" = xyes; then :
7615
7616$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7617
7618fi
7619
Jack Jansendd19cf82001-12-06 22:36:17 +00007620
Michael W. Hudson54241132001-12-07 15:38:26 +00007621# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007622# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623# The cast to long int works around a bug in the HP C Compiler
7624# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7625# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7626# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7628$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007629if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007630 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007631else
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 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 +00007633
Martin v. Löwis11437992002-04-12 09:54:03 +00007634else
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 if test "$ac_cv_type_int" = yes; then
7636 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007638as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007639See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007640 else
7641 ac_cv_sizeof_int=0
7642 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007644
Martin v. Löwis11437992002-04-12 09:54:03 +00007645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7647$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648
7649
7650
Martin v. Löwis11437992002-04-12 09:54:03 +00007651cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007652#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007653_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007654
7655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007656# The cast to long int works around a bug in the HP C Compiler
7657# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7658# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7659# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7661$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007662if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007664else
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 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 +00007666
Martin v. Löwis11437992002-04-12 09:54:03 +00007667else
Matthias Kloseb9621712010-04-24 17:59:49 +00007668 if test "$ac_cv_type_long" = yes; then
7669 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007671as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007672See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673 else
7674 ac_cv_sizeof_long=0
7675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007677
Martin v. Löwis11437992002-04-12 09:54:03 +00007678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7680$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681
7682
7683
Martin v. Löwis11437992002-04-12 09:54:03 +00007684cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007685#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007686_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007687
7688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689# The cast to long int works around a bug in the HP C Compiler
7690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7692# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7694$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007695if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 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 +00007699
Martin v. Löwis11437992002-04-12 09:54:03 +00007700else
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 if test "$ac_cv_type_void_p" = yes; then
7702 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007704as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007705See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007706 else
7707 ac_cv_sizeof_void_p=0
7708 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007710
Martin v. Löwis11437992002-04-12 09:54:03 +00007711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7713$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714
7715
7716
Martin v. Löwis11437992002-04-12 09:54:03 +00007717cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007718#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007719_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007720
7721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007722# The cast to long int works around a bug in the HP C Compiler
7723# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7724# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7725# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7727$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007728if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007730else
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 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 +00007732
Martin v. Löwis11437992002-04-12 09:54:03 +00007733else
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 if test "$ac_cv_type_short" = yes; then
7735 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007737as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007738See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739 else
7740 ac_cv_sizeof_short=0
7741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007743
Martin v. Löwis11437992002-04-12 09:54:03 +00007744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7746$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747
7748
7749
Martin v. Löwis11437992002-04-12 09:54:03 +00007750cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007751#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007752_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007753
7754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007755# The cast to long int works around a bug in the HP C Compiler
7756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7758# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7760$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007761if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007763else
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 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 +00007765
Martin v. Löwis11437992002-04-12 09:54:03 +00007766else
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 if test "$ac_cv_type_float" = yes; then
7768 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007770as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007771See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772 else
7773 ac_cv_sizeof_float=0
7774 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007776
Martin v. Löwis11437992002-04-12 09:54:03 +00007777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7779$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007780
7781
7782
Martin v. Löwis11437992002-04-12 09:54:03 +00007783cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007784#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007785_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007786
7787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788# The cast to long int works around a bug in the HP C Compiler
7789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7791# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7793$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007794if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007796else
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 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 +00007798
Martin v. Löwis11437992002-04-12 09:54:03 +00007799else
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 if test "$ac_cv_type_double" = yes; then
7801 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007803as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007804See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805 else
7806 ac_cv_sizeof_double=0
7807 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007809
Martin v. Löwis11437992002-04-12 09:54:03 +00007810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7812$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813
7814
7815
Martin v. Löwis11437992002-04-12 09:54:03 +00007816cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007817#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007818_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007819
7820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821# The cast to long int works around a bug in the HP C Compiler
7822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7824# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7826$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007827if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007828 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007829else
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 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 +00007831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832else
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 if test "$ac_cv_type_fpos_t" = yes; then
7834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007836as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007837See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838 else
7839 ac_cv_sizeof_fpos_t=0
7840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007842
Martin v. Löwis11437992002-04-12 09:54:03 +00007843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7845$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846
7847
7848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007850#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007851_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007852
Michael W. Hudson54241132001-12-07 15:38:26 +00007853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854# The cast to long int works around a bug in the HP C Compiler
7855# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7856# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7857# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7859$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007860if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007862else
Matthias Kloseb9621712010-04-24 17:59:49 +00007863 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 +00007864
Martin v. Löwis18e16552006-02-15 17:27:45 +00007865else
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 if test "$ac_cv_type_size_t" = yes; then
7867 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007869as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007870See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871 else
7872 ac_cv_sizeof_size_t=0
7873 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007875
Martin v. Löwis18e16552006-02-15 17:27:45 +00007876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7878$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879
7880
7881
Martin v. Löwis18e16552006-02-15 17:27:45 +00007882cat >>confdefs.h <<_ACEOF
7883#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7884_ACEOF
7885
7886
Christian Heimes400adb02008-02-01 08:12:03 +00007887# The cast to long int works around a bug in the HP C Compiler
7888# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7889# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7890# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7892$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007893if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007895else
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 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 +00007897
Christian Heimes400adb02008-02-01 08:12:03 +00007898else
Matthias Kloseb9621712010-04-24 17:59:49 +00007899 if test "$ac_cv_type_pid_t" = yes; then
7900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007902as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007903See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007904 else
7905 ac_cv_sizeof_pid_t=0
7906 fi
7907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007908
Christian Heimes400adb02008-02-01 08:12:03 +00007909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7911$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007912
7913
7914
7915cat >>confdefs.h <<_ACEOF
7916#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7917_ACEOF
7918
7919
Michael W. Hudson54241132001-12-07 15:38:26 +00007920
Matthias Kloseb9621712010-04-24 17:59:49 +00007921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7922$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007923have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007925/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007926
Martin v. Löwis11437992002-04-12 09:54:03 +00007927int
7928main ()
7929{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007930long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007931 ;
7932 return 0;
7933}
7934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007935if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007936
7937
Matthias Kloseb9621712010-04-24 17:59:49 +00007938$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007939
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007940 have_long_long=yes
7941
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7945$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007946if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947# The cast to long int works around a bug in the HP C Compiler
7948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7950# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7952$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007953if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007954 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007955else
Matthias Kloseb9621712010-04-24 17:59:49 +00007956 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 +00007957
Martin v. Löwis11437992002-04-12 09:54:03 +00007958else
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 if test "$ac_cv_type_long_long" = yes; then
7960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007962as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007963See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 else
7965 ac_cv_sizeof_long_long=0
7966 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007968
Martin v. Löwis11437992002-04-12 09:54:03 +00007969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7971$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972
7973
7974
Martin v. Löwis11437992002-04-12 09:54:03 +00007975cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007976#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007977_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007978
Michael W. Hudson54241132001-12-07 15:38:26 +00007979
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007980fi
7981
Matthias Kloseb9621712010-04-24 17:59:49 +00007982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7983$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007984have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007986/* end confdefs.h. */
7987
7988int
7989main ()
7990{
7991long double x; x = (long double)0;
7992 ;
7993 return 0;
7994}
7995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007996if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007997
7998
Matthias Kloseb9621712010-04-24 17:59:49 +00007999$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008000
8001 have_long_double=yes
8002
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008003fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8006$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008007if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008008# The cast to long int works around a bug in the HP C Compiler
8009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8011# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8013$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008014if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008015 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008016else
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 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 +00008018
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008019else
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 if test "$ac_cv_type_long_double" = yes; then
8021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008023as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008024See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008025 else
8026 ac_cv_sizeof_long_double=0
8027 fi
8028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008029
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8032$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008033
8034
8035
8036cat >>confdefs.h <<_ACEOF
8037#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8038_ACEOF
8039
8040
8041fi
8042
8043
Matthias Kloseb9621712010-04-24 17:59:49 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8045$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008046have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008048/* end confdefs.h. */
8049
8050int
8051main ()
8052{
8053_Bool x; x = (_Bool)0;
8054 ;
8055 return 0;
8056}
8057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008058if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008059
8060
Matthias Kloseb9621712010-04-24 17:59:49 +00008061$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008062
8063 have_c99_bool=yes
8064
Thomas Woutersb2137042007-02-01 18:02:27 +00008065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8068$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008069if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070# The cast to long int works around a bug in the HP C Compiler
8071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8073# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8075$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008076if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008078else
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 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 +00008080
Thomas Woutersb2137042007-02-01 18:02:27 +00008081else
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 if test "$ac_cv_type__Bool" = yes; then
8083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008085as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008086See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 else
8088 ac_cv_sizeof__Bool=0
8089 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008091
Thomas Woutersb2137042007-02-01 18:02:27 +00008092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8094$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095
8096
8097
Thomas Woutersb2137042007-02-01 18:02:27 +00008098cat >>confdefs.h <<_ACEOF
8099#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8100_ACEOF
8101
8102
8103fi
8104
Matthias Kloseb9621712010-04-24 17:59:49 +00008105ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008106 #include <stdint.h>
8107 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008108 #ifdef HAVE_INTTYPES_H
8109 #include <inttypes.h>
8110 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008111"
Victor Stinnere0be4232011-10-25 13:06:09 +02008112if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008113
8114cat >>confdefs.h <<_ACEOF
8115#define HAVE_UINTPTR_T 1
8116_ACEOF
8117
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118# The cast to long int works around a bug in the HP C Compiler
8119# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8120# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8121# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8123$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008124if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008125 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008126else
Matthias Kloseb9621712010-04-24 17:59:49 +00008127 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 +00008128
Martin v. Löwis11437992002-04-12 09:54:03 +00008129else
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 if test "$ac_cv_type_uintptr_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 (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008134See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008135 else
8136 ac_cv_sizeof_uintptr_t=0
8137 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008139
Martin v. Löwis11437992002-04-12 09:54:03 +00008140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8142$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008143
8144
8145
Martin v. Löwis11437992002-04-12 09:54:03 +00008146cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008147#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008148_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008149
Michael W. Hudson54241132001-12-07 15:38:26 +00008150
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008151fi
8152
Thomas Wouters89f507f2006-12-13 04:49:30 +00008153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008154# The cast to long int works around a bug in the HP C Compiler
8155# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8156# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8157# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8159$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008160if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008162else
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008164#ifdef HAVE_SYS_TYPES_H
8165#include <sys/types.h>
8166#endif
8167
Matthias Kloseb9621712010-04-24 17:59:49 +00008168"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008170else
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 if test "$ac_cv_type_off_t" = yes; then
8172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008174as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008175See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008176 else
8177 ac_cv_sizeof_off_t=0
8178 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008180
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8183$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008184
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008185
8186
Martin v. Löwis11437992002-04-12 09:54:03 +00008187cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008188#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008189_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008190
Michael W. Hudson54241132001-12-07 15:38:26 +00008191
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008192
Matthias Kloseb9621712010-04-24 17:59:49 +00008193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8194$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008195if test "$have_long_long" = yes
8196then
8197if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008198 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008199
Matthias Kloseb9621712010-04-24 17:59:49 +00008200$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008201
Matthias Kloseb9621712010-04-24 17:59:49 +00008202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8203$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008204else
Matthias Kloseb9621712010-04-24 17:59:49 +00008205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8206$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008207fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008208else
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8210$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008211fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008212
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008213# The cast to long int works around a bug in the HP C Compiler
8214# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8215# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8216# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8218$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008219if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008220 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008221else
Matthias Kloseb9621712010-04-24 17:59:49 +00008222 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008223#ifdef HAVE_SYS_TYPES_H
8224#include <sys/types.h>
8225#endif
8226#ifdef HAVE_TIME_H
8227#include <time.h>
8228#endif
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008231
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008232else
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 if test "$ac_cv_type_time_t" = yes; then
8234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008236as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008237See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008238 else
8239 ac_cv_sizeof_time_t=0
8240 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008242
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8245$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008247
8248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008250#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008251_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008252
Michael W. Hudson54241132001-12-07 15:38:26 +00008253
8254
Trent Mick635f6fb2000-08-23 21:33:05 +00008255# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008256ac_save_cc="$CC"
8257if test "$ac_cv_kpthread" = "yes"
8258then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008259elif test "$ac_cv_kthread" = "yes"
8260then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008261elif test "$ac_cv_pthread" = "yes"
8262then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008263fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008264
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8266$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008267have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008269/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008270
8271 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008272int
8273main ()
8274{
Guido van Rossum12580492000-09-24 16:47:19 +00008275pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 ;
8277 return 0;
8278}
Matthias Kloseb159a552010-04-25 21:00:44 +00008279
Martin v. Löwis11437992002-04-12 09:54:03 +00008280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008281if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008282 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8286$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008287if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008289# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8290# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8291# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8293$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008294if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008295 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008296else
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008298#ifdef HAVE_PTHREAD_H
8299#include <pthread.h>
8300#endif
8301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008303
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008304else
Matthias Kloseb9621712010-04-24 17:59:49 +00008305 if test "$ac_cv_type_pthread_t" = yes; then
8306 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8307$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008308as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008309See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008310 else
8311 ac_cv_sizeof_pthread_t=0
8312 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008314
Trent Mick635f6fb2000-08-23 21:33:05 +00008315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8317$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008319
8320
Martin v. Löwis11437992002-04-12 09:54:03 +00008321cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008322#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008323_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008324
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008325
Trent Mick635f6fb2000-08-23 21:33:05 +00008326fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008327CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008328
Michael W. Hudson54241132001-12-07 15:38:26 +00008329
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008330case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008331 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008332 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8333 ;;
8334 Darwin/*)
8335 OTHER_LIBTOOL_OPT=""
8336 ;;
8337esac
8338
8339
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008340
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008341case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008342 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008343 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8344 if test "${enable_universalsdk}"; then
8345 :
8346 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008347 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008348 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008349 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008350 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008351 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008352 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008353 if test ${gcc_version} '<' 4.0
8354 then
8355 LIBTOOL_CRUFT="-lcc_dynamic"
8356 else
8357 LIBTOOL_CRUFT=""
8358 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008360 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008361else
Matthias Kloseb9621712010-04-24 17:59:49 +00008362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008363/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008364
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008365 #include <unistd.h>
8366 int main(int argc, char*argv[])
8367 {
8368 if (sizeof(long) == 4) {
8369 return 0;
8370 } else {
8371 return 1;
8372 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008373 }
8374
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008376if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008377 ac_osx_32bit=yes
8378else
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8382 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008383fi
8384
8385
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008386 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008387 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008388 i386)
8389 MACOSX_DEFAULT_ARCH="i386"
8390 ;;
8391 ppc)
8392 MACOSX_DEFAULT_ARCH="ppc"
8393 ;;
8394 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008395 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008396 ;;
8397 esac
8398 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008399 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008400 i386)
8401 MACOSX_DEFAULT_ARCH="x86_64"
8402 ;;
8403 ppc)
8404 MACOSX_DEFAULT_ARCH="ppc64"
8405 ;;
8406 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008407 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008408 ;;
8409 esac
8410
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008411 fi
8412
8413 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008414 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008415 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008416esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8418$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008419if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008420then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008421 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008422 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008423 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008424
Matthias Kloseb9621712010-04-24 17:59:49 +00008425$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008426
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8428$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008429 if test $enable_shared = "yes"
8430 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008431 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 +00008432 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008433else
Matthias Kloseb9621712010-04-24 17:59:49 +00008434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8435$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008436fi
8437
Matthias Kloseb9621712010-04-24 17:59:49 +00008438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8439$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008440case $ac_sys_system/$ac_sys_release in
8441 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008442
Matthias Kloseb9621712010-04-24 17:59:49 +00008443$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8446$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008447 ;;
8448 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8450$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008451 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008452esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008453
Guido van Rossum0a516c91994-09-12 10:58:40 +00008454# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008455
Michael W. Hudson54241132001-12-07 15:38:26 +00008456
8457
8458
8459
Benjamin Peterson99f03762010-04-11 22:15:28 +00008460
Thomas Wouters477c8d52006-05-27 19:21:47 +00008461
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008462# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8463# -- usually .so, .sl on HP-UX, .dll on Cygwin
8464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8465$as_echo_n "checking the extension of shared libraries... " >&6; }
8466if test -z "$SHLIB_SUFFIX"; then
8467 case $ac_sys_system in
8468 hp*|HP*)
8469 case `uname -m` in
8470 ia64) SHLIB_SUFFIX=.so;;
8471 *) SHLIB_SUFFIX=.sl;;
8472 esac
8473 ;;
8474 CYGWIN*) SHLIB_SUFFIX=.dll;;
8475 *) SHLIB_SUFFIX=.so;;
8476 esac
8477fi
8478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8479$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008480
Guido van Rossum0a516c91994-09-12 10:58:40 +00008481# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008482# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008483# (Shared libraries in this instance are shared modules to be loaded into
8484# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8486$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008487if test -z "$LDSHARED"
8488then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008489 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008490 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008491 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008492 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008493 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008494 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008495 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008497 if test "$GCC" = "yes" ; then
8498 LDSHARED='$(CC) -shared'
8499 LDCXXSHARED='$(CXX) -shared'
8500 else
8501 LDSHARED='$(CC) -G'
8502 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008503 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008504 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008505 if test "$GCC" = "yes" ; then
8506 LDSHARED='$(CC) -shared'
8507 LDCXXSHARED='$(CXX) -shared'
8508 else
8509 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008510 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008511 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008512 LDSHARED='$(CC) -bundle'
8513 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008514 if test "$enable_framework" ; then
8515 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008516 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8517 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008518 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008519 else
8520 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008521 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008522 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008523 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008524 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008525 LDSHARED='$(CC) -bundle'
8526 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008527 if test "$enable_framework" ; then
8528 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008529 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8530 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008531 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008532 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008533 # No framework, use the Python app as bundle-loader
8534 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008535 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008536 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008537 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008538 Darwin/*)
8539 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8540 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008541
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008542 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008543 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008544 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8545 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008546 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008547 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008548 LDSHARED='$(CC) -bundle'
8549 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008550 if test "$enable_framework" ; then
8551 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008552 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8553 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008554 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008555 else
8556 # No framework, use the Python app as bundle-loader
8557 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8558 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008559 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008560 fi
8561 fi
8562 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008563 Linux*|GNU*|QNX*)
8564 LDSHARED='$(CC) -shared'
8565 LDCXXSHARED='$(CXX) -shared';;
8566 BSD/OS*/4*)
8567 LDSHARED="gcc -shared"
8568 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008569 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008570 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008571 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008572 LDSHARED='$(CC) -shared'
8573 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008574 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008575 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008576 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008577 OpenBSD*)
8578 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8579 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008580 LDSHARED='$(CC) -shared $(CCSHARED)'
8581 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008582 else
8583 case `uname -r` in
8584 [01].* | 2.[0-7] | 2.[0-7].*)
8585 LDSHARED="ld -Bshareable ${LDFLAGS}"
8586 ;;
8587 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008588 LDSHARED='$(CC) -shared $(CCSHARED)'
8589 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008590 ;;
8591 esac
8592 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008593 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008594 LDSHARED='$(CC) -shared'
8595 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008596 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008597 if test "$GCC" = "yes" ; then
8598 LDSHARED='$(CC) -shared'
8599 LDCXXSHARED='$(CXX) -shared'
8600 else
8601 LDSHARED='$(CC) -G'
8602 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008603 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008604 SCO_SV*)
8605 LDSHARED='$(CC) -Wl,-G,-Bexport'
8606 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8607 CYGWIN*)
8608 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8609 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008610 *) LDSHARED="ld";;
8611 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8614$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008615LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008616BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008617# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008618# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8620$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008621if test -z "$CCSHARED"
8622then
Guido van Rossum07397971997-04-29 21:49:50 +00008623 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008624 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008625 then CCSHARED="-fPIC";
8626 elif test `uname -p` = sparc;
8627 then CCSHARED="-xcode=pic32";
8628 else CCSHARED="-Kpic";
8629 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008630 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008631 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008632 else CCSHARED="+z";
8633 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008634 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008635 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008636 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008637 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008638 if test "$GCC" = "yes"
8639 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008640 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008641 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008642 SCO_SV*)
8643 if test "$GCC" = "yes"
8644 then CCSHARED="-fPIC"
8645 else CCSHARED="-Kpic -belf"
8646 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008647 IRIX*/6*) case $CC in
8648 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008649 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008650 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008651 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8654$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008655# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008656# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8658$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008659if test -z "$LINKFORSHARED"
8660then
Guido van Rossum07397971997-04-29 21:49:50 +00008661 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008662 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008663 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008664 LINKFORSHARED="-Wl,-E -Wl,+s";;
8665# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008666 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008667 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008668 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008670 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008671
8672 # Issue #18075: the default maximum stack size (8MBytes) is too
8673 # small for the default recursion limit. Increase the stack size
8674 # to ensure that tests don't crash
8675 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8676
Jack Jansene578a632001-08-15 01:27:14 +00008677 if test "$enable_framework"
8678 then
Jack Jansenda49e192005-01-07 13:08:22 +00008679 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008680 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008681 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008682 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008683 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008684 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008685 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008686 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8687 then
8688 LINKFORSHARED="-Wl,--export-dynamic"
8689 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008690 SunOS/5*) case $CC in
8691 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008692 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008693 then
8694 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008695 fi;;
8696 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008697 CYGWIN*)
8698 if test $enable_shared = "no"
8699 then
8700 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8701 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008702 QNX*)
8703 # -Wl,-E causes the symbols to be added to the dynamic
8704 # symbol table so that they can be found when a module
8705 # is loaded. -N 2048K causes the stack size to be set
8706 # to 2048 kilobytes so that the stack doesn't overflow
8707 # when running test_compile.py.
8708 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008709 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8712$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008713
Michael W. Hudson54241132001-12-07 15:38:26 +00008714
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008715
Matthias Kloseb9621712010-04-24 17:59:49 +00008716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8717$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008718if test ! "$LIBRARY" = "$LDLIBRARY"
8719then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008720 case $ac_sys_system in
8721 CYGWIN*)
8722 # Cygwin needs CCSHARED when building extension DLLs
8723 # but not when building the interpreter DLL.
8724 CFLAGSFORSHARED='';;
8725 *)
8726 CFLAGSFORSHARED='$(CCSHARED)'
8727 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8730$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008731
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008732# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8733# library (with --enable-shared).
8734# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008735# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8736# if it is not required, since it creates a dependency of the shared library
8737# to LIBS. This, in turn, means that applications linking the shared libpython
8738# don't need to link LIBS explicitly. The default should be only changed
8739# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008740
Matthias Kloseb9621712010-04-24 17:59:49 +00008741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8742$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008743case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008744 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008745 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008746esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8748$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008749
8750
Guido van Rossum627b2d71993-12-24 10:39:16 +00008751# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8753$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008754if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008755 $as_echo_n "(cached) " >&6
8756else
8757 ac_check_lib_save_LIBS=$LIBS
8758LIBS="-lsendfile $LIBS"
8759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8760/* end confdefs.h. */
8761
8762/* Override any GCC internal prototype to avoid an error.
8763 Use char because int might match the return type of a GCC
8764 builtin and then its argument prototype would still apply. */
8765#ifdef __cplusplus
8766extern "C"
8767#endif
8768char sendfile ();
8769int
8770main ()
8771{
8772return sendfile ();
8773 ;
8774 return 0;
8775}
8776_ACEOF
8777if ac_fn_c_try_link "$LINENO"; then :
8778 ac_cv_lib_sendfile_sendfile=yes
8779else
8780 ac_cv_lib_sendfile_sendfile=no
8781fi
8782rm -f core conftest.err conftest.$ac_objext \
8783 conftest$ac_exeext conftest.$ac_ext
8784LIBS=$ac_check_lib_save_LIBS
8785fi
8786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8787$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008788if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008789 cat >>confdefs.h <<_ACEOF
8790#define HAVE_LIBSENDFILE 1
8791_ACEOF
8792
8793 LIBS="-lsendfile $LIBS"
8794
8795fi
8796
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8798$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008799if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008801else
Martin v. Löwis11437992002-04-12 09:54:03 +00008802 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008803LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008807/* Override any GCC internal prototype to avoid an error.
8808 Use char because int might match the return type of a GCC
8809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008810#ifdef __cplusplus
8811extern "C"
8812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008813char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008814int
8815main ()
8816{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 ;
8819 return 0;
8820}
8821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008822if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008823 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008824else
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008827rm -f core conftest.err conftest.$ac_objext \
8828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008829LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8832$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008833if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 cat >>confdefs.h <<_ACEOF
8835#define HAVE_LIBDL 1
8836_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008837
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008838 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008839
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008840fi
8841 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8843$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008844if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008846else
Martin v. Löwis11437992002-04-12 09:54:03 +00008847 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008848LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008852/* Override any GCC internal prototype to avoid an error.
8853 Use char because int might match the return type of a GCC
8854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008855#ifdef __cplusplus
8856extern "C"
8857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008858char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008859int
8860main ()
8861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008862return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 ;
8864 return 0;
8865}
8866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008867if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008869else
Matthias Kloseb9621712010-04-24 17:59:49 +00008870 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008872rm -f core conftest.err conftest.$ac_objext \
8873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008874LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8877$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008878if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 cat >>confdefs.h <<_ACEOF
8880#define HAVE_LIBDLD 1
8881_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008882
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008883 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008884
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008885fi
8886 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008887
Georg Brandlb1441c72009-01-03 22:33:39 +00008888# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008889if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8891$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008892if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008894else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008895 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899/* Override any GCC internal prototype to avoid an error.
8900 Use char because int might match the return type of a GCC
8901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008902#ifdef __cplusplus
8903extern "C"
8904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008905char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008906int
8907main ()
8908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008909return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 ;
8911 return 0;
8912}
8913_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914for ac_lib in '' pthread rt posix4; do
8915 if test -z "$ac_lib"; then
8916 ac_res="none required"
8917 else
8918 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008919 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008922 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008924rm -f core conftest.err conftest.$ac_objext \
8925 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008926 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008927 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008929done
Victor Stinnere0be4232011-10-25 13:06:09 +02008930if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008932else
8933 ac_cv_search_sem_init=no
8934fi
8935rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008936LIBS=$ac_func_search_save_LIBS
8937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8939$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008940ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008941if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008942 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008943
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008944fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008945 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008946 # posix4 on Solaris 2.6
8947 # pthread (first!) on Linux
8948fi
8949
Martin v. Löwis19d17342003-06-14 21:03:05 +00008950# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8952$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008953if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008955else
8956 ac_check_lib_save_LIBS=$LIBS
8957LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008959/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961/* Override any GCC internal prototype to avoid an error.
8962 Use char because int might match the return type of a GCC
8963 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008964#ifdef __cplusplus
8965extern "C"
8966#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008967char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008968int
8969main ()
8970{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008971return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008972 ;
8973 return 0;
8974}
8975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008976if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008977 ac_cv_lib_intl_textdomain=yes
8978else
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008981rm -f core conftest.err conftest.$ac_objext \
8982 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008983LIBS=$ac_check_lib_save_LIBS
8984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8986$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008987if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008988
Matthias Kloseb9621712010-04-24 17:59:49 +00008989$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008990
Brett Cannonc6d936e2009-06-07 20:09:53 +00008991 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008992fi
8993
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008994
8995# checks for system dependent C++ extensions support
8996case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8998$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009000/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009001
Georg Brandl59e87bd2011-02-15 19:48:59 +00009002 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009003int
9004main ()
9005{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009006loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 ;
9008 return 0;
9009}
Matthias Kloseb159a552010-04-25 21:00:44 +00009010
Martin v. Löwis11437992002-04-12 09:54:03 +00009011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009012if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009013
Matthias Kloseb159a552010-04-25 21:00:44 +00009014
Matthias Kloseb9621712010-04-24 17:59:49 +00009015$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
Matthias Kloseb159a552010-04-25 21:00:44 +00009017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009018$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009019
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009020else
Matthias Kloseb159a552010-04-25 21:00:44 +00009021
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009023$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009024
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009026rm -f core conftest.err conftest.$ac_objext \
9027 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009028 *) ;;
9029esac
9030
Christian Heimes985ecdc2013-11-20 11:46:18 +01009031# check for systems that require aligned memory access
9032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9033$as_echo_n "checking aligned memory access is required... " >&6; }
9034if test "$cross_compiling" = yes; then :
9035 aligned_required=yes
9036else
9037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9038/* end confdefs.h. */
9039
9040int main()
9041{
9042 char s[16];
9043 int i, *p1, *p2;
9044 for (i=0; i < 16; i++)
9045 s[i] = i;
9046 p1 = (int*)(s+1);
9047 p2 = (int*)(s+2);
9048 if (*p1 == *p2)
9049 return 1;
9050 return 0;
9051}
9052
9053_ACEOF
9054if ac_fn_c_try_run "$LINENO"; then :
9055 aligned_required=no
9056else
9057 aligned_required=yes
9058fi
9059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9060 conftest.$ac_objext conftest.beam conftest.$ac_ext
9061fi
9062
9063
9064if test "$aligned_required" = yes ; then
9065
9066$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9067
9068fi
9069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9070$as_echo "$aligned_required" >&6; }
9071
9072
9073# str, bytes and memoryview hash algorithm
9074
9075
9076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9077$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9078
9079# Check whether --with-hash_algorithm was given.
9080if test "${with_hash_algorithm+set}" = set; then :
9081 withval=$with_hash_algorithm;
9082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9083$as_echo "$withval" >&6; }
9084case "$withval" in
9085 siphash24)
9086 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9087
9088 ;;
9089 fnv)
9090 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9091
9092 ;;
9093 *)
9094 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9095 ;;
9096esac
9097
9098else
9099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9100$as_echo "default" >&6; }
9101fi
9102
9103
Guido van Rossum70c7f481998-03-26 18:44:10 +00009104# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9106$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009107if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009109else
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009111LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009115/* Override any GCC internal prototype to avoid an error.
9116 Use char because int might match the return type of a GCC
9117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009118#ifdef __cplusplus
9119extern "C"
9120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009121char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009122int
9123main ()
9124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009125return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009126 ;
9127 return 0;
9128}
9129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009130if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009132else
Matthias Kloseb9621712010-04-24 17:59:49 +00009133 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009135rm -f core conftest.err conftest.$ac_objext \
9136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009137LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9140$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009141if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009142 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009143fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009144 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9146$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009147if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009149else
Martin v. Löwis11437992002-04-12 09:54:03 +00009150 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009151LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009155/* Override any GCC internal prototype to avoid an error.
9156 Use char because int might match the return type of a GCC
9157 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009158#ifdef __cplusplus
9159extern "C"
9160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009161char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009162int
9163main ()
9164{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 ;
9167 return 0;
9168}
9169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009170if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009172else
Matthias Kloseb9621712010-04-24 17:59:49 +00009173 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009175rm -f core conftest.err conftest.$ac_objext \
9176 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009177LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9180$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009181if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009182 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009183fi
9184 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009185
Matthias Kloseb9621712010-04-24 17:59:49 +00009186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9187$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009190if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009191 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9193$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009194LIBS="$withval $LIBS"
9195
9196else
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9198$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009199fi
9200
Guido van Rossum7f43da71994-08-01 12:15:30 +00009201
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009202if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009203 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9204set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9206$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009207if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009208 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009209else
9210 case $PKG_CONFIG in
9211 [\\/]* | ?:[\\/]*)
9212 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9213 ;;
9214 *)
9215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9216for as_dir in $PATH
9217do
9218 IFS=$as_save_IFS
9219 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009220 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009221 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009222 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009223 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009224 break 2
9225 fi
9226done
Matthias Kloseb9621712010-04-24 17:59:49 +00009227 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009228IFS=$as_save_IFS
9229
9230 ;;
9231esac
9232fi
9233PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9234if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9236$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009237else
Matthias Kloseb9621712010-04-24 17:59:49 +00009238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9239$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009240fi
9241
9242
9243fi
9244if test -z "$ac_cv_path_PKG_CONFIG"; then
9245 ac_pt_PKG_CONFIG=$PKG_CONFIG
9246 # Extract the first word of "pkg-config", so it can be a program name with args.
9247set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9249$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009250if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009251 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009252else
9253 case $ac_pt_PKG_CONFIG in
9254 [\\/]* | ?:[\\/]*)
9255 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9256 ;;
9257 *)
9258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9259for as_dir in $PATH
9260do
9261 IFS=$as_save_IFS
9262 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009263 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009265 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009267 break 2
9268 fi
9269done
Matthias Kloseb9621712010-04-24 17:59:49 +00009270 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009271IFS=$as_save_IFS
9272
9273 ;;
9274esac
9275fi
9276ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9277if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9279$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009280else
Matthias Kloseb9621712010-04-24 17:59:49 +00009281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9282$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009283fi
9284
9285 if test "x$ac_pt_PKG_CONFIG" = x; then
9286 PKG_CONFIG=""
9287 else
9288 case $cross_compiling:$ac_tool_warned in
9289yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009290{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9291$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009292ac_tool_warned=yes ;;
9293esac
9294 PKG_CONFIG=$ac_pt_PKG_CONFIG
9295 fi
9296else
9297 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9298fi
9299
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009300
9301# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9303$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009304
9305# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009306if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009307 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009308else
9309 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009310fi
9311
9312
Matthias Kloseb9621712010-04-24 17:59:49 +00009313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9314$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009315
9316# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9318$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009319
9320# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009321if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009322 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009323else
9324 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009325fi
9326
9327
9328if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009329 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9330else
9331 LIBFFI_INCLUDEDIR=""
9332fi
9333
9334
Matthias Kloseb9621712010-04-24 17:59:49 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9336$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009337
Stefan Krah60187b52012-03-23 19:06:27 +01009338# Check for use of the system libmpdec library
9339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9340$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9341
9342# Check whether --with-system_libmpdec was given.
9343if test "${with_system_libmpdec+set}" = set; then :
9344 withval=$with_system_libmpdec;
9345else
9346 with_system_libmpdec="no"
9347fi
9348
9349
9350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9351$as_echo "$with_system_libmpdec" >&6; }
9352
Benjamin Peterson076ed002010-10-31 17:11:02 +00009353# Check for support for loadable sqlite extensions
9354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9355$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9356# Check whether --enable-loadable-sqlite-extensions was given.
9357if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9358 enableval=$enable_loadable_sqlite_extensions;
9359else
9360 enable_loadable_sqlite_extensions="no"
9361fi
9362
9363
9364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9365$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9366
Ned Deilyd819b932013-09-06 01:07:05 -07009367# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9368
9369
9370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9371$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9372
9373# Check whether --with-tcltk-includes was given.
9374if test "${with_tcltk_includes+set}" = set; then :
9375 withval=$with_tcltk_includes;
9376else
9377 with_tcltk_includes="default"
9378fi
9379
9380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9381$as_echo "$with_tcltk_includes" >&6; }
9382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9383$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9384
9385# Check whether --with-tcltk-libs was given.
9386if test "${with_tcltk_libs+set}" = set; then :
9387 withval=$with_tcltk_libs;
9388else
9389 with_tcltk_libs="default"
9390fi
9391
9392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9393$as_echo "$with_tcltk_libs" >&6; }
9394if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9395then
9396 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9397 then
9398 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9399 fi
9400 TCLTK_INCLUDES=""
9401 TCLTK_LIBS=""
9402else
9403 TCLTK_INCLUDES="$with_tcltk_includes"
9404 TCLTK_LIBS="$with_tcltk_libs"
9405fi
9406
Matthias Klose55708cc2009-04-30 08:06:49 +00009407# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9409$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009410
9411# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009412if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009413 withval=$with_dbmliborder;
9414if test x$with_dbmliborder = xyes
9415then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009416as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009417else
9418 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9419 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9420 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009421 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009422 fi
9423 done
9424fi
9425fi
9426
Matthias Kloseb9621712010-04-24 17:59:49 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9428$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009429
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009430# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009431
9432
Matthias Kloseb9621712010-04-24 17:59:49 +00009433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9434$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009435
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009437if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438 withval=$with_signal_module;
9439fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009440
9441
9442if test -z "$with_signal_module"
9443then with_signal_module="yes"
9444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9446$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009447
9448if test "${with_signal_module}" = "yes"; then
9449 USE_SIGNAL_MODULE=""
9450 SIGNAL_OBJS=""
9451else
9452 USE_SIGNAL_MODULE="#"
9453 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9454fi
9455
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009456# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009457
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009458USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460
Martin v. Löwis11437992002-04-12 09:54:03 +00009461
9462# Templates for things AC_DEFINEd more than once.
9463# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009464
9465
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
Matthias Kloseb9621712010-04-24 17:59:49 +00009467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9468$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009471if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472 withval=$with_threads;
9473fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009474
9475
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009476# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009479if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480 withval=$with_thread; with_threads=$with_thread
9481fi
9482
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009483
9484if test -z "$with_threads"
9485then with_threads="yes"
9486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9488$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009489
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009490
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009491if test "$with_threads" = "no"
9492then
9493 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009494elif test "$ac_cv_pthread_is_default" = yes
9495then
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009497
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009498 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009500
9501 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009503elif test "$ac_cv_kpthread" = "yes"
9504then
9505 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009506 if test "$ac_cv_cxx_thread" = "yes"; then
9507 CXX="$CXX -Kpthread"
9508 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009509 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009510
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009511 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009512 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009513elif test "$ac_cv_kthread" = "yes"
9514then
9515 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009516 if test "$ac_cv_cxx_thread" = "yes"; then
9517 CXX="$CXX -Kthread"
9518 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009520
9521 posix_threads=yes
9522 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009523elif test "$ac_cv_pthread" = "yes"
9524then
9525 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009526 if test "$ac_cv_cxx_thread" = "yes"; then
9527 CXX="$CXX -pthread"
9528 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009529 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009530
9531 posix_threads=yes
9532 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009533else
9534 if test ! -z "$with_threads" -a -d "$with_threads"
9535 then LDFLAGS="$LDFLAGS -L$with_threads"
9536 fi
9537 if test ! -z "$withval" -a -d "$withval"
9538 then LDFLAGS="$LDFLAGS -L$withval"
9539 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009540
9541 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009542 # define _POSIX_THREADS in unistd.h. Some apparently don't
9543 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9545$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009547/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009548
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009549#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009550#ifdef _POSIX_THREADS
9551yes
9552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009553
9554_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009557 unistd_defines_pthreads=yes
9558else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009559 unistd_defines_pthreads=no
9560fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009561rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009562
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9564$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009565
Matthias Kloseb9621712010-04-24 17:59:49 +00009566 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009567
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009568 # Just looking for pthread_create in libpthread is not enough:
9569 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9570 # So we really have to include pthread.h, and then link.
9571 _libs=$LIBS
9572 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9574$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009576/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009577
9578#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009579#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009580
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009581void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009582int
9583main ()
9584{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009585
9586pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 ;
9588 return 0;
9589}
9590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009591if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009592
Matthias Kloseb9621712010-04-24 17:59:49 +00009593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9594$as_echo "yes" >&6; }
9595 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009596
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009597 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009598 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009599else
Martin v. Löwis11437992002-04-12 09:54:03 +00009600
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009601 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009602 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009603if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009604 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009605
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009606 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009607 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009608else
Guido van Rossumad678af1998-10-02 14:42:15 +00009609
Matthias Kloseb9621712010-04-24 17:59:49 +00009610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9611$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009612if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009613 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009614else
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009616LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620/* Override any GCC internal prototype to avoid an error.
9621 Use char because int might match the return type of a GCC
9622 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009623#ifdef __cplusplus
9624extern "C"
9625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009626char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009627int
9628main ()
9629{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 ;
9632 return 0;
9633}
9634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009635if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009637else
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009640rm -f core conftest.err conftest.$ac_objext \
9641 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009642LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9645$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009646if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009647 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009648
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009649 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009650 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009651 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009652else
Greg Steinadf63d62000-07-05 10:38:09 +00009653
Matthias Kloseb9621712010-04-24 17:59:49 +00009654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9655$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009656if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009658else
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009660LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664/* Override any GCC internal prototype to avoid an error.
9665 Use char because int might match the return type of a GCC
9666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009667#ifdef __cplusplus
9668extern "C"
9669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009670char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009671int
9672main ()
9673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ;
9676 return 0;
9677}
9678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009681else
Matthias Kloseb9621712010-04-24 17:59:49 +00009682 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009684rm -f core conftest.err conftest.$ac_objext \
9685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009686LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9689$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009690if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009691 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009692
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009693 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009694 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009695 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009696else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009697
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9699$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009700if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009702else
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009704LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708/* Override any GCC internal prototype to avoid an error.
9709 Use char because int might match the return type of a GCC
9710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009711#ifdef __cplusplus
9712extern "C"
9713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009714char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009715int
9716main ()
9717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 ;
9720 return 0;
9721}
9722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009723if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009725else
Matthias Kloseb9621712010-04-24 17:59:49 +00009726 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009728rm -f core conftest.err conftest.$ac_objext \
9729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009730LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9733$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009734if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009736
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009737 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009738 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009739 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009740else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009741
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9743$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009744if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009746else
Martin v. Löwis11437992002-04-12 09:54:03 +00009747 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009748LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752/* Override any GCC internal prototype to avoid an error.
9753 Use char because int might match the return type of a GCC
9754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009755#ifdef __cplusplus
9756extern "C"
9757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009758char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009759int
9760main ()
9761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009762return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 ;
9764 return 0;
9765}
9766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009769else
Matthias Kloseb9621712010-04-24 17:59:49 +00009770 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009772rm -f core conftest.err conftest.$ac_objext \
9773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009774LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9777$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009778if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009780
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009781 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009782 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009783 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009784else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009785
Martin v. Löwis130fb172001-07-19 11:00:41 +00009786 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009787fi
9788
Guido van Rossum627b2d71993-12-24 10:39:16 +00009789
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009790fi
9791
Guido van Rossum0be3e491997-05-22 20:33:33 +00009792fi
9793
Guido van Rossum49545951997-12-02 19:28:29 +00009794fi
9795
Guido van Rossumb93a8621998-05-07 13:27:32 +00009796fi
9797
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009799rm -f core conftest.err conftest.$ac_objext \
9800 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009801
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9803$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009804if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009806else
Martin v. Löwis11437992002-04-12 09:54:03 +00009807 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009808LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812/* Override any GCC internal prototype to avoid an error.
9813 Use char because int might match the return type of a GCC
9814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009815#ifdef __cplusplus
9816extern "C"
9817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009818char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009819int
9820main ()
9821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 ;
9824 return 0;
9825}
9826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009827if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009829else
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009832rm -f core conftest.err conftest.$ac_objext \
9833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009834LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9837$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009838if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009839 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009840
Martin v. Löwis130fb172001-07-19 11:00:41 +00009841 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009842 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009843 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009844fi
9845
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009846
Neal Norwitza978ab02002-11-02 16:58:05 +00009847 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9849$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009850if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009851 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009852else
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009854LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858/* Override any GCC internal prototype to avoid an error.
9859 Use char because int might match the return type of a GCC
9860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009861#ifdef __cplusplus
9862extern "C"
9863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009864char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009865int
9866main ()
9867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 ;
9870 return 0;
9871}
9872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009873if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009875else
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009878rm -f core conftest.err conftest.$ac_objext \
9879 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009880LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9883$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009884if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009886
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009887 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009888 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009889 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009890fi
9891
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009892 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009893fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009894
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009895if test "$posix_threads" = "yes"; then
9896 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009897
Matthias Kloseb9621712010-04-24 17:59:49 +00009898$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009899
9900 fi
9901
9902 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9903 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009904 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009905$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009906
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009907 ;;
9908 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009909$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009910
9911 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009912 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009913$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009914
9915 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009916 esac
9917
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9919$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009920 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009922else
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009924 ac_cv_pthread_system_supported=no
9925else
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009928
9929 #include <stdio.h>
9930 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009931 void *foo(void *parm) {
9932 return NULL;
9933 }
9934 main() {
9935 pthread_attr_t attr;
9936 pthread_t id;
9937 if (pthread_attr_init(&attr)) exit(-1);
9938 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9939 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9940 exit(0);
9941 }
9942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009943if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009944 ac_cv_pthread_system_supported=yes
9945else
Matthias Kloseb9621712010-04-24 17:59:49 +00009946 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9949 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009950fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009952
Guido van Rossum627b2d71993-12-24 10:39:16 +00009953fi
9954
Matthias Kloseb9621712010-04-24 17:59:49 +00009955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9956$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009957 if test "$ac_cv_pthread_system_supported" = "yes"; then
9958
Matthias Kloseb9621712010-04-24 17:59:49 +00009959$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009960
9961 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 for ac_func in pthread_sigmask
9963do :
9964 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009965if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009966 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009967#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009968_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009969 case $ac_sys_system in
9970 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009971
Matthias Kloseb9621712010-04-24 17:59:49 +00009972$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009973
9974 ;;
9975 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009976fi
9977done
9978
Christian Heimesf77b4b22013-08-21 13:26:05 +02009979 for ac_func in pthread_atfork
9980do :
9981 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9982if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9983 cat >>confdefs.h <<_ACEOF
9984#define HAVE_PTHREAD_ATFORK 1
9985_ACEOF
9986
9987fi
9988done
9989
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009990fi
9991
9992
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009993# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009994
Matthias Kloseb9621712010-04-24 17:59:49 +00009995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9996$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009998if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009999 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010000 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10002$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010003 ipv6=no
10004 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10006$as_echo "yes" >&6; }
10007 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010008
10009 ipv6=yes
10010 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010012else
Martin v. Löwis11437992002-04-12 09:54:03 +000010013
Matthias Kloseb9621712010-04-24 17:59:49 +000010014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010015/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010016 /* AF_INET6 available check */
10017#include <sys/types.h>
10018#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010019int
10020main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010021{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010022int domain = AF_INET6;
10023 ;
10024 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010025}
Martin v. Löwis11437992002-04-12 09:54:03 +000010026_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010027if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010028
Matthias Kloseb9621712010-04-24 17:59:49 +000010029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10030$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010031 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010032
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010033else
Matthias Kloseb159a552010-04-25 21:00:44 +000010034
Matthias Kloseb9621712010-04-24 17:59:49 +000010035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10036$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010037 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010038
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010039fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010041
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010042if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10044$as_echo_n "checking if RFC2553 API is available... " >&6; }
10045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010046/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010047
10048 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010049#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010050int
10051main ()
10052{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010053struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010054 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 ;
10056 return 0;
10057}
Matthias Kloseb159a552010-04-25 21:00:44 +000010058
Martin v. Löwis11437992002-04-12 09:54:03 +000010059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010060if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010061
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010063$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010064 ipv6=yes
10065
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010066else
Matthias Kloseb159a552010-04-25 21:00:44 +000010067
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010069$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010070 ipv6=no
10071
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010074fi
10075
10076if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010077 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010078
10079fi
10080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081fi
10082
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010083
10084ipv6type=unknown
10085ipv6lib=none
10086ipv6trylibc=no
10087
10088if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10090$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010091 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10092 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010093 case $i in
10094 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010096/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010097
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010098#include <netinet/in.h>
10099#ifdef IPV6_INRIA_VERSION
10100yes
10101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010102_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010103if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010105 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010106fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010107rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010108
10109 ;;
10110 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010112/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010113
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010114#include <netinet/in.h>
10115#ifdef __KAME__
10116yes
10117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010118_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010121 ipv6type=$i;
10122 ipv6lib=inet6
10123 ipv6libdir=/usr/local/v6/lib
10124 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010125fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010126rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010127
10128 ;;
10129 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010131/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010132
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010133#include <features.h>
10134#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10135yes
10136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010137_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010140 ipv6type=$i;
10141 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010142fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010143rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010144
10145 ;;
10146 linux-inet6)
10147 if test -d /usr/inet6; then
10148 ipv6type=$i
10149 ipv6lib=inet6
10150 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010151 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010152 fi
10153 ;;
10154 solaris)
10155 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010156 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010157 ipv6type=$i
10158 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010159 fi
10160 fi
10161 ;;
10162 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010164/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010165
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010166#include <sys/param.h>
10167#ifdef _TOSHIBA_INET6
10168yes
10169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010170_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010171if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010173 ipv6type=$i;
10174 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010175 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010176fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010177rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010178
10179 ;;
10180 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010182/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010183
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010184#include </usr/local/v6/include/sys/v6config.h>
10185#ifdef __V6D__
10186yes
10187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010188_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010191 ipv6type=$i;
10192 ipv6lib=v6;
10193 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010194 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010195fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010196rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010197
10198 ;;
10199 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010201/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010202
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010203#include <sys/param.h>
10204#ifdef _ZETA_MINAMI_INET6
10205yes
10206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010207_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010208if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010210 ipv6type=$i;
10211 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010212 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010213fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010214rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010215
10216 ;;
10217 esac
10218 if test "$ipv6type" != "unknown"; then
10219 break
10220 fi
10221 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10223$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010224fi
10225
10226if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10227 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10228 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10229 echo "using lib$ipv6lib"
10230 else
10231 if test $ipv6trylibc = "yes"; then
10232 echo "using libc"
10233 else
10234 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10235 echo "You need to fetch lib$ipv6lib.a from appropriate"
10236 echo 'ipv6 kit and compile beforehand.'
10237 exit 1
10238 fi
10239 fi
10240fi
10241
Matthias Kloseb9621712010-04-24 17:59:49 +000010242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10243$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010245/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010246
10247 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010248int
10249main ()
10250{
10251FSIORefNum fRef = 0
10252 ;
10253 return 0;
10254}
Matthias Kloseb159a552010-04-25 21:00:44 +000010255
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010257if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010258
Matthias Kloseb159a552010-04-25 21:00:44 +000010259
Matthias Kloseb9621712010-04-24 17:59:49 +000010260$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010261
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10263$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010264
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010265else
Matthias Kloseb159a552010-04-25 21:00:44 +000010266
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10268$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010269
10270fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10272
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010273# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10275$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010278if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279 withval=$with_doc_strings;
10280fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010281
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010282
10283if test -z "$with_doc_strings"
10284then with_doc_strings="yes"
10285fi
10286if test "$with_doc_strings" != "no"
10287then
10288
Matthias Kloseb9621712010-04-24 17:59:49 +000010289$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010290
10291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10293$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010294
Antoine Pitrou042b1282010-08-13 21:15:58 +000010295# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10297$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010300if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010301 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010302if test "$withval" != no
10303then
10304
Matthias Kloseb9621712010-04-24 17:59:49 +000010305$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010306
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10308$as_echo "yes" >&6; }
10309else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10310$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010311fi
10312else
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315fi
10316
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010317
10318# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10320$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010323if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324 withval=$with_pymalloc;
10325fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010326
Neil Schemenauera35c6882001-02-27 04:45:05 +000010327
Neil Schemenauer16c22972002-03-22 15:34:49 +000010328if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010329then
10330 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010331fi
10332if test "$with_pymalloc" != "no"
10333then
Martin v. Löwis11437992002-04-12 09:54:03 +000010334
Matthias Kloseb9621712010-04-24 17:59:49 +000010335$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010336
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010337 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10340$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010341
Benjamin Peterson05159c42009-12-03 03:01:27 +000010342# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10344$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010345
10346# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010347if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010348 withval=$with_valgrind;
10349else
10350 with_valgrind=no
10351fi
10352
Matthias Kloseb9621712010-04-24 17:59:49 +000010353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10354$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010355if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 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 +020010357if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010358
Matthias Kloseb9621712010-04-24 17:59:49 +000010359$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010360
10361else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010362 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010363
10364fi
10365
10366
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010367 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010368fi
10369
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010370# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010371
Guido van Rossum98935bf2001-09-05 19:13:16 +000010372DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010373
Guido van Rossume97ee181999-12-20 21:27:22 +000010374# the dlopen() function means we might want to use dynload_shlib.o. some
10375# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010376for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010377do :
10378 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010379if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010381#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010382_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010383
Guido van Rossume97ee181999-12-20 21:27:22 +000010384fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010385done
Guido van Rossume97ee181999-12-20 21:27:22 +000010386
Michael W. Hudson54241132001-12-07 15:38:26 +000010387
Guido van Rossume97ee181999-12-20 21:27:22 +000010388# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10389# loading of modules.
10390
Matthias Kloseb9621712010-04-24 17:59:49 +000010391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10392$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010393if test -z "$DYNLOADFILE"
10394then
10395 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010396 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10397 if test "$ac_cv_func_dlopen" = yes
10398 then DYNLOADFILE="dynload_shlib.o"
10399 else DYNLOADFILE="dynload_aix.o"
10400 fi
10401 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010402 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010403 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10404 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010405 *)
10406 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10407 # out any dynamic loading
10408 if test "$ac_cv_func_dlopen" = yes
10409 then DYNLOADFILE="dynload_shlib.o"
10410 else DYNLOADFILE="dynload_stub.o"
10411 fi
10412 ;;
10413 esac
10414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10416$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010417if test "$DYNLOADFILE" != "dynload_stub.o"
10418then
Martin v. Löwis11437992002-04-12 09:54:03 +000010419
Matthias Kloseb9621712010-04-24 17:59:49 +000010420$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010421
10422fi
10423
Neil Schemenauer4e425612001-06-19 15:44:15 +000010424# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10425
Michael W. Hudson54241132001-12-07 15:38:26 +000010426
Matthias Kloseb9621712010-04-24 17:59:49 +000010427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10428$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010429if test -z "$MACHDEP_OBJS"
10430then
Jack Jansene578a632001-08-15 01:27:14 +000010431 MACHDEP_OBJS=$extra_machdep_objs
10432else
10433 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010434fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010435if test -z "$MACHDEP_OBJS"; then
10436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10437$as_echo "none" >&6; }
10438else
10439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10440$as_echo "$MACHDEP_OBJS" >&6; }
10441fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010442
Guido van Rossum627b2d71993-12-24 10:39:16 +000010443# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010444for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010445 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010446 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010447 futimens futimes gai_strerror \
10448 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010449 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010450 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010451 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10452 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010453 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010454 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010455 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010456 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010457 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010458 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010459 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10460 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010461 sigaction sigaltstack siginterrupt sigpending sigrelse \
10462 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010463 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010464 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010465 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010466do :
10467 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10468ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010469if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010470 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010471#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010472_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010473
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010474fi
10475done
10476
Michael W. Hudson54241132001-12-07 15:38:26 +000010477
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010478ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10479 #include <dirent.h>
10480"
10481if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10482
10483$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10484
10485fi
10486
10487
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010488# For some functions, having a definition is not sufficient, since
10489# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10491$as_echo_n "checking for chroot... " >&6; }
10492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010493/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010494#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010495int
10496main ()
10497{
10498void *x=chroot
10499 ;
10500 return 0;
10501}
10502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010503if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010504
Matthias Kloseb9621712010-04-24 17:59:49 +000010505$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010506
Matthias Kloseb159a552010-04-25 21:00:44 +000010507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010508$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010509else
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10511$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010512
10513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10516$as_echo_n "checking for link... " >&6; }
10517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010518/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010519#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010520int
10521main ()
10522{
10523void *x=link
10524 ;
10525 return 0;
10526}
10527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010528if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010529
Matthias Kloseb9621712010-04-24 17:59:49 +000010530$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010531
Matthias Kloseb159a552010-04-25 21:00:44 +000010532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010533$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010534else
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10536$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010537
10538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10541$as_echo_n "checking for symlink... " >&6; }
10542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010543/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010544#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010545int
10546main ()
10547{
10548void *x=symlink
10549 ;
10550 return 0;
10551}
10552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010554
Matthias Kloseb9621712010-04-24 17:59:49 +000010555$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010556
Matthias Kloseb159a552010-04-25 21:00:44 +000010557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010558$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010559else
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10561$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010562
10563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10566$as_echo_n "checking for fchdir... " >&6; }
10567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010568/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010569#include <unistd.h>
10570int
10571main ()
10572{
10573void *x=fchdir
10574 ;
10575 return 0;
10576}
10577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010579
Matthias Kloseb9621712010-04-24 17:59:49 +000010580$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010581
Matthias Kloseb159a552010-04-25 21:00:44 +000010582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010583$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010584else
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10586$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010587
10588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10591$as_echo_n "checking for fsync... " >&6; }
10592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010593/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010594#include <unistd.h>
10595int
10596main ()
10597{
10598void *x=fsync
10599 ;
10600 return 0;
10601}
10602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010603if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010604
Matthias Kloseb9621712010-04-24 17:59:49 +000010605$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010606
Matthias Kloseb159a552010-04-25 21:00:44 +000010607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010608$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010609else
Matthias Kloseb9621712010-04-24 17:59:49 +000010610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10611$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010612
10613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10616$as_echo_n "checking for fdatasync... " >&6; }
10617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010618/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010619#include <unistd.h>
10620int
10621main ()
10622{
10623void *x=fdatasync
10624 ;
10625 return 0;
10626}
10627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010629
Matthias Kloseb9621712010-04-24 17:59:49 +000010630$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010631
Matthias Kloseb159a552010-04-25 21:00:44 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010633$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010634else
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10636$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010637
10638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10641$as_echo_n "checking for epoll... " >&6; }
10642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010643/* end confdefs.h. */
10644#include <sys/epoll.h>
10645int
10646main ()
10647{
10648void *x=epoll_create
10649 ;
10650 return 0;
10651}
10652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010654
Matthias Kloseb9621712010-04-24 17:59:49 +000010655$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010656
Matthias Kloseb159a552010-04-25 21:00:44 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010658$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010659else
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10661$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010662
10663fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10666$as_echo_n "checking for epoll_create1... " >&6; }
10667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10668/* end confdefs.h. */
10669#include <sys/epoll.h>
10670int
10671main ()
10672{
10673void *x=epoll_create1
10674 ;
10675 return 0;
10676}
10677_ACEOF
10678if ac_fn_c_try_compile "$LINENO"; then :
10679
10680$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10681
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10683$as_echo "yes" >&6; }
10684else
10685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
10687
10688fi
10689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10691$as_echo_n "checking for kqueue... " >&6; }
10692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010693/* end confdefs.h. */
10694
10695#include <sys/types.h>
10696#include <sys/event.h>
10697
10698int
10699main ()
10700{
10701int x=kqueue()
10702 ;
10703 return 0;
10704}
10705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010706if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010709
Matthias Kloseb159a552010-04-25 21:00:44 +000010710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010711$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010712else
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10714$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010715
10716fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10719$as_echo_n "checking for prlimit... " >&6; }
10720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10721/* end confdefs.h. */
10722
10723#include <sys/time.h>
10724#include <sys/resource.h>
10725
10726int
10727main ()
10728{
10729void *x=prlimit
10730 ;
10731 return 0;
10732}
10733_ACEOF
10734if ac_fn_c_try_compile "$LINENO"; then :
10735
10736$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10737
10738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10739$as_echo "yes" >&6; }
10740else
10741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10742$as_echo "no" >&6; }
10743
10744fi
10745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10746
Martin v. Löwisd5843682002-11-21 20:41:28 +000010747# On some systems (eg. FreeBSD 5), we would find a definition of the
10748# functions ctermid_r, setgroups in the library, but no prototype
10749# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10750# address to avoid compiler warnings and potential miscompilations
10751# because of the missing prototypes.
10752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10754$as_echo_n "checking for ctermid_r... " >&6; }
10755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010756/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010757
Martin v. Löwisd5843682002-11-21 20:41:28 +000010758#include <stdio.h>
10759
Martin v. Löwisd5843682002-11-21 20:41:28 +000010760int
10761main ()
10762{
10763void* p = ctermid_r
10764 ;
10765 return 0;
10766}
10767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010768if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010769
Matthias Kloseb9621712010-04-24 17:59:49 +000010770$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010771
Matthias Kloseb159a552010-04-25 21:00:44 +000010772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010773$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010774else
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010777
10778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10780
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10782$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010783if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010784 $as_echo_n "(cached) " >&6
10785else
10786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010787/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010788#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010789int
10790main ()
10791{
10792void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010793
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010794 ;
10795 return 0;
10796}
10797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010798if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010799 ac_cv_flock_decl=yes
10800else
10801 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010802
10803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010805
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010806fi
10807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10808$as_echo "$ac_cv_flock_decl" >&6; }
10809if test "x${ac_cv_flock_decl}" = xyes; then
10810 for ac_func in flock
10811do :
10812 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010813if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010814 cat >>confdefs.h <<_ACEOF
10815#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010816_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010817
Antoine Pitroua3000072010-09-07 14:52:42 +000010818else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010820$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010821if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010822 $as_echo_n "(cached) " >&6
10823else
10824 ac_check_lib_save_LIBS=$LIBS
10825LIBS="-lbsd $LIBS"
10826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10827/* end confdefs.h. */
10828
10829/* Override any GCC internal prototype to avoid an error.
10830 Use char because int might match the return type of a GCC
10831 builtin and then its argument prototype would still apply. */
10832#ifdef __cplusplus
10833extern "C"
10834#endif
10835char flock ();
10836int
10837main ()
10838{
10839return flock ();
10840 ;
10841 return 0;
10842}
10843_ACEOF
10844if ac_fn_c_try_link "$LINENO"; then :
10845 ac_cv_lib_bsd_flock=yes
10846else
10847 ac_cv_lib_bsd_flock=no
10848fi
10849rm -f core conftest.err conftest.$ac_objext \
10850 conftest$ac_exeext conftest.$ac_ext
10851LIBS=$ac_check_lib_save_LIBS
10852fi
10853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10854$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010855if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010856 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010857
10858
10859$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10860
10861
10862fi
10863
10864
10865fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010866done
10867
Antoine Pitroua3000072010-09-07 14:52:42 +000010868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010869
Matthias Kloseb9621712010-04-24 17:59:49 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10871$as_echo_n "checking for getpagesize... " >&6; }
10872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010873/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010874
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010875#include <unistd.h>
10876
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010877int
10878main ()
10879{
10880void* p = getpagesize
10881 ;
10882 return 0;
10883}
10884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010885if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010888
Matthias Kloseb159a552010-04-25 21:00:44 +000010889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010890$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10893$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010894
10895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010897
Victor Stinner984890f2011-11-24 13:53:38 +010010898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10899$as_echo_n "checking for broken unsetenv... " >&6; }
10900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10901/* end confdefs.h. */
10902
10903#include <stdlib.h>
10904
10905int
10906main ()
10907{
10908int res = unsetenv("DUMMY")
10909 ;
10910 return 0;
10911}
10912_ACEOF
10913if ac_fn_c_try_compile "$LINENO"; then :
10914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10915$as_echo "no" >&6; }
10916else
10917
10918$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10919
10920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10921$as_echo "yes" >&6; }
10922
10923fi
10924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10925
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010926for ac_prog in true
10927do
10928 # Extract the first word of "$ac_prog", so it can be a program name with args.
10929set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10931$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010932if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010934else
10935 if test -n "$TRUE"; then
10936 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10937else
10938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10939for as_dir in $PATH
10940do
10941 IFS=$as_save_IFS
10942 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010943 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010945 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 $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 +000010947 break 2
10948 fi
10949done
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010952
10953fi
10954fi
10955TRUE=$ac_cv_prog_TRUE
10956if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10958$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010959else
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10961$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010962fi
10963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010964
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010965 test -n "$TRUE" && break
10966done
10967test -n "$TRUE" || TRUE="/bin/true"
10968
10969
Matthias Kloseb9621712010-04-24 17:59:49 +000010970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10971$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010972if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010974else
10975 ac_check_lib_save_LIBS=$LIBS
10976LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010978/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980/* Override any GCC internal prototype to avoid an error.
10981 Use char because int might match the return type of a GCC
10982 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010983#ifdef __cplusplus
10984extern "C"
10985#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010986char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010987int
10988main ()
10989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010991 ;
10992 return 0;
10993}
10994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010995if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010996 ac_cv_lib_c_inet_aton=yes
10997else
Matthias Kloseb9621712010-04-24 17:59:49 +000010998 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011000rm -f core conftest.err conftest.$ac_objext \
11001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011002LIBS=$ac_check_lib_save_LIBS
11003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11005$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011006if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011007 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011008else
Matthias Kloseb9621712010-04-24 17:59:49 +000011009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11010$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011011if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011012 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011013else
11014 ac_check_lib_save_LIBS=$LIBS
11015LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011017/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011019/* Override any GCC internal prototype to avoid an error.
11020 Use char because int might match the return type of a GCC
11021 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011022#ifdef __cplusplus
11023extern "C"
11024#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011025char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011026int
11027main ()
11028{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011030 ;
11031 return 0;
11032}
11033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011034if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011035 ac_cv_lib_resolv_inet_aton=yes
11036else
Matthias Kloseb9621712010-04-24 17:59:49 +000011037 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011039rm -f core conftest.err conftest.$ac_objext \
11040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011041LIBS=$ac_check_lib_save_LIBS
11042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11044$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011045if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011046 cat >>confdefs.h <<_ACEOF
11047#define HAVE_LIBRESOLV 1
11048_ACEOF
11049
11050 LIBS="-lresolv $LIBS"
11051
11052fi
11053
11054
11055fi
11056
11057
Christian Heimesd0764e22007-12-04 15:00:33 +000011058# On Tru64, chflags seems to be present, but calling it will
11059# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11061$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011062if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011064else
Matthias Kloseb9621712010-04-24 17:59:49 +000011065 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011066 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011067else
Matthias Kloseb9621712010-04-24 17:59:49 +000011068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011069/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011070
Christian Heimesd0764e22007-12-04 15:00:33 +000011071#include <sys/stat.h>
11072#include <unistd.h>
11073int main(int argc, char*argv[])
11074{
11075 if(chflags(argv[0], 0) != 0)
11076 return 1;
11077 return 0;
11078}
Ned Deily3eb67d52011-06-28 00:00:28 -070011079
Christian Heimesd0764e22007-12-04 15:00:33 +000011080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011081if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011082 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011083else
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11087 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011088fi
11089
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011090
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11093$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011094if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011096if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011097 ac_cv_have_chflags="yes"
11098else
11099 ac_cv_have_chflags="no"
11100fi
11101
11102fi
11103if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011104
Matthias Kloseb9621712010-04-24 17:59:49 +000011105$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011106
11107fi
11108
Matthias Kloseb9621712010-04-24 17:59:49 +000011109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11110$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011111if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011112 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011113else
Matthias Kloseb9621712010-04-24 17:59:49 +000011114 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011115 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011116else
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011118/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011119
Christian Heimesd0764e22007-12-04 15:00:33 +000011120#include <sys/stat.h>
11121#include <unistd.h>
11122int main(int argc, char*argv[])
11123{
11124 if(lchflags(argv[0], 0) != 0)
11125 return 1;
11126 return 0;
11127}
Ned Deily3eb67d52011-06-28 00:00:28 -070011128
Christian Heimesd0764e22007-12-04 15:00:33 +000011129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011130if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011131 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011132else
Matthias Kloseb9621712010-04-24 17:59:49 +000011133 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11136 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011137fi
11138
11139
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11142$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011143if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011145if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011146 ac_cv_have_lchflags="yes"
11147else
11148 ac_cv_have_lchflags="no"
11149fi
11150
11151fi
11152if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011153
Matthias Kloseb9621712010-04-24 17:59:49 +000011154$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011155
11156fi
11157
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011158case $ac_sys_system/$ac_sys_release in
11159Darwin/*)
11160 _CUR_CFLAGS="${CFLAGS}"
11161 _CUR_LDFLAGS="${LDFLAGS}"
11162 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11163 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11164 ;;
11165esac
11166
Matthias Kloseb9621712010-04-24 17:59:49 +000011167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11168$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011169if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011171else
11172 ac_check_lib_save_LIBS=$LIBS
11173LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011175/* end confdefs.h. */
11176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011177/* Override any GCC internal prototype to avoid an error.
11178 Use char because int might match the return type of a GCC
11179 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011180#ifdef __cplusplus
11181extern "C"
11182#endif
11183char inflateCopy ();
11184int
11185main ()
11186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011187return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011188 ;
11189 return 0;
11190}
11191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011192if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011193 ac_cv_lib_z_inflateCopy=yes
11194else
Matthias Kloseb9621712010-04-24 17:59:49 +000011195 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011197rm -f core conftest.err conftest.$ac_objext \
11198 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011199LIBS=$ac_check_lib_save_LIBS
11200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11202$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011203if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011206
11207fi
11208
11209
11210case $ac_sys_system/$ac_sys_release in
11211Darwin/*)
11212 CFLAGS="${_CUR_CFLAGS}"
11213 LDFLAGS="${_CUR_LDFLAGS}"
11214 ;;
11215esac
11216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11218$as_echo_n "checking for hstrerror... " >&6; }
11219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011221
Martin v. Löwise9416172003-05-03 10:12:45 +000011222#include <netdb.h>
11223
Martin v. Löwise9416172003-05-03 10:12:45 +000011224int
11225main ()
11226{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011227void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011228 ;
11229 return 0;
11230}
11231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011233
Matthias Kloseb9621712010-04-24 17:59:49 +000011234$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011235
Matthias Kloseb159a552010-04-25 21:00:44 +000011236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011237$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011238else
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11240$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011241
11242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011243rm -f core conftest.err conftest.$ac_objext \
11244 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011245
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11247$as_echo_n "checking for inet_aton... " >&6; }
11248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011250
Martin v. Löwis86d66262006-02-17 08:40:11 +000011251#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011252#include <sys/socket.h>
11253#include <netinet/in.h>
11254#include <arpa/inet.h>
11255
Martin v. Löwise9416172003-05-03 10:12:45 +000011256int
11257main ()
11258{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011259void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011260 ;
11261 return 0;
11262}
11263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011265
Matthias Kloseb9621712010-04-24 17:59:49 +000011266$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011267
Matthias Kloseb159a552010-04-25 21:00:44 +000011268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011269$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011270else
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11272$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011273
11274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011275rm -f core conftest.err conftest.$ac_objext \
11276 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011277
Matthias Kloseb9621712010-04-24 17:59:49 +000011278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11279$as_echo_n "checking for inet_pton... " >&6; }
11280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011281/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011282
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011283#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011284#include <sys/socket.h>
11285#include <netinet/in.h>
11286#include <arpa/inet.h>
11287
Martin v. Löwise9416172003-05-03 10:12:45 +000011288int
11289main ()
11290{
11291void* p = inet_pton
11292 ;
11293 return 0;
11294}
11295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011299
Matthias Kloseb159a552010-04-25 21:00:44 +000011300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011301$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011302else
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11304$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011305
11306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011308
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011309# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11311$as_echo_n "checking for setgroups... " >&6; }
11312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011313/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011314
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011315#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011316#ifdef HAVE_GRP_H
11317#include <grp.h>
11318#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011319
Martin v. Löwisd5843682002-11-21 20:41:28 +000011320int
11321main ()
11322{
11323void* p = setgroups
11324 ;
11325 return 0;
11326}
11327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011329
Matthias Kloseb9621712010-04-24 17:59:49 +000011330$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011331
Matthias Kloseb159a552010-04-25 21:00:44 +000011332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011334else
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011337
11338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011340
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011341# check for openpty and forkpty
11342
11343for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011344do :
11345 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011346if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011347 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011348#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011349_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011350
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011351else
Matthias Kloseb9621712010-04-24 17:59:49 +000011352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11353$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011354if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011355 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011356else
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011358LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011362/* Override any GCC internal prototype to avoid an error.
11363 Use char because int might match the return type of a GCC
11364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011365#ifdef __cplusplus
11366extern "C"
11367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011368char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011369int
11370main ()
11371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011372return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 ;
11374 return 0;
11375}
11376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011377if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011379else
Matthias Kloseb9621712010-04-24 17:59:49 +000011380 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011382rm -f core conftest.err conftest.$ac_objext \
11383 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011384LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11387$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011388if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011390 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011391else
Matthias Kloseb9621712010-04-24 17:59:49 +000011392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11393$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011394if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011395 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011396else
11397 ac_check_lib_save_LIBS=$LIBS
11398LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011400/* end confdefs.h. */
11401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402/* Override any GCC internal prototype to avoid an error.
11403 Use char because int might match the return type of a GCC
11404 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011405#ifdef __cplusplus
11406extern "C"
11407#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011408char openpty ();
11409int
11410main ()
11411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011412return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011413 ;
11414 return 0;
11415}
11416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011417if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011418 ac_cv_lib_bsd_openpty=yes
11419else
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011422rm -f core conftest.err conftest.$ac_objext \
11423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011424LIBS=$ac_check_lib_save_LIBS
11425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11427$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011428if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011429 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011430 LIBS="$LIBS -lbsd"
11431fi
11432
11433
11434fi
11435
Fred Drake8cef4cf2000-06-28 16:40:38 +000011436
11437fi
11438done
11439
11440for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011441do :
11442 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011443if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011445#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011446_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011447
Fred Drake8cef4cf2000-06-28 16:40:38 +000011448else
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11450$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011451if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011452 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011453else
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011455LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459/* Override any GCC internal prototype to avoid an error.
11460 Use char because int might match the return type of a GCC
11461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011462#ifdef __cplusplus
11463extern "C"
11464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011465char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011466int
11467main ()
11468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 ;
11471 return 0;
11472}
11473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011474if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011476else
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011479rm -f core conftest.err conftest.$ac_objext \
11480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011481LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11484$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011485if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011487 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011488else
Matthias Kloseb9621712010-04-24 17:59:49 +000011489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11490$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011491if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011492 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011493else
11494 ac_check_lib_save_LIBS=$LIBS
11495LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011497/* end confdefs.h. */
11498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499/* Override any GCC internal prototype to avoid an error.
11500 Use char because int might match the return type of a GCC
11501 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011502#ifdef __cplusplus
11503extern "C"
11504#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011505char forkpty ();
11506int
11507main ()
11508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011510 ;
11511 return 0;
11512}
11513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011515 ac_cv_lib_bsd_forkpty=yes
11516else
Matthias Kloseb9621712010-04-24 17:59:49 +000011517 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011519rm -f core conftest.err conftest.$ac_objext \
11520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011521LIBS=$ac_check_lib_save_LIBS
11522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11524$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011525if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011526 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011527 LIBS="$LIBS -lbsd"
11528fi
11529
11530
11531fi
11532
Fred Drake8cef4cf2000-06-28 16:40:38 +000011533
11534fi
11535done
11536
Jack Jansendd19cf82001-12-06 22:36:17 +000011537
Christian Heimesb186d002008-03-18 15:15:01 +000011538# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011539for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011540do :
11541 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011542if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011543 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011544#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011545_ACEOF
11546
11547fi
11548done
11549
11550
Michael W. Hudson54241132001-12-07 15:38:26 +000011551# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011552for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011553do :
11554 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11555ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011556if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011558#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011559_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011560
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011561fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011562done
11563
Michael W. Hudson54241132001-12-07 15:38:26 +000011564
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011565ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011566if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011567 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011568
Martin v. Löwis1142de32002-03-29 16:28:31 +000011569else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011571 *" dup2.$ac_objext "* ) ;;
11572 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011573 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011574esac
11575
Martin v. Löwis1142de32002-03-29 16:28:31 +000011576fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011577
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011578ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011579if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011580 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11581
11582else
11583 case " $LIBOBJS " in
11584 *" strdup.$ac_objext "* ) ;;
11585 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11586 ;;
11587esac
11588
11589fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011590
11591
11592for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011593do :
11594 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011595if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011597#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011600/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011601#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011602int
11603main ()
11604{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011605getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011606 ;
11607 return 0;
11608}
11609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011610if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011611
Matthias Kloseb9621712010-04-24 17:59:49 +000011612$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011613
Guido van Rossum627b2d71993-12-24 10:39:16 +000011614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011616
Guido van Rossum627b2d71993-12-24 10:39:16 +000011617fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011618done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011619
Jack Jansen150753c2003-03-29 22:07:47 +000011620for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011621do :
11622 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011623if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011624 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011625#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011628/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011629#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011630int
11631main ()
11632{
11633setpgrp(0,0);
11634 ;
11635 return 0;
11636}
11637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011638if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011641
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011644
11645fi
11646done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011647
Thomas Wouters3a584202000-08-05 23:28:51 +000011648for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011649do :
11650 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011651if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011652 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011653#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011656/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011657#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011658int
11659main ()
11660{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011661gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011662 ;
11663 return 0;
11664}
11665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011666if ac_fn_c_try_compile "$LINENO"; then :
11667
Guido van Rossum627b2d71993-12-24 10:39:16 +000011668else
Skip Montanaro6dead952003-09-25 14:50:04 +000011669
Matthias Kloseb9621712010-04-24 17:59:49 +000011670$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011671
Martin v. Löwis11437992002-04-12 09:54:03 +000011672
Guido van Rossum627b2d71993-12-24 10:39:16 +000011673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011675
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011676fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011677done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011678
Michael W. Hudson54241132001-12-07 15:38:26 +000011679
Victor Stinnere0be4232011-10-25 13:06:09 +020011680for ac_func in clock_gettime
11681do :
11682 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11683if test "x$ac_cv_func_clock_gettime" = xyes; then :
11684 cat >>confdefs.h <<_ACEOF
11685#define HAVE_CLOCK_GETTIME 1
11686_ACEOF
11687
11688else
11689
11690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11691$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11692if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11693 $as_echo_n "(cached) " >&6
11694else
11695 ac_check_lib_save_LIBS=$LIBS
11696LIBS="-lrt $LIBS"
11697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11698/* end confdefs.h. */
11699
11700/* Override any GCC internal prototype to avoid an error.
11701 Use char because int might match the return type of a GCC
11702 builtin and then its argument prototype would still apply. */
11703#ifdef __cplusplus
11704extern "C"
11705#endif
11706char clock_gettime ();
11707int
11708main ()
11709{
11710return clock_gettime ();
11711 ;
11712 return 0;
11713}
11714_ACEOF
11715if ac_fn_c_try_link "$LINENO"; then :
11716 ac_cv_lib_rt_clock_gettime=yes
11717else
11718 ac_cv_lib_rt_clock_gettime=no
11719fi
11720rm -f core conftest.err conftest.$ac_objext \
11721 conftest$ac_exeext conftest.$ac_ext
11722LIBS=$ac_check_lib_save_LIBS
11723fi
11724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11725$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11726if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11727
11728 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11729
11730
11731$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11732
11733
11734fi
11735
11736
11737fi
11738done
11739
11740
11741for ac_func in clock_getres
11742do :
11743 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11744if test "x$ac_cv_func_clock_getres" = xyes; then :
11745 cat >>confdefs.h <<_ACEOF
11746#define HAVE_CLOCK_GETRES 1
11747_ACEOF
11748
11749else
11750
11751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11752$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11753if ${ac_cv_lib_rt_clock_getres+:} false; then :
11754 $as_echo_n "(cached) " >&6
11755else
11756 ac_check_lib_save_LIBS=$LIBS
11757LIBS="-lrt $LIBS"
11758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11759/* end confdefs.h. */
11760
11761/* Override any GCC internal prototype to avoid an error.
11762 Use char because int might match the return type of a GCC
11763 builtin and then its argument prototype would still apply. */
11764#ifdef __cplusplus
11765extern "C"
11766#endif
11767char clock_getres ();
11768int
11769main ()
11770{
11771return clock_getres ();
11772 ;
11773 return 0;
11774}
11775_ACEOF
11776if ac_fn_c_try_link "$LINENO"; then :
11777 ac_cv_lib_rt_clock_getres=yes
11778else
11779 ac_cv_lib_rt_clock_getres=no
11780fi
11781rm -f core conftest.err conftest.$ac_objext \
11782 conftest$ac_exeext conftest.$ac_ext
11783LIBS=$ac_check_lib_save_LIBS
11784fi
11785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11786$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11787if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11788
11789 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11790
11791
11792fi
11793
11794
11795fi
11796done
11797
11798
Matthias Kloseb9621712010-04-24 17:59:49 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11800$as_echo_n "checking for major... " >&6; }
11801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011803
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011804#if defined(MAJOR_IN_MKDEV)
11805#include <sys/mkdev.h>
11806#elif defined(MAJOR_IN_SYSMACROS)
11807#include <sys/sysmacros.h>
11808#else
11809#include <sys/types.h>
11810#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011811
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011812int
11813main ()
11814{
11815
11816 makedev(major(0),minor(0));
11817
11818 ;
11819 return 0;
11820}
11821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011822if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011823
11824
Matthias Kloseb9621712010-04-24 17:59:49 +000011825$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011826
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11828$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011829
11830else
Skip Montanaro6dead952003-09-25 14:50:04 +000011831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11833$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011834
11835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011836rm -f core conftest.err conftest.$ac_objext \
11837 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011838
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011839# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011840# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11842$as_echo_n "checking for getaddrinfo... " >&6; }
11843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011844/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011845
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011846#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011847#include <sys/socket.h>
11848#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011849#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011850
Martin v. Löwis11437992002-04-12 09:54:03 +000011851int
11852main ()
11853{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011854getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011855 ;
11856 return 0;
11857}
11858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011859if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011860 have_getaddrinfo=yes
11861else
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011863fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011864rm -f core conftest.err conftest.$ac_objext \
11865 conftest$ac_exeext conftest.$ac_ext
11866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11867$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011868if test $have_getaddrinfo = yes
11869then
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11871$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011872 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011874else
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011876
11877if test "${enable_ipv6+set}" = set; then
11878 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11879else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011880 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011881fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011884/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011885
Stefan Krah19c21392012-11-22 23:47:32 +010011886#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011887#include <sys/types.h>
11888#include <netdb.h>
11889#include <string.h>
11890#include <sys/socket.h>
11891#include <netinet/in.h>
11892
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011893int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011894{
11895 int passive, gaierr, inet4 = 0, inet6 = 0;
11896 struct addrinfo hints, *ai, *aitop;
11897 char straddr[INET6_ADDRSTRLEN], strport[16];
11898
11899 for (passive = 0; passive <= 1; passive++) {
11900 memset(&hints, 0, sizeof(hints));
11901 hints.ai_family = AF_UNSPEC;
11902 hints.ai_flags = passive ? AI_PASSIVE : 0;
11903 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011904 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011905 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11906 (void)gai_strerror(gaierr);
11907 goto bad;
11908 }
11909 for (ai = aitop; ai; ai = ai->ai_next) {
11910 if (ai->ai_addr == NULL ||
11911 ai->ai_addrlen == 0 ||
11912 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11913 straddr, sizeof(straddr), strport, sizeof(strport),
11914 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11915 goto bad;
11916 }
11917 switch (ai->ai_family) {
11918 case AF_INET:
11919 if (strcmp(strport, "54321") != 0) {
11920 goto bad;
11921 }
11922 if (passive) {
11923 if (strcmp(straddr, "0.0.0.0") != 0) {
11924 goto bad;
11925 }
11926 } else {
11927 if (strcmp(straddr, "127.0.0.1") != 0) {
11928 goto bad;
11929 }
11930 }
11931 inet4++;
11932 break;
11933 case AF_INET6:
11934 if (strcmp(strport, "54321") != 0) {
11935 goto bad;
11936 }
11937 if (passive) {
11938 if (strcmp(straddr, "::") != 0) {
11939 goto bad;
11940 }
11941 } else {
11942 if (strcmp(straddr, "::1") != 0) {
11943 goto bad;
11944 }
11945 }
11946 inet6++;
11947 break;
11948 case AF_UNSPEC:
11949 goto bad;
11950 break;
11951 default:
11952 /* another family support? */
11953 break;
11954 }
11955 }
11956 }
11957
11958 if (!(inet4 == 0 || inet4 == 2))
11959 goto bad;
11960 if (!(inet6 == 0 || inet6 == 2))
11961 goto bad;
11962
11963 if (aitop)
11964 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011965 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011966
11967 bad:
11968 if (aitop)
11969 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011970 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011971}
11972
Martin v. Löwis11437992002-04-12 09:54:03 +000011973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011974if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011975 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011976else
Matthias Kloseb9621712010-04-24 17:59:49 +000011977 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11980 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011983fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011984
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011986
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11988$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11989
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011990if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011991then
11992 if test $ipv6 = yes
11993 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011994 echo 'Fatal: You must get working getaddrinfo() function.'
11995 echo ' or you can specify "--disable-ipv6"'.
11996 exit 1
11997 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011998else
Martin v. Löwis11437992002-04-12 09:54:03 +000011999
Matthias Kloseb9621712010-04-24 17:59:49 +000012000$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012001
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012002fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012003
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012004for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012005do :
12006 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012007if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012008 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012009#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012010_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012011
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012012fi
12013done
12014
Michael W. Hudson54241132001-12-07 15:38:26 +000012015
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12018$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012019if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012021else
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012023/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012024#include <sys/types.h>
12025#include <sys/time.h>
12026#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012027
Martin v. Löwis11437992002-04-12 09:54:03 +000012028int
12029main ()
12030{
12031if ((struct tm *) 0)
12032return 0;
12033 ;
12034 return 0;
12035}
12036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012037if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012038 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12045$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012046if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012047
Matthias Kloseb9621712010-04-24 17:59:49 +000012048$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012049
12050fi
12051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12053$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012054if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012058/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012059#include <sys/types.h>
12060#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012061
Martin v. Löwis11437992002-04-12 09:54:03 +000012062int
12063main ()
12064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012065struct tm tm;
12066 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 ;
12069 return 0;
12070}
12071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012072if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012073 ac_cv_struct_tm=time.h
12074else
Matthias Kloseb9621712010-04-24 17:59:49 +000012075 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12080$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012081if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012084
12085fi
12086
Matthias Kloseb9621712010-04-24 17:59:49 +000012087ac_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 +000012088#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090"
Victor Stinnere0be4232011-10-25 13:06:09 +020012091if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012092
12093cat >>confdefs.h <<_ACEOF
12094#define HAVE_STRUCT_TM_TM_ZONE 1
12095_ACEOF
12096
12097
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012098fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012099
Martin v. Löwis11437992002-04-12 09:54:03 +000012100if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12101
Matthias Kloseb9621712010-04-24 17:59:49 +000012102$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012103
12104else
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12106"
Victor Stinnere0be4232011-10-25 13:06:09 +020012107if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109else
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012111fi
12112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012113cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012114#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012115_ACEOF
12116
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12118$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012119if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012121else
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012123/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012124#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125#if !HAVE_DECL_TZNAME
12126extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012128
Martin v. Löwis11437992002-04-12 09:54:03 +000012129int
12130main ()
12131{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012132return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 ;
12134 return 0;
12135}
12136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012137if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012138 ac_cv_var_tzname=yes
12139else
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012142rm -f core conftest.err conftest.$ac_objext \
12143 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12146$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012147 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012148
Matthias Kloseb9621712010-04-24 17:59:49 +000012149$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012150
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012151 fi
12152fi
12153
Matthias Kloseb9621712010-04-24 17:59:49 +000012154ac_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 +020012155if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012156
12157cat >>confdefs.h <<_ACEOF
12158#define HAVE_STRUCT_STAT_ST_RDEV 1
12159_ACEOF
12160
12161
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012162fi
12163
Matthias Kloseb9621712010-04-24 17:59:49 +000012164ac_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 +020012165if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012166
Martin v. Löwis11437992002-04-12 09:54:03 +000012167cat >>confdefs.h <<_ACEOF
12168#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12169_ACEOF
12170
12171
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012172fi
12173
Matthias Kloseb9621712010-04-24 17:59:49 +000012174ac_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 +020012175if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012176
12177cat >>confdefs.h <<_ACEOF
12178#define HAVE_STRUCT_STAT_ST_FLAGS 1
12179_ACEOF
12180
12181
12182fi
12183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184ac_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 +020012185if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012186
12187cat >>confdefs.h <<_ACEOF
12188#define HAVE_STRUCT_STAT_ST_GEN 1
12189_ACEOF
12190
12191
12192fi
12193
Matthias Kloseb9621712010-04-24 17:59:49 +000012194ac_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 +020012195if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012196
12197cat >>confdefs.h <<_ACEOF
12198#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12199_ACEOF
12200
12201
12202fi
12203
Matthias Kloseb9621712010-04-24 17:59:49 +000012204ac_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 +020012205if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012206
Martin v. Löwis11437992002-04-12 09:54:03 +000012207cat >>confdefs.h <<_ACEOF
12208#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12209_ACEOF
12210
12211
Matthias Kloseb9621712010-04-24 17:59:49 +000012212$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012213
12214else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012216 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12218 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012219esac
12220
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012221fi
12222
Michael W. Hudson54241132001-12-07 15:38:26 +000012223
Martin v. Löwis11437992002-04-12 09:54:03 +000012224
Matthias Kloseb9621712010-04-24 17:59:49 +000012225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12226$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012227if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012228 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012229else
Matthias Kloseb159a552010-04-25 21:00:44 +000012230
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012232/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012233#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012234int
12235main ()
12236{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012237return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012238 ;
12239 return 0;
12240}
12241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012242if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012243 ac_cv_header_time_altzone=yes
12244else
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249fi
12250
Matthias Kloseb9621712010-04-24 17:59:49 +000012251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12252$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012253if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012254
Matthias Kloseb9621712010-04-24 17:59:49 +000012255$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012256
12257fi
12258
Guido van Rossumda88dad1995-01-26 00:46:29 +000012259was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12261$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012263/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012264
12265#include <sys/types.h>
12266#include <sys/select.h>
12267#include <sys/time.h>
12268
Martin v. Löwis11437992002-04-12 09:54:03 +000012269int
12270main ()
12271{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012272;
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 ;
12274 return 0;
12275}
12276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012278
12279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012281
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012282 was_it_defined=yes
12283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12287$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288
Matthias Kloseb9621712010-04-24 17:59:49 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12290$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012291if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012293else
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012295/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012296#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012297int
12298main ()
12299{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012300struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 ;
12302 return 0;
12303}
12304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012306 ac_cv_struct_addrinfo=yes
12307else
Matthias Kloseb9621712010-04-24 17:59:49 +000012308 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12311fi
12312
Matthias Kloseb9621712010-04-24 17:59:49 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12314$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012315if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012318
12319fi
12320
Matthias Kloseb9621712010-04-24 17:59:49 +000012321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12322$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012323if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012325else
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012327/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012328
12329# include <sys/types.h>
12330# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012331int
12332main ()
12333{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012334struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 ;
12336 return 0;
12337}
12338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012340 ac_cv_struct_sockaddr_storage=yes
12341else
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12345fi
12346
Matthias Kloseb9621712010-04-24 17:59:49 +000012347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12348$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012349if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012350
Matthias Kloseb9621712010-04-24 17:59:49 +000012351$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012352
12353fi
12354
Guido van Rossum627b2d71993-12-24 10:39:16 +000012355# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12358$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012359if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012361else
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012364$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012365int
12366main ()
12367{
12368static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012369test_array [0] = 0;
12370return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012371
12372 ;
12373 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012374}
Martin v. Löwis11437992002-04-12 09:54:03 +000012375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012376if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012377 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012378else
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12384$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012387
12388fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012389
Matthias Kloseb9621712010-04-24 17:59:49 +000012390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12391$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012392if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012394else
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012396/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012397
Martin v. Löwis11437992002-04-12 09:54:03 +000012398int
12399main ()
12400{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012401
Martin v. Löwis11437992002-04-12 09:54:03 +000012402#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012403 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012405 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012406 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407 char const *const *pcpcc;
12408 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012409 /* NEC SVR4.0.2 mips cc rejects this. */
12410 struct point {int x, y;};
12411 static struct point const zero = {0,0};
12412 /* AIX XL C 1.02.0.0 rejects this.
12413 It does not let you subtract one const X* pointer from another in
12414 an arm of an if-expression whose if-part is not a constant
12415 expression */
12416 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419 ++pcpcc;
12420 ppc = (char**) pcpcc;
12421 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012422 { /* SCO 3.2v4 cc rejects this sort of thing. */
12423 char tx;
12424 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012425 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012426
Martin v. Löwis11437992002-04-12 09:54:03 +000012427 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012429 }
12430 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12431 int x[] = {25, 17};
12432 const int *foo = &x[0];
12433 ++foo;
12434 }
12435 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12436 typedef const int *iptr;
12437 iptr p = 0;
12438 ++p;
12439 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012440 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012442 struct s { int j; const int *ap[3]; } bx;
12443 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 }
12445 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12446 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012448 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012450#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012451
Martin v. Löwis11437992002-04-12 09:54:03 +000012452 ;
12453 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012454}
Martin v. Löwis11437992002-04-12 09:54:03 +000012455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012456if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012457 ac_cv_c_const=yes
12458else
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12464$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012465if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012466
Matthias Kloseb9621712010-04-24 17:59:49 +000012467$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012468
12469fi
12470
Michael W. Hudson54241132001-12-07 15:38:26 +000012471
Guido van Rossumda88dad1995-01-26 00:46:29 +000012472works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12474$as_echo_n "checking for working volatile... " >&6; }
12475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012476/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012477
Martin v. Löwis11437992002-04-12 09:54:03 +000012478int
12479main ()
12480{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012481volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 ;
12483 return 0;
12484}
12485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012486if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012487 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012488else
Skip Montanaro6dead952003-09-25 14:50:04 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012491
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012492
Guido van Rossum627b2d71993-12-24 10:39:16 +000012493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12496$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012497
Guido van Rossumda88dad1995-01-26 00:46:29 +000012498works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12500$as_echo_n "checking for working signed char... " >&6; }
12501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012502/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012503
Martin v. Löwis11437992002-04-12 09:54:03 +000012504int
12505main ()
12506{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012507signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012508 ;
12509 return 0;
12510}
12511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012512if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012513 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012514else
Skip Montanaro6dead952003-09-25 14:50:04 +000012515
Matthias Kloseb9621712010-04-24 17:59:49 +000012516$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012517
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012518
Guido van Rossum7f43da71994-08-01 12:15:30 +000012519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12522$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012523
Guido van Rossumda88dad1995-01-26 00:46:29 +000012524have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12526$as_echo_n "checking for prototypes... " >&6; }
12527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012528/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012529int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012530int
12531main ()
12532{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012533return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 ;
12535 return 0;
12536}
12537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
Matthias Kloseb9621712010-04-24 17:59:49 +000012540$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012541
Matthias Kloseb159a552010-04-25 21:00:44 +000012542 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12546$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012547
Guido van Rossumda88dad1995-01-26 00:46:29 +000012548works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12550$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012552/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012553
12554#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012555int foo(int x, ...) {
12556 va_list va;
12557 va_start(va, x);
12558 va_arg(va, int);
12559 va_arg(va, char *);
12560 va_arg(va, double);
12561 return 0;
12562}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012563
Martin v. Löwis11437992002-04-12 09:54:03 +000012564int
12565main ()
12566{
Guido van Rossum90eea071996-08-30 20:58:57 +000012567return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 ;
12569 return 0;
12570}
12571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012572if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012573
12574
Matthias Kloseb9621712010-04-24 17:59:49 +000012575$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012576
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012577 works=yes
12578
Guido van Rossum627b2d71993-12-24 10:39:16 +000012579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12582$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012583
Martin v. Löwisd6320502004-08-12 13:45:08 +000012584# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12586$as_echo_n "checking for socketpair... " >&6; }
12587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012588/* end confdefs.h. */
12589
12590#include <sys/types.h>
12591#include <sys/socket.h>
12592
12593int
12594main ()
12595{
12596void *x=socketpair
12597 ;
12598 return 0;
12599}
12600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012602
Matthias Kloseb9621712010-04-24 17:59:49 +000012603$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012604
Matthias Kloseb159a552010-04-25 21:00:44 +000012605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012606$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012607else
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12609$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012610
12611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012613
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012614# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12616$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012619#include <sys/types.h>
12620#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012621int
12622main ()
12623{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012624struct sockaddr x;
12625x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 ;
12627 return 0;
12628}
12629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012630if ac_fn_c_try_compile "$LINENO"; then :
12631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12632$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012635
12636else
Matthias Kloseb9621712010-04-24 17:59:49 +000012637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12638$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012639
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012642
Guido van Rossumda88dad1995-01-26 00:46:29 +000012643va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12645$as_echo_n "checking whether va_list is an array... " >&6; }
12646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012647/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012648
12649#ifdef HAVE_STDARG_PROTOTYPES
12650#include <stdarg.h>
12651#else
12652#include <varargs.h>
12653#endif
12654
Martin v. Löwis11437992002-04-12 09:54:03 +000012655int
12656main ()
12657{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012658va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012659 ;
12660 return 0;
12661}
12662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012663if ac_fn_c_try_compile "$LINENO"; then :
12664
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012665else
Skip Montanaro6dead952003-09-25 14:50:04 +000012666
Martin v. Löwis11437992002-04-12 09:54:03 +000012667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012669
Guido van Rossumda88dad1995-01-26 00:46:29 +000012670 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012671
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12675$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012676
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012677# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012678
12679
Matthias Kloseb9621712010-04-24 17:59:49 +000012680ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012681if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012682
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012684
Matthias Kloseb9621712010-04-24 17:59:49 +000012685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12686$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012687 OLD_CFLAGS=$CFLAGS
12688 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012690/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012691
12692# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012693
Martin v. Löwis11437992002-04-12 09:54:03 +000012694int
12695main ()
12696{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012697
12698 char *name;
12699 struct hostent *he, *res;
12700 char buffer[2048];
12701 int buflen = 2048;
12702 int h_errnop;
12703
12704 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
12706 ;
12707 return 0;
12708}
12709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012710if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012713
Martin v. Löwis11437992002-04-12 09:54:03 +000012714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012716
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12718$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012719
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012720else
Skip Montanaro6dead952003-09-25 14:50:04 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12723$as_echo "no" >&6; }
12724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12725$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012727/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012728
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012729# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012730
Martin v. Löwis11437992002-04-12 09:54:03 +000012731int
12732main ()
12733{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012734
12735 char *name;
12736 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012737 char buffer[2048];
12738 int buflen = 2048;
12739 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012740
Matthias Kloseb159a552010-04-25 21:00:44 +000012741 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
12743 ;
12744 return 0;
12745}
12746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012747if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012748
Matthias Kloseb9621712010-04-24 17:59:49 +000012749 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012750
Martin v. Löwis11437992002-04-12 09:54:03 +000012751
Matthias Kloseb159a552010-04-25 21:00:44 +000012752$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12755$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012757else
Skip Montanaro6dead952003-09-25 14:50:04 +000012758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12760$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12762$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12764/* end confdefs.h. */
12765
12766# include <netdb.h>
12767
12768int
12769main ()
12770{
12771
12772 char *name;
12773 struct hostent *he;
12774 struct hostent_data data;
12775
12776 (void) gethostbyname_r(name, he, &data);
12777
12778 ;
12779 return 0;
12780}
12781_ACEOF
12782if ac_fn_c_try_compile "$LINENO"; then :
12783
12784 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12785
12786
12787$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12788
12789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12790$as_echo "yes" >&6; }
12791
12792else
12793
12794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12795$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012796
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012805 CFLAGS=$OLD_CFLAGS
12806
12807else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012808
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 for ac_func in gethostbyname
12810do :
12811 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012812if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012813 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012814#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012815_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012816
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012817fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012818done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012819
Michael W. Hudson54241132001-12-07 15:38:26 +000012820
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012821fi
12822
Michael W. Hudson54241132001-12-07 15:38:26 +000012823
12824
12825
12826
12827
12828
Guido van Rossum627b2d71993-12-24 10:39:16 +000012829# checks for system services
12830# (none yet)
12831
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012833ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012834if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012835
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012836else
Matthias Kloseb9621712010-04-24 17:59:49 +000012837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12838$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012839if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012841else
Martin v. Löwis11437992002-04-12 09:54:03 +000012842 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012843LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012847/* Override any GCC internal prototype to avoid an error.
12848 Use char because int might match the return type of a GCC
12849 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012850#ifdef __cplusplus
12851extern "C"
12852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012853char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012854int
12855main ()
12856{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 ;
12859 return 0;
12860}
12861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012862if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012864else
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012867rm -f core conftest.err conftest.$ac_objext \
12868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012869LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12872$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012873if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012874 cat >>confdefs.h <<_ACEOF
12875#define HAVE_LIBIEEE 1
12876_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012877
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012878 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012879
Guido van Rossum627b2d71993-12-24 10:39:16 +000012880fi
12881
Michael W. Hudson54241132001-12-07 15:38:26 +000012882
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012883fi
12884
Michael W. Hudson54241132001-12-07 15:38:26 +000012885
Guido van Rossum7f253911997-05-09 02:42:48 +000012886# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12888$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012891if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012893if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012894then
12895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012897
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12899$as_echo "yes" >&6; }
12900else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12901$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012902fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012903else
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12905$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906fi
12907
Guido van Rossum7f253911997-05-09 02:42:48 +000012908
Guido van Rossum7f43da71994-08-01 12:15:30 +000012909# check for --with-libm=...
12910
Guido van Rossum563e7081996-09-10 18:20:48 +000012911case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012912Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012913*) LIBM=-lm
12914esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12916$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012919if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012921if test "$withval" = no
12922then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12924$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012925elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012926then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12928$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012929else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012930fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012931else
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12933$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934fi
12935
Guido van Rossum7f43da71994-08-01 12:15:30 +000012936
12937# check for --with-libc=...
12938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12940$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012942# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012943if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012945if test "$withval" = no
12946then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12948$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012949elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012950then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12952$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012953else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012954fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012955else
Matthias Kloseb9621712010-04-24 17:59:49 +000012956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12957$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958fi
12959
Guido van Rossum7f43da71994-08-01 12:15:30 +000012960
Stefan Krah1919b7e2012-03-21 18:25:23 +010012961# **************************************
12962# * Check for gcc x64 inline assembler *
12963# **************************************
12964
12965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12966$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12968/* end confdefs.h. */
12969
12970int
12971main ()
12972{
12973
12974 __asm__ __volatile__ ("movq %rcx, %rax");
12975
12976 ;
12977 return 0;
12978}
12979_ACEOF
12980if ac_fn_c_try_compile "$LINENO"; then :
12981 have_gcc_asm_for_x64=yes
12982else
12983 have_gcc_asm_for_x64=no
12984fi
12985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12987$as_echo "$have_gcc_asm_for_x64" >&6; }
12988if test "$have_gcc_asm_for_x64" = yes
12989then
12990
12991$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12992
12993fi
12994
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012995# **************************************************
12996# * Check for various properties of floating point *
12997# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13000$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013001if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013003else
13004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013006 ac_cv_little_endian_double=no
13007else
Matthias Kloseb9621712010-04-24 17:59:49 +000013008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013009/* end confdefs.h. */
13010
13011#include <string.h>
13012int main() {
13013 double x = 9006104071832581.0;
13014 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13015 return 0;
13016 else
13017 return 1;
13018}
13019
13020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013021if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013022 ac_cv_little_endian_double=yes
13023else
Matthias Kloseb9621712010-04-24 17:59:49 +000013024 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13027 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013028fi
13029
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013030fi
13031
Matthias Kloseb9621712010-04-24 17:59:49 +000013032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13033$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013034if test "$ac_cv_little_endian_double" = yes
13035then
13036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013038
13039fi
13040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13042$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013043if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013045else
13046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013048 ac_cv_big_endian_double=no
13049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013051/* end confdefs.h. */
13052
13053#include <string.h>
13054int main() {
13055 double x = 9006104071832581.0;
13056 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13057 return 0;
13058 else
13059 return 1;
13060}
13061
13062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013063if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013064 ac_cv_big_endian_double=yes
13065else
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13069 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013070fi
13071
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013072fi
13073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13075$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013076if test "$ac_cv_big_endian_double" = yes
13077then
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013080
13081fi
13082
13083# Some ARM platforms use a mixed-endian representation for doubles.
13084# While Python doesn't currently have full support for these platforms
13085# (see e.g., issue 1762561), we can at least make sure that float <-> string
13086# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13088$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013089if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013091else
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013094 ac_cv_mixed_endian_double=no
13095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013097/* end confdefs.h. */
13098
13099#include <string.h>
13100int main() {
13101 double x = 9006104071832581.0;
13102 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13103 return 0;
13104 else
13105 return 1;
13106}
13107
13108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013110 ac_cv_mixed_endian_double=yes
13111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13115 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013116fi
13117
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013118fi
13119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13121$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013122if test "$ac_cv_mixed_endian_double" = yes
13123then
13124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013126
13127fi
13128
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013129# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013130# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013131# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013132# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013133# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013134# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013135
13136# This inline assembler syntax may also work for suncc and icc,
13137# so we try it on all platforms.
13138
Matthias Kloseb9621712010-04-24 17:59:49 +000013139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13140$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013142/* end confdefs.h. */
13143
13144int
13145main ()
13146{
13147
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013148 unsigned short cw;
13149 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13150 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013151
13152 ;
13153 return 0;
13154}
13155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013156if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013157 have_gcc_asm_for_x87=yes
13158else
Matthias Kloseb9621712010-04-24 17:59:49 +000013159 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013160fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13163$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013164if test "$have_gcc_asm_for_x87" = yes
13165then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013166
Matthias Kloseb9621712010-04-24 17:59:49 +000013167$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013168
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013170
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013171# Detect whether system arithmetic is subject to x87-style double
13172# rounding issues. The result of this test has little meaning on non
13173# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13174# mode is round-to-nearest and double rounding issues are present, and
13175# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13177$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013178# $BASECFLAGS may affect the result
13179ac_save_cc="$CC"
13180CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013181if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013182 ac_cv_x87_double_rounding=no
13183else
Matthias Kloseb9621712010-04-24 17:59:49 +000013184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013185/* end confdefs.h. */
13186
13187#include <stdlib.h>
13188#include <math.h>
13189int main() {
13190 volatile double x, y, z;
13191 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13192 x = 0.99999999999999989; /* 1-2**-53 */
13193 y = 1./x;
13194 if (y != 1.)
13195 exit(0);
13196 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13197 x = 1e16;
13198 y = 2.99999;
13199 z = x + y;
13200 if (z != 1e16+4.)
13201 exit(0);
13202 /* both tests show evidence of double rounding */
13203 exit(1);
13204}
13205
13206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013207if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013208 ac_cv_x87_double_rounding=no
13209else
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13213 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013214fi
13215
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013216CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13218$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013219if test "$ac_cv_x87_double_rounding" = yes
13220then
13221
Matthias Kloseb9621712010-04-24 17:59:49 +000013222$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013223
13224fi
13225
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013226# ************************************
13227# * Check for mathematical functions *
13228# ************************************
13229
13230LIBS_SAVE=$LIBS
13231LIBS="$LIBS $LIBM"
13232
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013233for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13234do :
13235 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13236ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013237if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013238 cat >>confdefs.h <<_ACEOF
13239#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13240_ACEOF
13241
13242fi
13243done
13244
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013245for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013246do :
13247 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13248ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013249if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013250 cat >>confdefs.h <<_ACEOF
13251#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13252_ACEOF
13253
13254fi
13255done
13256
13257ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13258"
Victor Stinnere0be4232011-10-25 13:06:09 +020013259if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013260 ac_have_decl=1
13261else
13262 ac_have_decl=0
13263fi
13264
13265cat >>confdefs.h <<_ACEOF
13266#define HAVE_DECL_ISINF $ac_have_decl
13267_ACEOF
13268ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13269"
Victor Stinnere0be4232011-10-25 13:06:09 +020013270if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013271 ac_have_decl=1
13272else
13273 ac_have_decl=0
13274fi
13275
13276cat >>confdefs.h <<_ACEOF
13277#define HAVE_DECL_ISNAN $ac_have_decl
13278_ACEOF
13279ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13280"
Victor Stinnere0be4232011-10-25 13:06:09 +020013281if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013282 ac_have_decl=1
13283else
13284 ac_have_decl=0
13285fi
13286
13287cat >>confdefs.h <<_ACEOF
13288#define HAVE_DECL_ISFINITE $ac_have_decl
13289_ACEOF
13290
13291
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013292# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13293# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13295$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013296if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013298else
13299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013301 ac_cv_tanh_preserves_zero_sign=no
13302else
Matthias Kloseb9621712010-04-24 17:59:49 +000013303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013304/* end confdefs.h. */
13305
13306#include <math.h>
13307#include <stdlib.h>
13308int main() {
13309 /* return 0 if either negative zeros don't exist
13310 on this platform or if negative zeros exist
13311 and tanh(-0.) == -0. */
13312 if (atan2(0., -1.) == atan2(-0., -1.) ||
13313 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13314 else exit(1);
13315}
13316
13317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013318if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013319 ac_cv_tanh_preserves_zero_sign=yes
13320else
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013322fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13324 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013325fi
13326
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013327fi
13328
Matthias Kloseb9621712010-04-24 17:59:49 +000013329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13330$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013331if test "$ac_cv_tanh_preserves_zero_sign" = yes
13332then
13333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013335
13336fi
13337
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013338if test "$ac_cv_func_log1p" = yes
13339then
13340 # On some versions of AIX, log1p(-0.) returns 0. instead of
13341 # -0. See issue #9920.
13342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13343$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013344 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013345 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013346else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013347
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013348 if test "$cross_compiling" = yes; then :
13349 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013350else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13352/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013353
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013354 #include <math.h>
13355 #include <stdlib.h>
13356 int main() {
13357 /* Fail if the signs of log1p(-0.) and -0. can be
13358 distinguished. */
13359 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13360 return 0;
13361 else
13362 return 1;
13363 }
13364
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013365_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013366if ac_fn_c_try_run "$LINENO"; then :
13367 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013368else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013369 ac_cv_log1p_drops_zero_sign=yes
13370fi
13371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13372 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013373fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013374
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013375fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013376
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13378$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13379fi
13380if test "$ac_cv_log1p_drops_zero_sign" = yes
13381then
13382
13383$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13384
13385fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013386
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013387LIBS=$LIBS_SAVE
13388
Mark Dickinsona614f042009-11-28 12:48:43 +000013389# For multiprocessing module, check that sem_open
13390# actually works. For FreeBSD versions <= 7.2,
13391# the kernel module that provides POSIX semaphores
13392# isn't loaded by default, so an attempt to call
13393# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13395$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013396if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013398else
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013400 ac_cv_posix_semaphores_enabled=yes
13401else
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013403/* end confdefs.h. */
13404
13405#include <unistd.h>
13406#include <fcntl.h>
13407#include <stdio.h>
13408#include <semaphore.h>
13409#include <sys/stat.h>
13410
13411int main(void) {
13412 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13413 if (a == SEM_FAILED) {
13414 perror("sem_open");
13415 return 1;
13416 }
13417 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013418 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013419 return 0;
13420}
13421
13422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013423if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013424 ac_cv_posix_semaphores_enabled=yes
13425else
Matthias Kloseb9621712010-04-24 17:59:49 +000013426 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13429 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013430fi
13431
13432
Mark Dickinsona614f042009-11-28 12:48:43 +000013433fi
13434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13436$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013437if test $ac_cv_posix_semaphores_enabled = no
13438then
13439
Matthias Kloseb9621712010-04-24 17:59:49 +000013440$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013441
13442fi
13443
Mark Dickinson10683072009-04-18 21:18:19 +000013444# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13446$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013447if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013451 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013452else
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013454/* end confdefs.h. */
13455
13456#include <unistd.h>
13457#include <fcntl.h>
13458#include <stdio.h>
13459#include <semaphore.h>
13460#include <sys/stat.h>
13461
13462int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013463 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013464 int count;
13465 int res;
13466 if(a==SEM_FAILED){
13467 perror("sem_open");
13468 return 1;
13469
13470 }
13471 res = sem_getvalue(a, &count);
13472 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013473 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013474 return res==-1 ? 1 : 0;
13475}
13476
Mark Dickinson10683072009-04-18 21:18:19 +000013477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013478if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013479 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013480else
Matthias Kloseb9621712010-04-24 17:59:49 +000013481 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13484 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013485fi
13486
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013487
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013488fi
13489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13491$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013492if test $ac_cv_broken_sem_getvalue = yes
13493then
13494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013496
13497fi
13498
Mark Dickinsonbd792642009-03-18 20:06:12 +000013499# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13501$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013502# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013503if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013504 enableval=$enable_big_digits; case $enable_big_digits in
13505yes)
13506 enable_big_digits=30 ;;
13507no)
13508 enable_big_digits=15 ;;
1350915|30)
13510 ;;
13511*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013512 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 +000013513esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13515$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013516
13517cat >>confdefs.h <<_ACEOF
13518#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13519_ACEOF
13520
13521
13522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13524$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013525fi
13526
13527
Guido van Rossumef2255b2000-03-10 22:30:29 +000013528# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013529ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013530if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013531
13532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013534
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013535 wchar_h="yes"
13536
Guido van Rossumef2255b2000-03-10 22:30:29 +000013537else
Martin v. Löwis11437992002-04-12 09:54:03 +000013538 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013539
13540fi
13541
Michael W. Hudson54241132001-12-07 15:38:26 +000013542
Martin v. Löwis11437992002-04-12 09:54:03 +000013543
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013544# determine wchar_t size
13545if test "$wchar_h" = yes
13546then
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13549# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13550# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13552$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013553if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013555else
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13557"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013558
Martin v. Löwis11437992002-04-12 09:54:03 +000013559else
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 if test "$ac_cv_type_wchar_t" = yes; then
13561 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13562$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013563as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013564See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565 else
13566 ac_cv_sizeof_wchar_t=0
13567 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013569
Martin v. Löwis11437992002-04-12 09:54:03 +000013570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13572$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013573
13574
13575
Martin v. Löwis11437992002-04-12 09:54:03 +000013576cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013577#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013578_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013579
Michael W. Hudson54241132001-12-07 15:38:26 +000013580
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013581fi
13582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13584$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013585have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013587/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013588
13589#include <tcl.h>
13590#if TCL_UTF_MAX != 6
13591# error "NOT UCS4_TCL"
13592#endif
13593int
13594main ()
13595{
13596
13597 ;
13598 return 0;
13599}
13600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013602
13603
Matthias Kloseb9621712010-04-24 17:59:49 +000013604$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013605
13606 have_ucs4_tcl=yes
13607
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13611$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013612
Skip Montanaro6dead952003-09-25 14:50:04 +000013613# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013614if test "$wchar_h" = yes
13615then
13616 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13618$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013619 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013621else
13622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013624 ac_cv_wchar_t_signed=yes
13625else
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013627/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013628
13629 #include <wchar.h>
13630 int main()
13631 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013632 /* Success: exit code 0 */
13633 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013634 }
13635
13636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013637if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013638 ac_cv_wchar_t_signed=yes
13639else
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013644fi
13645
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013646fi
13647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13649$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013650fi
13651
Georg Brandl52d168a2008-01-07 18:10:24 +000013652# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013653if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013654 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013655then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013656 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
Georg Brandl52d168a2008-01-07 18:10:24 +000013660else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013661 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013662fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13664$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013665
13666# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13668$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013669if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013671else
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 ac_cv_c_bigendian=unknown
13673 # See if we're dealing with a universal compiler.
13674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13675/* end confdefs.h. */
13676#ifndef __APPLE_CC__
13677 not a universal capable compiler
13678 #endif
13679 typedef int dummy;
13680
Skip Montanaro6dead952003-09-25 14:50:04 +000013681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013682if ac_fn_c_try_compile "$LINENO"; then :
13683
13684 # Check for potential -arch flags. It is not universal unless
13685 # there are at least two -arch flags with different values.
13686 ac_arch=
13687 ac_prev=
13688 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13689 if test -n "$ac_prev"; then
13690 case $ac_word in
13691 i?86 | x86_64 | ppc | ppc64)
13692 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13693 ac_arch=$ac_word
13694 else
13695 ac_cv_c_bigendian=universal
13696 break
13697 fi
13698 ;;
13699 esac
13700 ac_prev=
13701 elif test "x$ac_word" = "x-arch"; then
13702 ac_prev=arch
13703 fi
13704 done
13705fi
13706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13707 if test $ac_cv_c_bigendian = unknown; then
13708 # See if sys/param.h defines the BYTE_ORDER macro.
13709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013710/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013711#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013713
Martin v. Löwis11437992002-04-12 09:54:03 +000013714int
13715main ()
13716{
Matthias Kloseb9621712010-04-24 17:59:49 +000013717#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13718 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13719 && LITTLE_ENDIAN)
13720 bogus endian macros
13721 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
13723 ;
13724 return 0;
13725}
13726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013727if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013728 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013730/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013731#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013733
Martin v. Löwis11437992002-04-12 09:54:03 +000013734int
13735main ()
13736{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013737#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 not big endian
13739 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013740
13741 ;
13742 return 0;
13743}
13744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013745if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013746 ac_cv_c_bigendian=yes
13747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013751fi
13752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13753 fi
13754 if test $ac_cv_c_bigendian = unknown; then
13755 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013757/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013758#include <limits.h>
13759
Martin v. Löwis11437992002-04-12 09:54:03 +000013760int
13761main ()
13762{
Matthias Kloseb9621712010-04-24 17:59:49 +000013763#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13764 bogus endian macros
13765 #endif
13766
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 ;
13768 return 0;
13769}
13770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013771if ac_fn_c_try_compile "$LINENO"; then :
13772 # It does; now see whether it defined to _BIG_ENDIAN or not.
13773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13774/* end confdefs.h. */
13775#include <limits.h>
13776
13777int
13778main ()
13779{
13780#ifndef _BIG_ENDIAN
13781 not big endian
13782 #endif
13783
13784 ;
13785 return 0;
13786}
13787_ACEOF
13788if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013790else
Matthias Kloseb9621712010-04-24 17:59:49 +000013791 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13794fi
13795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13796 fi
13797 if test $ac_cv_c_bigendian = unknown; then
13798 # Compile a test program.
13799 if test "$cross_compiling" = yes; then :
13800 # Try to guess by grepping values from an object file.
13801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13802/* end confdefs.h. */
13803short int ascii_mm[] =
13804 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13805 short int ascii_ii[] =
13806 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13807 int use_ascii (int i) {
13808 return ascii_mm[i] + ascii_ii[i];
13809 }
13810 short int ebcdic_ii[] =
13811 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13812 short int ebcdic_mm[] =
13813 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13814 int use_ebcdic (int i) {
13815 return ebcdic_mm[i] + ebcdic_ii[i];
13816 }
13817 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013818
Matthias Kloseb9621712010-04-24 17:59:49 +000013819int
13820main ()
13821{
13822return use_ascii (foo) == use_ebcdic (foo);
13823 ;
13824 return 0;
13825}
13826_ACEOF
13827if ac_fn_c_try_compile "$LINENO"; then :
13828 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13829 ac_cv_c_bigendian=yes
13830 fi
13831 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13832 if test "$ac_cv_c_bigendian" = unknown; then
13833 ac_cv_c_bigendian=no
13834 else
13835 # finding both strings is unlikely to happen, but who knows?
13836 ac_cv_c_bigendian=unknown
13837 fi
13838 fi
13839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013841else
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013843/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013845int
13846main ()
13847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013848
Matthias Kloseb9621712010-04-24 17:59:49 +000013849 /* Are we little or big endian? From Harbison&Steele. */
13850 union
13851 {
13852 long int l;
13853 char c[sizeof (long int)];
13854 } u;
13855 u.l = 1;
13856 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013857
13858 ;
13859 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013860}
Martin v. Löwis11437992002-04-12 09:54:03 +000013861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013862if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013863 ac_cv_c_bigendian=no
13864else
Matthias Kloseb9621712010-04-24 17:59:49 +000013865 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13868 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13874$as_echo "$ac_cv_c_bigendian" >&6; }
13875 case $ac_cv_c_bigendian in #(
13876 yes)
13877 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13878;; #(
13879 no)
13880 ;; #(
13881 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013882
Matthias Kloseb9621712010-04-24 17:59:49 +000013883$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013884
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 ;; #(
13886 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013887 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013888 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013890
Michael W. Hudson54241132001-12-07 15:38:26 +000013891
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013892# ABI version string for Python extension modules. This appears between the
13893# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13894# from the following attributes which affect the ABI of this Python build (in
13895# this order):
13896#
13897# * The Python implementation (always 'cpython-' for us)
13898# * The major and minor version numbers
13899# * --with-pydebug (adds a 'd')
13900# * --with-pymalloc (adds a 'm')
13901# * --with-wide-unicode (adds a 'u')
13902#
13903# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013904# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13905# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013906
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13908$as_echo_n "checking ABIFLAGS... " >&6; }
13909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13910$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13912$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013913SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13915$as_echo "$SOABI" >&6; }
13916
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013917
13918case $ac_sys_system in
13919 Linux*|GNU*)
13920 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13921 *)
13922 EXT_SUFFIX=${SHLIB_SUFFIX};;
13923esac
13924
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13926$as_echo_n "checking LDVERSION... " >&6; }
13927LDVERSION='$(VERSION)$(ABIFLAGS)'
13928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13929$as_echo "$LDVERSION" >&6; }
13930
doko@python.org87421192013-01-26 11:39:31 +010013931
13932LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13933
13934
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013935# Check whether right shifting a negative integer extends the sign bit
13936# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13938$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013939if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013940 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013941else
Martin v. Löwis11437992002-04-12 09:54:03 +000013942
Matthias Kloseb9621712010-04-24 17:59:49 +000013943if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013944 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013945else
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013947/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013948
13949int main()
13950{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013951 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013952}
13953
Martin v. Löwis11437992002-04-12 09:54:03 +000013954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013955if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013956 ac_cv_rshift_extends_sign=yes
13957else
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13961 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013962fi
13963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013964fi
13965
Matthias Kloseb9621712010-04-24 17:59:49 +000013966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13967$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013968if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013969then
Martin v. Löwis11437992002-04-12 09:54:03 +000013970
Matthias Kloseb9621712010-04-24 17:59:49 +000013971$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013972
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013973fi
13974
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013975# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13977$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013978if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013980else
Martin v. Löwis11437992002-04-12 09:54:03 +000013981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013983/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013984#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013985int
13986main ()
13987{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013988
13989 FILE *f = fopen("/dev/null", "r");
13990 flockfile(f);
13991 getc_unlocked(f);
13992 funlockfile(f);
13993
Martin v. Löwis11437992002-04-12 09:54:03 +000013994 ;
13995 return 0;
13996}
13997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013998if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013999 ac_cv_have_getc_unlocked=yes
14000else
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 ac_cv_have_getc_unlocked=no
14002fi
14003rm -f core conftest.err conftest.$ac_objext \
14004 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014006
Matthias Kloseb9621712010-04-24 17:59:49 +000014007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14008$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014009if test "$ac_cv_have_getc_unlocked" = yes
14010then
Martin v. Löwis11437992002-04-12 09:54:03 +000014011
Matthias Kloseb9621712010-04-24 17:59:49 +000014012$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014013
14014fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014015
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014016# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014017# save the value of LIBS so we don't actually link Python with readline
14018LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014019
Gregory P. Smith18820942008-09-07 06:24:49 +000014020# On some systems we need to link readline to a termcap compatible
14021# library. NOTE: Keep the precedence of listed libraries synchronised
14022# with setup.py.
14023py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14025$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014026for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014027 if test -z "$py_libtermcap"; then
14028 READLINE_LIBS="-lreadline"
14029 else
14030 READLINE_LIBS="-lreadline -l$py_libtermcap"
14031 fi
14032 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014034/* end confdefs.h. */
14035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014036/* Override any GCC internal prototype to avoid an error.
14037 Use char because int might match the return type of a GCC
14038 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014039#ifdef __cplusplus
14040extern "C"
14041#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014042char readline ();
14043int
14044main ()
14045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014046return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014047 ;
14048 return 0;
14049}
14050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014051if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014052 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014054rm -f core conftest.err conftest.$ac_objext \
14055 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014056 if test $py_cv_lib_readline = yes; then
14057 break
14058 fi
14059done
14060# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14061#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014062if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14064$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014065else
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14067$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014068
Matthias Kloseb9621712010-04-24 17:59:49 +000014069$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014070
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014071fi
14072
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014073# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14075$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014076if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014078else
14079 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014080LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014082/* end confdefs.h. */
14083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014084/* Override any GCC internal prototype to avoid an error.
14085 Use char because int might match the return type of a GCC
14086 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014087#ifdef __cplusplus
14088extern "C"
14089#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014090char rl_callback_handler_install ();
14091int
14092main ()
14093{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014095 ;
14096 return 0;
14097}
14098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014099if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014100 ac_cv_lib_readline_rl_callback_handler_install=yes
14101else
Matthias Kloseb9621712010-04-24 17:59:49 +000014102 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014104rm -f core conftest.err conftest.$ac_objext \
14105 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014106LIBS=$ac_check_lib_save_LIBS
14107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14109$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014110if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014113
14114fi
14115
14116
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014117# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014119/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014120#include <readline/readline.h>
14121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014122if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014123 have_readline=yes
14124else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014125 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014126
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014127fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014128rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014129if test $have_readline = yes
14130then
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014132/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014133#include <readline/readline.h>
14134
14135_ACEOF
14136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014138
Matthias Kloseb9621712010-04-24 17:59:49 +000014139$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014140
14141fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014142rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014145/* end confdefs.h. */
14146#include <readline/readline.h>
14147
14148_ACEOF
14149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014151
Matthias Kloseb9621712010-04-24 17:59:49 +000014152$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014153
14154fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014155rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014156
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014157fi
14158
Martin v. Löwis0daad592001-09-30 21:09:59 +000014159# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14161$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014162if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014164else
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014166LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170/* Override any GCC internal prototype to avoid an error.
14171 Use char because int might match the return type of a GCC
14172 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014173#ifdef __cplusplus
14174extern "C"
14175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014176char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014177int
14178main ()
14179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014180return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014181 ;
14182 return 0;
14183}
14184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014185if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014186 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014187else
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014190rm -f core conftest.err conftest.$ac_objext \
14191 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014192LIBS=$ac_check_lib_save_LIBS
14193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14195$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014196if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014197
Matthias Kloseb9621712010-04-24 17:59:49 +000014198$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014199
Martin v. Löwis0daad592001-09-30 21:09:59 +000014200fi
14201
Michael W. Hudson54241132001-12-07 15:38:26 +000014202
Thomas Wouters89d996e2007-09-08 17:39:28 +000014203# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14205$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014206if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014208else
14209 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014210LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014212/* end confdefs.h. */
14213
14214/* Override any GCC internal prototype to avoid an error.
14215 Use char because int might match the return type of a GCC
14216 builtin and then its argument prototype would still apply. */
14217#ifdef __cplusplus
14218extern "C"
14219#endif
14220char rl_completion_display_matches_hook ();
14221int
14222main ()
14223{
14224return rl_completion_display_matches_hook ();
14225 ;
14226 return 0;
14227}
14228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014229if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014230 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14231else
Matthias Kloseb9621712010-04-24 17:59:49 +000014232 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014234rm -f core conftest.err conftest.$ac_objext \
14235 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014236LIBS=$ac_check_lib_save_LIBS
14237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14239$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014240if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014241
Matthias Kloseb9621712010-04-24 17:59:49 +000014242$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014243
14244fi
14245
14246
Martin v. Löwis0daad592001-09-30 21:09:59 +000014247# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14249$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014250if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014252else
Martin v. Löwis11437992002-04-12 09:54:03 +000014253 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014254LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258/* Override any GCC internal prototype to avoid an error.
14259 Use char because int might match the return type of a GCC
14260 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014261#ifdef __cplusplus
14262extern "C"
14263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014264char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014265int
14266main ()
14267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014269 ;
14270 return 0;
14271}
14272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014273if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014274 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014275else
Matthias Kloseb9621712010-04-24 17:59:49 +000014276 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014278rm -f core conftest.err conftest.$ac_objext \
14279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014280LIBS=$ac_check_lib_save_LIBS
14281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14283$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014284if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014285
Matthias Kloseb9621712010-04-24 17:59:49 +000014286$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014287
Guido van Rossum353ae582001-07-10 16:45:32 +000014288fi
14289
Jack Jansendd19cf82001-12-06 22:36:17 +000014290
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014291# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014293/* end confdefs.h. */
14294#include <readline/readline.h>
14295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014296if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014297 have_readline=yes
14298else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014299 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014300
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014301fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014302rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014303if test $have_readline = yes
14304then
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014306/* end confdefs.h. */
14307#include <readline/readline.h>
14308
14309_ACEOF
14310if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014312
Matthias Kloseb9621712010-04-24 17:59:49 +000014313$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014314
14315fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014316rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014317
14318fi
14319
Martin v. Löwis82bca632006-02-10 20:49:30 +000014320# End of readline checks: restore LIBS
14321LIBS=$LIBS_no_readline
14322
Matthias Kloseb9621712010-04-24 17:59:49 +000014323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14324$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014325if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014327else
Martin v. Löwis11437992002-04-12 09:54:03 +000014328
Matthias Kloseb9621712010-04-24 17:59:49 +000014329if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014330 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014331else
Matthias Kloseb9621712010-04-24 17:59:49 +000014332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014333/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014334
14335int main()
14336{
14337 int val1 = nice(1);
14338 if (val1 != -1 && val1 == nice(2))
14339 exit(0);
14340 exit(1);
14341}
14342
Martin v. Löwis11437992002-04-12 09:54:03 +000014343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014344if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014345 ac_cv_broken_nice=yes
14346else
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14350 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014351fi
14352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353fi
14354
Matthias Kloseb9621712010-04-24 17:59:49 +000014355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14356$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014357if test "$ac_cv_broken_nice" = yes
14358then
Martin v. Löwis11437992002-04-12 09:54:03 +000014359
Matthias Kloseb9621712010-04-24 17:59:49 +000014360$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014361
14362fi
14363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14365$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014366if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014368else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014370 ac_cv_broken_poll=no
14371else
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014373/* end confdefs.h. */
14374
14375#include <poll.h>
14376
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014377int main()
14378{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014379 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014380 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014381
14382 close (42);
14383
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014384 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014385 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014386 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014387 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014388 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014389 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014390 return 1;
14391}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014392
14393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014394if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014395 ac_cv_broken_poll=yes
14396else
Matthias Kloseb9621712010-04-24 17:59:49 +000014397 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14400 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014402
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014403fi
14404
Matthias Kloseb9621712010-04-24 17:59:49 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14406$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014407if test "$ac_cv_broken_poll" = yes
14408then
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014411
14412fi
14413
Brett Cannon43802422005-02-10 20:48:03 +000014414# 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 +000014415# (which is not required by ISO C or UNIX spec) and/or if we support
14416# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014417ac_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 +000014418#include <$ac_cv_struct_tm>
14419
Matthias Kloseb9621712010-04-24 17:59:49 +000014420"
Victor Stinnere0be4232011-10-25 13:06:09 +020014421if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014422
14423cat >>confdefs.h <<_ACEOF
14424#define HAVE_STRUCT_TM_TM_ZONE 1
14425_ACEOF
14426
14427
14428fi
14429
14430if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14431
Matthias Kloseb9621712010-04-24 17:59:49 +000014432$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014433
14434else
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14436"
Victor Stinnere0be4232011-10-25 13:06:09 +020014437if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439else
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441fi
14442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014443cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014444#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445_ACEOF
14446
Matthias Kloseb9621712010-04-24 17:59:49 +000014447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14448$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014449if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014450 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451else
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014453/* end confdefs.h. */
14454#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455#if !HAVE_DECL_TZNAME
14456extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014457#endif
14458
14459int
14460main ()
14461{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014463 ;
14464 return 0;
14465}
14466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014467if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014468 ac_cv_var_tzname=yes
14469else
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014472rm -f core conftest.err conftest.$ac_objext \
14473 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14476$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014477 if test $ac_cv_var_tzname = yes; then
14478
Matthias Kloseb9621712010-04-24 17:59:49 +000014479$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014480
14481 fi
14482fi
14483
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014484
Martin v. Löwis1d459062005-03-14 21:23:33 +000014485# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14487$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014488if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014489 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014490else
14491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014493 ac_cv_working_tzset=no
14494else
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014496/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014497
14498#include <stdlib.h>
14499#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014500#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014501
14502#if HAVE_TZNAME
14503extern char *tzname[];
14504#endif
14505
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014506int main()
14507{
Brett Cannon18367812003-09-19 00:59:16 +000014508 /* Note that we need to ensure that not only does tzset(3)
14509 do 'something' with localtime, but it works as documented
14510 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014511 This includes making sure that tzname is set properly if
14512 tm->tm_zone does not exist since it is the alternative way
14513 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014514
14515 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014516 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014517 */
14518
Martin v. Löwis1d459062005-03-14 21:23:33 +000014519 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014520 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14521
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014522 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014523 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014524 if (localtime(&groundhogday)->tm_hour != 0)
14525 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014526#if HAVE_TZNAME
14527 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14528 if (strcmp(tzname[0], "UTC") ||
14529 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14530 exit(1);
14531#endif
Brett Cannon18367812003-09-19 00:59:16 +000014532
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014533 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014534 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014535 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014536 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014537#if HAVE_TZNAME
14538 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14539 exit(1);
14540#endif
Brett Cannon18367812003-09-19 00:59:16 +000014541
14542 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14543 tzset();
14544 if (localtime(&groundhogday)->tm_hour != 11)
14545 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014546#if HAVE_TZNAME
14547 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14548 exit(1);
14549#endif
14550
14551#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014552 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14553 exit(1);
14554 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14555 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014556#endif
Brett Cannon18367812003-09-19 00:59:16 +000014557
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014558 exit(0);
14559}
14560
14561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014562if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014563 ac_cv_working_tzset=yes
14564else
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14568 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014569fi
14570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571fi
14572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14574$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014575if test "$ac_cv_working_tzset" = yes
14576then
14577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014579
14580fi
14581
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014582# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14584$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014585if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014587else
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014589/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014590#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014591int
14592main ()
14593{
14594
14595struct stat st;
14596st.st_mtim.tv_nsec = 1;
14597
14598 ;
14599 return 0;
14600}
14601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014602if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014603 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014604else
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14608fi
14609
Matthias Kloseb9621712010-04-24 17:59:49 +000014610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14611$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014612if test "$ac_cv_stat_tv_nsec" = yes
14613then
14614
Matthias Kloseb9621712010-04-24 17:59:49 +000014615$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014616
14617fi
14618
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014619# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14621$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014622if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014623 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014624else
Matthias Kloseb9621712010-04-24 17:59:49 +000014625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014626/* end confdefs.h. */
14627#include <sys/stat.h>
14628int
14629main ()
14630{
14631
14632struct stat st;
14633st.st_mtimespec.tv_nsec = 1;
14634
14635 ;
14636 return 0;
14637}
14638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014640 ac_cv_stat_tv_nsec2=yes
14641else
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14645fi
14646
Matthias Kloseb9621712010-04-24 17:59:49 +000014647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14648$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014649if test "$ac_cv_stat_tv_nsec2" = yes
14650then
14651
Matthias Kloseb9621712010-04-24 17:59:49 +000014652$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014653
14654fi
14655
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014656ac_save_cppflags="$CPPFLAGS"
14657CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014658# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14660$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014661if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014663else
Matthias Kloseb9621712010-04-24 17:59:49 +000014664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014665/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014666#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014667int
14668main ()
14669{
Jack Jansen666b1e72001-10-31 12:11:48 +000014670
14671 int rtn;
14672 rtn = mvwdelch(0,0,0);
14673
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 ;
14675 return 0;
14676}
14677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014678if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014679 ac_cv_mvwdelch_is_expression=yes
14680else
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14684fi
14685
Matthias Kloseb9621712010-04-24 17:59:49 +000014686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14687$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014688
14689if test "$ac_cv_mvwdelch_is_expression" = yes
14690then
Martin v. Löwis11437992002-04-12 09:54:03 +000014691
Matthias Kloseb9621712010-04-24 17:59:49 +000014692$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014693
14694fi
14695
Matthias Kloseb9621712010-04-24 17:59:49 +000014696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14697$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014698if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014700else
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014702/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014703#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014704int
14705main ()
14706{
Jack Jansen666b1e72001-10-31 12:11:48 +000014707
14708 WINDOW *w;
14709 w->_flags = 0;
14710
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 ;
14712 return 0;
14713}
14714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014715if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014716 ac_cv_window_has_flags=yes
14717else
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14721fi
14722
Matthias Kloseb9621712010-04-24 17:59:49 +000014723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14724$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014725
Jack Jansen666b1e72001-10-31 12:11:48 +000014726
14727if test "$ac_cv_window_has_flags" = yes
14728then
Martin v. Löwis11437992002-04-12 09:54:03 +000014729
Matthias Kloseb9621712010-04-24 17:59:49 +000014730$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014731
14732fi
14733
Matthias Kloseb9621712010-04-24 17:59:49 +000014734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14735$as_echo_n "checking for is_term_resized... " >&6; }
14736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014737/* end confdefs.h. */
14738#include <curses.h>
14739int
14740main ()
14741{
14742void *x=is_term_resized
14743 ;
14744 return 0;
14745}
14746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014747if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014748
Matthias Kloseb9621712010-04-24 17:59:49 +000014749$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014750
Matthias Kloseb159a552010-04-25 21:00:44 +000014751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014752$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014753else
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14755$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014756
14757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14759
Matthias Kloseb9621712010-04-24 17:59:49 +000014760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14761$as_echo_n "checking for resize_term... " >&6; }
14762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014763/* end confdefs.h. */
14764#include <curses.h>
14765int
14766main ()
14767{
14768void *x=resize_term
14769 ;
14770 return 0;
14771}
14772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014773if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014774
Matthias Kloseb9621712010-04-24 17:59:49 +000014775$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014776
Matthias Kloseb159a552010-04-25 21:00:44 +000014777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014778$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014779else
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14781$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014782
14783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14787$as_echo_n "checking for resizeterm... " >&6; }
14788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014789/* end confdefs.h. */
14790#include <curses.h>
14791int
14792main ()
14793{
14794void *x=resizeterm
14795 ;
14796 return 0;
14797}
14798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014799if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014800
Matthias Kloseb9621712010-04-24 17:59:49 +000014801$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014802
Matthias Kloseb159a552010-04-25 21:00:44 +000014803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014804$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014805else
Matthias Kloseb9621712010-04-24 17:59:49 +000014806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14807$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014808
14809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014811# last curses configure check
14812CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014813
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14815$as_echo "$as_me: checking for device files" >&6;}
14816
14817if test "x$cross_compiling" = xyes; then
14818 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14820$as_echo_n "checking for /dev/ptmx... " >&6; }
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14822$as_echo "not set" >&6; }
14823 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14824 fi
14825 if test "${ac_cv_file__dev_ptc+set}" != set; then
14826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14827$as_echo_n "checking for /dev/ptc... " >&6; }
14828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14829$as_echo "not set" >&6; }
14830 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14831 fi
14832fi
14833
Matthias Kloseb9621712010-04-24 17:59:49 +000014834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14835$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014836if ${ac_cv_file__dev_ptmx+:} false; then :
14837 $as_echo_n "(cached) " >&6
14838else
14839 test "$cross_compiling" = yes &&
14840 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14841if test -r "/dev/ptmx"; then
14842 ac_cv_file__dev_ptmx=yes
14843else
14844 ac_cv_file__dev_ptmx=no
14845fi
14846fi
14847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14848$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14849if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014850
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014851fi
14852
14853if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014854
Matthias Kloseb9621712010-04-24 17:59:49 +000014855$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014856
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14859$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014860if ${ac_cv_file__dev_ptc+:} false; then :
14861 $as_echo_n "(cached) " >&6
14862else
14863 test "$cross_compiling" = yes &&
14864 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14865if test -r "/dev/ptc"; then
14866 ac_cv_file__dev_ptc=yes
14867else
14868 ac_cv_file__dev_ptc=no
14869fi
14870fi
14871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14872$as_echo "$ac_cv_file__dev_ptc" >&6; }
14873if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014874
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014875fi
14876
14877if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014878
Matthias Kloseb9621712010-04-24 17:59:49 +000014879$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014880
Neal Norwitz865400f2003-03-21 01:42:58 +000014881fi
14882
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014883if test "$have_long_long" = yes
14884then
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14886$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014887 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014888 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014889else
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014891 ac_cv_have_long_long_format="cross -- assuming no"
14892 if test x$GCC = xyes; then
14893 save_CFLAGS=$CFLAGS
14894 CFLAGS="$CFLAGS -Werror -Wformat"
14895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14896/* end confdefs.h. */
14897
14898 #include <stdio.h>
14899 #include <stddef.h>
14900
14901int
14902main ()
14903{
14904
14905 char *buffer;
14906 sprintf(buffer, "%lld", (long long)123);
14907 sprintf(buffer, "%lld", (long long)-123);
14908 sprintf(buffer, "%llu", (unsigned long long)123);
14909
14910 ;
14911 return 0;
14912}
14913_ACEOF
14914if ac_fn_c_try_compile "$LINENO"; then :
14915 ac_cv_have_long_long_format=yes
14916
14917fi
14918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14919 CFLAGS=$save_CFLAGS
14920 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014921else
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014923/* end confdefs.h. */
14924
14925 #include <stdio.h>
14926 #include <stddef.h>
14927 #include <string.h>
14928
14929 #ifdef HAVE_SYS_TYPES_H
14930 #include <sys/types.h>
14931 #endif
14932
14933 int main()
14934 {
14935 char buffer[256];
14936
14937 if (sprintf(buffer, "%lld", (long long)123) < 0)
14938 return 1;
14939 if (strcmp(buffer, "123"))
14940 return 1;
14941
14942 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14943 return 1;
14944 if (strcmp(buffer, "-123"))
14945 return 1;
14946
14947 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14948 return 1;
14949 if (strcmp(buffer, "123"))
14950 return 1;
14951
14952 return 0;
14953 }
14954
14955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014956if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014957 ac_cv_have_long_long_format=yes
14958else
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014963fi
14964
14965
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014966fi
14967
Matthias Kloseb9621712010-04-24 17:59:49 +000014968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14969$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014970fi
14971
Mark Dickinson89d7d412009-12-31 20:50:59 +000014972if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014973then
14974
Matthias Kloseb9621712010-04-24 17:59:49 +000014975$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014976
14977fi
14978
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014979if test $ac_sys_system = Darwin
14980then
14981 LIBS="$LIBS -framework CoreFoundation"
14982fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014983
Matthias Kloseb9621712010-04-24 17:59:49 +000014984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14985$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014986if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014987 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014988else
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014990 ac_cv_have_size_t_format="cross -- assuming yes"
14991
Thomas Wouters477c8d52006-05-27 19:21:47 +000014992else
Matthias Kloseb9621712010-04-24 17:59:49 +000014993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014994/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014995
Thomas Wouters477c8d52006-05-27 19:21:47 +000014996#include <stdio.h>
14997#include <stddef.h>
14998#include <string.h>
14999
Christian Heimes2c181612007-12-17 20:04:13 +000015000#ifdef HAVE_SYS_TYPES_H
15001#include <sys/types.h>
15002#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015003
15004#ifdef HAVE_SSIZE_T
15005typedef ssize_t Py_ssize_t;
15006#elif SIZEOF_VOID_P == SIZEOF_LONG
15007typedef long Py_ssize_t;
15008#else
15009typedef int Py_ssize_t;
15010#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015011
Christian Heimes2c181612007-12-17 20:04:13 +000015012int main()
15013{
15014 char buffer[256];
15015
Thomas Wouters477c8d52006-05-27 19:21:47 +000015016 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15017 return 1;
15018
Thomas Wouters89f507f2006-12-13 04:49:30 +000015019 if (strcmp(buffer, "123"))
15020 return 1;
15021
15022 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15023 return 1;
15024
15025 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015026 return 1;
15027
15028 return 0;
15029}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015030
Thomas Wouters477c8d52006-05-27 19:21:47 +000015031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015032if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015033 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015034else
Matthias Kloseb9621712010-04-24 17:59:49 +000015035 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015039fi
15040
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15043$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015044if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015045
Matthias Kloseb9621712010-04-24 17:59:49 +000015046$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015047
15048fi
15049
Matthias Kloseb9621712010-04-24 17:59:49 +000015050ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015051#ifdef HAVE_SYS_TYPES_H
15052#include <sys/types.h>
15053#endif
15054#ifdef HAVE_SYS_SOCKET_H
15055#include <sys/socket.h>
15056#endif
15057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058"
Victor Stinnere0be4232011-10-25 13:06:09 +020015059if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015060
Martin v. Löwis11437992002-04-12 09:54:03 +000015061else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015062
Matthias Kloseb9621712010-04-24 17:59:49 +000015063$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015064
15065fi
15066
Michael W. Hudson54241132001-12-07 15:38:26 +000015067
Matthias Kloseb9621712010-04-24 17:59:49 +000015068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15069$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015070if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015071 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015072else
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015074 ac_cv_broken_mbstowcs=no
15075else
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015077/* end confdefs.h. */
15078
Stefan Krah19c21392012-11-22 23:47:32 +010015079#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015080#include<stdlib.h>
15081int main() {
15082 size_t len = -1;
15083 const char *str = "text";
15084 len = mbstowcs(NULL, str, 0);
15085 return (len != 4);
15086}
15087
15088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015089if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015090 ac_cv_broken_mbstowcs=no
15091else
Matthias Kloseb9621712010-04-24 17:59:49 +000015092 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15095 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015096fi
15097
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015098fi
15099
Matthias Kloseb9621712010-04-24 17:59:49 +000015100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15101$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015102if test "$ac_cv_broken_mbstowcs" = yes
15103then
15104
Matthias Kloseb9621712010-04-24 17:59:49 +000015105$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015106
15107fi
15108
Antoine Pitroub52ec782009-01-25 16:34:23 +000015109# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15111$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015112
15113# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015114if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015115 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015116if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015117then
15118
Matthias Kloseb9621712010-04-24 17:59:49 +000015119$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015120
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15122$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015123fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015124if test "$withval" = no
15125then
15126
15127$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15128
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15130$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015131fi
15132
Antoine Pitrou042b1282010-08-13 21:15:58 +000015133else
15134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15135$as_echo "no value specified" >&6; }
15136fi
15137
Antoine Pitroub52ec782009-01-25 16:34:23 +000015138
Matthias Kloseb17289e2012-03-15 19:51:34 +010015139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15140$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15141if ${ac_cv_computed_gotos+:} false; then :
15142 $as_echo_n "(cached) " >&6
15143else
15144 if test "$cross_compiling" = yes; then :
15145 if test "${with_computed_gotos+set}" = set; then
15146 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15147 else
15148 ac_cv_computed_gotos=no
15149 fi
15150else
15151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15152/* end confdefs.h. */
15153
15154int main(int argc, char **argv)
15155{
15156 static void *targets[1] = { &&LABEL1 };
15157 goto LABEL2;
15158LABEL1:
15159 return 0;
15160LABEL2:
15161 goto *targets[0];
15162 return 1;
15163}
15164
15165_ACEOF
15166if ac_fn_c_try_run "$LINENO"; then :
15167 ac_cv_computed_gotos=yes
15168else
15169 ac_cv_computed_gotos=no
15170fi
15171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15172 conftest.$ac_objext conftest.beam conftest.$ac_ext
15173fi
15174
15175fi
15176
15177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15178$as_echo "$ac_cv_computed_gotos" >&6; }
15179case "$ac_cv_computed_gotos" in yes*)
15180
15181$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15182
15183esac
15184
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015185case $ac_sys_system in
15186AIX*)
15187
15188$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15189 ;;
15190esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015191
Michael W. Hudson54241132001-12-07 15:38:26 +000015192
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015193
15194
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015195for h in `(cd $srcdir;echo Python/thread_*.h)`
15196do
15197 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15198done
15199
Michael W. Hudson54241132001-12-07 15:38:26 +000015200
Neal Norwitzd24499d2005-12-18 21:36:39 +000015201SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15203$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015204for dir in $SRCDIRS; do
15205 if test ! -d $dir; then
15206 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015207 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015208done
Matthias Kloseb9621712010-04-24 17:59:49 +000015209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15210$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015211
Stefan Krah1919b7e2012-03-21 18:25:23 +010015212# Availability of -O2:
15213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15214$as_echo_n "checking for -O2... " >&6; }
15215saved_cflags="$CFLAGS"
15216CFLAGS="-O2"
15217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15218/* end confdefs.h. */
15219
15220int
15221main ()
15222{
15223
15224
15225 ;
15226 return 0;
15227}
15228_ACEOF
15229if ac_fn_c_try_compile "$LINENO"; then :
15230 have_O2=yes
15231else
15232 have_O2=no
15233fi
15234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15236$as_echo "$have_O2" >&6; }
15237CFLAGS="$saved_cflags"
15238
15239# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15240# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15242$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15243saved_cflags="$CFLAGS"
15244CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15245if test "$have_O2" = no; then
15246 CFLAGS=""
15247fi
15248if test "$cross_compiling" = yes; then :
15249 have_glibc_memmove_bug=undefined
15250else
15251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15252/* end confdefs.h. */
15253
15254#include <stdio.h>
15255#include <stdlib.h>
15256#include <string.h>
15257void foo(void *p, void *q) { memmove(p, q, 19); }
15258int main() {
15259 char a[32] = "123456789000000000";
15260 foo(&a[9], a);
15261 if (strcmp(a, "123456789123456789000000000") != 0)
15262 return 1;
15263 foo(a, &a[9]);
15264 if (strcmp(a, "123456789000000000") != 0)
15265 return 1;
15266 return 0;
15267}
15268
15269_ACEOF
15270if ac_fn_c_try_run "$LINENO"; then :
15271 have_glibc_memmove_bug=no
15272else
15273 have_glibc_memmove_bug=yes
15274fi
15275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15276 conftest.$ac_objext conftest.beam conftest.$ac_ext
15277fi
15278
15279CFLAGS="$saved_cflags"
15280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15281$as_echo "$have_glibc_memmove_bug" >&6; }
15282if test "$have_glibc_memmove_bug" = yes; then
15283
15284$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15285
15286fi
15287
15288if test "$have_gcc_asm_for_x87" = yes; then
15289 # Some versions of gcc miscompile inline asm:
15290 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15291 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15292 case $CC in
15293 *gcc*)
15294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15295$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15296 saved_cflags="$CFLAGS"
15297 CFLAGS="-O2"
15298 if test "$cross_compiling" = yes; then :
15299 have_ipa_pure_const_bug=undefined
15300else
15301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15302/* end confdefs.h. */
15303
15304 __attribute__((noinline)) int
15305 foo(int *p) {
15306 int r;
15307 asm ( "movl \$6, (%1)\n\t"
15308 "xorl %0, %0\n\t"
15309 : "=r" (r) : "r" (p) : "memory"
15310 );
15311 return r;
15312 }
15313 int main() {
15314 int p = 8;
15315 if ((foo(&p) ? : p) != 6)
15316 return 1;
15317 return 0;
15318 }
15319
15320_ACEOF
15321if ac_fn_c_try_run "$LINENO"; then :
15322 have_ipa_pure_const_bug=no
15323else
15324 have_ipa_pure_const_bug=yes
15325fi
15326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15327 conftest.$ac_objext conftest.beam conftest.$ac_ext
15328fi
15329
15330 CFLAGS="$saved_cflags"
15331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15332$as_echo "$have_ipa_pure_const_bug" >&6; }
15333 if test "$have_ipa_pure_const_bug" = yes; then
15334
15335$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15336
15337 fi
15338 ;;
15339 esac
15340fi
15341
Guido van Rossum627b2d71993-12-24 10:39:16 +000015342# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015343ac_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 +000015344
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015345ac_config_files="$ac_config_files Modules/ld_so_aix"
15346
Martin v. Löwis11437992002-04-12 09:54:03 +000015347cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015348# This file is a shell script that caches the results of configure
15349# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015350# scripts and configure runs, see configure's option --config-cache.
15351# It is not useful on other systems. If it contains results you don't
15352# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015353#
Martin v. Löwis11437992002-04-12 09:54:03 +000015354# config.status only pays attention to the cache file if you give it
15355# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015356#
Skip Montanaro6dead952003-09-25 14:50:04 +000015357# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015358# loading this file, other *unset* `ac_cv_foo' will be assigned the
15359# following values.
15360
15361_ACEOF
15362
Guido van Rossumf78abae1997-01-21 22:02:36 +000015363# The following way of writing the cache mishandles newlines in values,
15364# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015366# Ultrix sh set writes to stderr and can't be redirected directly,
15367# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015368(
15369 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15370 eval ac_val=\$$ac_var
15371 case $ac_val in #(
15372 *${as_nl}*)
15373 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015374 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15375$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376 esac
15377 case $ac_var in #(
15378 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015379 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15380 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381 esac ;;
15382 esac
15383 done
15384
Martin v. Löwis11437992002-04-12 09:54:03 +000015385 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015386 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15387 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 # `set' does not quote correctly, so add quotes: double-quote
15389 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015390 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015391 "s/'/'\\\\''/g;
15392 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015393 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015394 *)
15395 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015397 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398 esac |
15399 sort
15400) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015404 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015405 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15406 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015407 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15408 :end' >>confcache
15409if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15410 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015411 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015412 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15413$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015414 if test ! -f "$cache_file" || test -h "$cache_file"; then
15415 cat confcache >"$cache_file"
15416 else
15417 case $cache_file in #(
15418 */* | ?:*)
15419 mv -f confcache "$cache_file"$$ &&
15420 mv -f "$cache_file"$$ "$cache_file" ;; #(
15421 *)
15422 mv -f confcache "$cache_file" ;;
15423 esac
15424 fi
15425 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015426 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015427 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15428$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015429 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015430fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015431rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015432
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015433test "x$prefix" = xNONE && prefix=$ac_default_prefix
15434# Let make expand exec_prefix.
15435test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015436
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015437DEFS=-DHAVE_CONFIG_H
15438
Skip Montanaro6dead952003-09-25 14:50:04 +000015439ac_libobjs=
15440ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015441U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015442for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15443 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015444 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15447 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015448 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15449 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015450done
15451LIBOBJS=$ac_libobjs
15452
15453LTLIBOBJS=$ac_ltlibobjs
15454
15455
Martin v. Löwis11437992002-04-12 09:54:03 +000015456
Matthias Kloseb9621712010-04-24 17:59:49 +000015457
Victor Stinnere0be4232011-10-25 13:06:09 +020015458: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015459ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015460ac_clean_files_save=$ac_clean_files
15461ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015462{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15463$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15464as_write_fail=0
15465cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015466#! $SHELL
15467# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015468# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015469# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015470# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015471
Martin v. Löwis11437992002-04-12 09:54:03 +000015472debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015473ac_cs_recheck=false
15474ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015475
Matthias Kloseb9621712010-04-24 17:59:49 +000015476SHELL=\${CONFIG_SHELL-$SHELL}
15477export SHELL
15478_ASEOF
15479cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15480## -------------------- ##
15481## M4sh Initialization. ##
15482## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015484# Be more Bourne compatible
15485DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015486if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015487 emulate sh
15488 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015490 # is contrary to our usage. Disable this feature.
15491 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015492 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015493else
Matthias Kloseb9621712010-04-24 17:59:49 +000015494 case `(set -o) 2>/dev/null` in #(
15495 *posix*) :
15496 set -o posix ;; #(
15497 *) :
15498 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015499esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015500fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015501
15502
Matthias Kloseb9621712010-04-24 17:59:49 +000015503as_nl='
15504'
15505export as_nl
15506# Printing a long string crashes Solaris 7 /usr/bin/printf.
15507as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15508as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15509as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15510# Prefer a ksh shell builtin over an external printf program on Solaris,
15511# but without wasting forks for bash or zsh.
15512if test -z "$BASH_VERSION$ZSH_VERSION" \
15513 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15514 as_echo='print -r --'
15515 as_echo_n='print -rn --'
15516elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15517 as_echo='printf %s\n'
15518 as_echo_n='printf %s'
15519else
15520 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15521 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15522 as_echo_n='/usr/ucb/echo -n'
15523 else
15524 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15525 as_echo_n_body='eval
15526 arg=$1;
15527 case $arg in #(
15528 *"$as_nl"*)
15529 expr "X$arg" : "X\\(.*\\)$as_nl";
15530 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15531 esac;
15532 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15533 '
15534 export as_echo_n_body
15535 as_echo_n='sh -c $as_echo_n_body as_echo'
15536 fi
15537 export as_echo_body
15538 as_echo='sh -c $as_echo_body as_echo'
15539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015540
15541# The user is always right.
15542if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 PATH_SEPARATOR=:
15544 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15545 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15546 PATH_SEPARATOR=';'
15547 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015548fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015550
15551# IFS
15552# We need space, tab and new line, in precisely that order. Quoting is
15553# there to prevent editors from complaining about space-tab.
15554# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15555# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015556IFS=" "" $as_nl"
15557
15558# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015559as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015560case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561 *[\\/]* ) as_myself=$0 ;;
15562 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015563for as_dir in $PATH
15564do
15565 IFS=$as_save_IFS
15566 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015567 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15568 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571 ;;
15572esac
15573# We did not find ourselves, most probably we were run as `sh COMMAND'
15574# in which case we are not to be found in the path.
15575if test "x$as_myself" = x; then
15576 as_myself=$0
15577fi
15578if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015579 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15580 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015581fi
15582
Matthias Kloseb9621712010-04-24 17:59:49 +000015583# Unset variables that we do not need and which cause bugs (e.g. in
15584# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15585# suppresses any "Segmentation fault" message there. '((' could
15586# trigger a bug in pdksh 5.2.14.
15587for as_var in BASH_ENV ENV MAIL MAILPATH
15588do eval test x\${$as_var+set} = xset \
15589 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015590done
15591PS1='$ '
15592PS2='> '
15593PS4='+ '
15594
15595# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015596LC_ALL=C
15597export LC_ALL
15598LANGUAGE=C
15599export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600
Matthias Kloseb9621712010-04-24 17:59:49 +000015601# CDPATH.
15602(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15603
15604
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015605# as_fn_error STATUS ERROR [LINENO LOG_FD]
15606# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015607# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15608# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015609# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015610as_fn_error ()
15611{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015612 as_status=$1; test $as_status -eq 0 && as_status=1
15613 if test "$4"; then
15614 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15615 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015616 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015617 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 as_fn_exit $as_status
15619} # as_fn_error
15620
15621
15622# as_fn_set_status STATUS
15623# -----------------------
15624# Set $? to STATUS, without forking.
15625as_fn_set_status ()
15626{
15627 return $1
15628} # as_fn_set_status
15629
15630# as_fn_exit STATUS
15631# -----------------
15632# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15633as_fn_exit ()
15634{
15635 set +e
15636 as_fn_set_status $1
15637 exit $1
15638} # as_fn_exit
15639
15640# as_fn_unset VAR
15641# ---------------
15642# Portably unset VAR.
15643as_fn_unset ()
15644{
15645 { eval $1=; unset $1;}
15646}
15647as_unset=as_fn_unset
15648# as_fn_append VAR VALUE
15649# ----------------------
15650# Append the text in VALUE to the end of the definition contained in VAR. Take
15651# advantage of any shell optimizations that allow amortized linear growth over
15652# repeated appends, instead of the typical quadratic growth present in naive
15653# implementations.
15654if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15655 eval 'as_fn_append ()
15656 {
15657 eval $1+=\$2
15658 }'
15659else
15660 as_fn_append ()
15661 {
15662 eval $1=\$$1\$2
15663 }
15664fi # as_fn_append
15665
15666# as_fn_arith ARG...
15667# ------------------
15668# Perform arithmetic evaluation on the ARGs, and store the result in the
15669# global $as_val. Take advantage of shells that can avoid forks. The arguments
15670# must be portable across $(()) and expr.
15671if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15672 eval 'as_fn_arith ()
15673 {
15674 as_val=$(( $* ))
15675 }'
15676else
15677 as_fn_arith ()
15678 {
15679 as_val=`expr "$@" || test $? -eq 1`
15680 }
15681fi # as_fn_arith
15682
15683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015684if expr a : '\(a\)' >/dev/null 2>&1 &&
15685 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15686 as_expr=expr
15687else
15688 as_expr=false
15689fi
15690
15691if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15692 as_basename=basename
15693else
15694 as_basename=false
15695fi
15696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15698 as_dirname=dirname
15699else
15700 as_dirname=false
15701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015703as_me=`$as_basename -- "$0" ||
15704$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15705 X"$0" : 'X\(//\)$' \| \
15706 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015707$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015708 sed '/^.*\/\([^/][^/]*\)\/*$/{
15709 s//\1/
15710 q
15711 }
15712 /^X\/\(\/\/\)$/{
15713 s//\1/
15714 q
15715 }
15716 /^X\/\(\/\).*/{
15717 s//\1/
15718 q
15719 }
15720 s/.*/./; q'`
15721
Matthias Kloseb9621712010-04-24 17:59:49 +000015722# Avoid depending upon Character Ranges.
15723as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15724as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15725as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15726as_cr_digits='0123456789'
15727as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015728
15729ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015730case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015731-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015733 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015734 xy) ECHO_C='\c';;
15735 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15736 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015737 esac;;
15738*)
15739 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015740esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015741
Martin v. Löwis11437992002-04-12 09:54:03 +000015742rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015743if test -d conf$$.dir; then
15744 rm -f conf$$.dir/conf$$.file
15745else
15746 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015747 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015749if (echo >conf$$.file) 2>/dev/null; then
15750 if ln -s conf$$.file conf$$ 2>/dev/null; then
15751 as_ln_s='ln -s'
15752 # ... but there are two gotchas:
15753 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15754 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015755 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015757 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015758 elif ln conf$$.file conf$$ 2>/dev/null; then
15759 as_ln_s=ln
15760 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015761 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015762 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015763else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015764 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015766rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15767rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015768
Matthias Kloseb9621712010-04-24 17:59:49 +000015769
15770# as_fn_mkdir_p
15771# -------------
15772# Create "$as_dir" as a directory, including parents if necessary.
15773as_fn_mkdir_p ()
15774{
15775
15776 case $as_dir in #(
15777 -*) as_dir=./$as_dir;;
15778 esac
15779 test -d "$as_dir" || eval $as_mkdir_p || {
15780 as_dirs=
15781 while :; do
15782 case $as_dir in #(
15783 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15784 *) as_qdir=$as_dir;;
15785 esac
15786 as_dirs="'$as_qdir' $as_dirs"
15787 as_dir=`$as_dirname -- "$as_dir" ||
15788$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15789 X"$as_dir" : 'X\(//\)[^/]' \| \
15790 X"$as_dir" : 'X\(//\)$' \| \
15791 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15792$as_echo X"$as_dir" |
15793 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15794 s//\1/
15795 q
15796 }
15797 /^X\(\/\/\)[^/].*/{
15798 s//\1/
15799 q
15800 }
15801 /^X\(\/\/\)$/{
15802 s//\1/
15803 q
15804 }
15805 /^X\(\/\).*/{
15806 s//\1/
15807 q
15808 }
15809 s/.*/./; q'`
15810 test -d "$as_dir" && break
15811 done
15812 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015813 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015814
15815
15816} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015817if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015818 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015819else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015820 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015821 as_mkdir_p=false
15822fi
15823
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015824
15825# as_fn_executable_p FILE
15826# -----------------------
15827# Test if FILE is an executable regular file.
15828as_fn_executable_p ()
15829{
15830 test -f "$1" && test -x "$1"
15831} # as_fn_executable_p
15832as_test_x='test -x'
15833as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015834
15835# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015836as_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 +000015837
15838# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015839as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015840
15841
Martin v. Löwis11437992002-04-12 09:54:03 +000015842exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015843## ----------------------------------- ##
15844## Main body of $CONFIG_STATUS script. ##
15845## ----------------------------------- ##
15846_ASEOF
15847test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015848
Matthias Kloseb9621712010-04-24 17:59:49 +000015849cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15850# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015851# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015852# values after options handling.
15853ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015854This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015855generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015856
15857 CONFIG_FILES = $CONFIG_FILES
15858 CONFIG_HEADERS = $CONFIG_HEADERS
15859 CONFIG_LINKS = $CONFIG_LINKS
15860 CONFIG_COMMANDS = $CONFIG_COMMANDS
15861 $ $0 $@
15862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015863on `(hostname || uname -n) 2>/dev/null | sed 1q`
15864"
15865
Martin v. Löwis11437992002-04-12 09:54:03 +000015866_ACEOF
15867
Matthias Kloseb9621712010-04-24 17:59:49 +000015868case $ac_config_files in *"
15869"*) set x $ac_config_files; shift; ac_config_files=$*;;
15870esac
15871
15872case $ac_config_headers in *"
15873"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15874esac
15875
15876
15877cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015878# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015879config_files="$ac_config_files"
15880config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015882_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015883
Matthias Kloseb9621712010-04-24 17:59:49 +000015884cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015885ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015886\`$as_me' instantiates files and other configuration actions
15887from templates according to the current configuration. Unless the files
15888and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015889
Matthias Kloseb9621712010-04-24 17:59:49 +000015890Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015891
15892 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015893 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015894 --config print configuration, then exit
15895 -q, --quiet, --silent
15896 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015897 -d, --debug don't remove temporary files
15898 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015899 --file=FILE[:TEMPLATE]
15900 instantiate the configuration file FILE
15901 --header=FILE[:TEMPLATE]
15902 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015903
15904Configuration files:
15905$config_files
15906
15907Configuration headers:
15908$config_headers
15909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015913cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15914ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015915ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015916python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015917configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015918 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015919
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015920Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015921This config.status script is free software; the Free Software Foundation
15922gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923
15924ac_pwd='$ac_pwd'
15925srcdir='$srcdir'
15926INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015927MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015928test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015929_ACEOF
15930
Matthias Kloseb9621712010-04-24 17:59:49 +000015931cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15932# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015933ac_need_defaults=:
15934while test $# != 0
15935do
15936 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015937 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015938 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15939 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015940 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015941 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015942 --*=)
15943 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15944 ac_optarg=
15945 ac_shift=:
15946 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015947 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015948 ac_option=$1
15949 ac_optarg=$2
15950 ac_shift=shift
15951 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 esac
15953
Skip Montanaro6dead952003-09-25 14:50:04 +000015954 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015955 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015956 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15957 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015958 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015959 $as_echo "$ac_cs_version"; exit ;;
15960 --config | --confi | --conf | --con | --co | --c )
15961 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015962 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015963 debug=: ;;
15964 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015965 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015966 case $ac_optarg in
15967 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015968 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015969 esac
15970 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 ac_need_defaults=false;;
15972 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015973 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015974 case $ac_optarg in
15975 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15976 esac
15977 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015978 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015979 --he | --h)
15980 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015981 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015982Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015983 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015984 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015985 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15986 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15987 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015988
15989 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015990 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015991Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015992
Matthias Kloseb9621712010-04-24 17:59:49 +000015993 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015994 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015995
15996 esac
15997 shift
15998done
15999
Skip Montanaro6dead952003-09-25 14:50:04 +000016000ac_configure_extra_args=
16001
16002if $ac_cs_silent; then
16003 exec 6>/dev/null
16004 ac_configure_extra_args="$ac_configure_extra_args --silent"
16005fi
16006
16007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016008cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016009if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016010 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016011 shift
16012 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16013 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016014 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016015 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016016fi
16017
Martin v. Löwis11437992002-04-12 09:54:03 +000016018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020exec 5>>config.log
16021{
16022 echo
16023 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16024## Running $as_me. ##
16025_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016026 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016027} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016031_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016032
Matthias Kloseb9621712010-04-24 17:59:49 +000016033cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016034
16035# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016036for ac_config_target in $ac_config_targets
16037do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016038 case $ac_config_target in
16039 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16040 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16041 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016042 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16043 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016044 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16045 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016046 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016047 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016048 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016049
Victor Stinnere0be4232011-10-25 13:06:09 +020016050 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016051 esac
16052done
16053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016054
Martin v. Löwis11437992002-04-12 09:54:03 +000016055# If the user did not use the arguments to specify the items to instantiate,
16056# then the envvar interface is used. Set only those that are not.
16057# We use the long form for the default assignment because of an extremely
16058# bizarre bug on SunOS 4.1.3.
16059if $ac_need_defaults; then
16060 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16061 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16062fi
16063
Skip Montanaro6dead952003-09-25 14:50:04 +000016064# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016065# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016066# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016067# Hook for its removal unless debugging.
16068# Note that there is a small window in which the directory will not be cleaned:
16069# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016070$debug ||
16071{
Victor Stinnere0be4232011-10-25 13:06:09 +020016072 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016073 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016074 : "${ac_tmp:=$tmp}"
16075 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016076' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016077 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016078}
Martin v. Löwis11437992002-04-12 09:54:03 +000016079# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016080
Martin v. Löwis11437992002-04-12 09:54:03 +000016081{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016082 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016083 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016084} ||
16085{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016086 tmp=./conf$$-$RANDOM
16087 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016088} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016089ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016090
Matthias Kloseb9621712010-04-24 17:59:49 +000016091# Set up the scripts for CONFIG_FILES section.
16092# No need to generate them if there are no CONFIG_FILES.
16093# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016095
Matthias Kloseb9621712010-04-24 17:59:49 +000016096
16097ac_cr=`echo X | tr X '\015'`
16098# On cygwin, bash can eat \r inside `` if the user requested igncr.
16099# But we know of no other shell where ac_cr would be empty at this
16100# point, so we can use a bashism as a fallback.
16101if test "x$ac_cr" = x; then
16102 eval ac_cr=\$\'\\r\'
16103fi
16104ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16105if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016106 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016107else
16108 ac_cs_awk_cr=$ac_cr
16109fi
16110
Victor Stinnere0be4232011-10-25 13:06:09 +020016111echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016112_ACEOF
16113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115{
16116 echo "cat >conf$$subs.awk <<_ACEOF" &&
16117 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16118 echo "_ACEOF"
16119} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016120 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16121ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016122ac_delim='%!_!# '
16123for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016125 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016126
Matthias Kloseb9621712010-04-24 17:59:49 +000016127 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16128 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129 break
16130 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016131 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016132 else
16133 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016135done
Matthias Kloseb9621712010-04-24 17:59:49 +000016136rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016137
Matthias Kloseb9621712010-04-24 17:59:49 +000016138cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016139cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016141sed -n '
16142h
16143s/^/S["/; s/!.*/"]=/
16144p
16145g
16146s/^[^!]*!//
16147:repl
16148t repl
16149s/'"$ac_delim"'$//
16150t delim
16151:nl
16152h
16153s/\(.\{148\}\)..*/\1/
16154t more1
16155s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16156p
16157n
16158b repl
16159:more1
16160s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16161p
16162g
16163s/.\{148\}//
16164t nl
16165:delim
16166h
16167s/\(.\{148\}\)..*/\1/
16168t more2
16169s/["\\]/\\&/g; s/^/"/; s/$/"/
16170p
16171b
16172:more2
16173s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16174p
16175g
16176s/.\{148\}//
16177t delim
16178' <conf$$subs.awk | sed '
16179/^[^""]/{
16180 N
16181 s/\n//
16182}
16183' >>$CONFIG_STATUS || ac_write_fail=1
16184rm -f conf$$subs.awk
16185cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16186_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016187cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016188 for (key in S) S_is_set[key] = 1
16189 FS = ""
16190
16191}
16192{
16193 line = $ 0
16194 nfields = split(line, field, "@")
16195 substed = 0
16196 len = length(field[1])
16197 for (i = 2; i < nfields; i++) {
16198 key = field[i]
16199 keylen = length(key)
16200 if (S_is_set[key]) {
16201 value = S[key]
16202 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16203 len += length(value) + length(field[++i])
16204 substed = 1
16205 } else
16206 len += 1 + keylen
16207 }
16208
16209 print line
16210}
16211
16212_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16215if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16216 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16217else
16218 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016219fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016220 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016221_ACEOF
16222
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016223# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16224# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016225# trailing colons and then remove the whole line if VPATH becomes empty
16226# (actually we leave an empty line to preserve line numbers).
16227if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016228 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16229h
16230s///
16231s/^/:/
16232s/[ ]*$/:/
16233s/:\$(srcdir):/:/g
16234s/:\${srcdir}:/:/g
16235s/:@srcdir@:/:/g
16236s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016238x
16239s/\(=[ ]*\).*/\1/
16240G
16241s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016242s/^[^=]*=[ ]*$//
16243}'
16244fi
16245
Matthias Kloseb9621712010-04-24 17:59:49 +000016246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016247fi # test -n "$CONFIG_FILES"
16248
Matthias Kloseb9621712010-04-24 17:59:49 +000016249# Set up the scripts for CONFIG_HEADERS section.
16250# No need to generate them if there are no CONFIG_HEADERS.
16251# This happens for instance with `./config.status Makefile'.
16252if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016253cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016254BEGIN {
16255_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256
Matthias Kloseb9621712010-04-24 17:59:49 +000016257# Transform confdefs.h into an awk script `defines.awk', embedded as
16258# here-document in config.status, that substitutes the proper values into
16259# config.h.in to produce config.h.
16260
16261# Create a delimiter string that does not exist in confdefs.h, to ease
16262# handling of long lines.
16263ac_delim='%!_!# '
16264for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016265 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16266 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016267 break
16268 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016269 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016270 else
16271 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16272 fi
16273done
16274
16275# For the awk script, D is an array of macro values keyed by name,
16276# likewise P contains macro parameters if any. Preserve backslash
16277# newline sequences.
16278
16279ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16280sed -n '
16281s/.\{148\}/&'"$ac_delim"'/g
16282t rset
16283:rset
16284s/^[ ]*#[ ]*define[ ][ ]*/ /
16285t def
16286d
16287:def
16288s/\\$//
16289t bsnl
16290s/["\\]/\\&/g
16291s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16292D["\1"]=" \3"/p
16293s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16294d
16295:bsnl
16296s/["\\]/\\&/g
16297s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16298D["\1"]=" \3\\\\\\n"\\/p
16299t cont
16300s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16301t cont
16302d
16303:cont
16304n
16305s/.\{148\}/&'"$ac_delim"'/g
16306t clear
16307:clear
16308s/\\$//
16309t bsnlc
16310s/["\\]/\\&/g; s/^/"/; s/$/"/p
16311d
16312:bsnlc
16313s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16314b cont
16315' <confdefs.h | sed '
16316s/'"$ac_delim"'/"\\\
16317"/g' >>$CONFIG_STATUS || ac_write_fail=1
16318
16319cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16320 for (key in D) D_is_set[key] = 1
16321 FS = ""
16322}
16323/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16324 line = \$ 0
16325 split(line, arg, " ")
16326 if (arg[1] == "#") {
16327 defundef = arg[2]
16328 mac1 = arg[3]
16329 } else {
16330 defundef = substr(arg[1], 2)
16331 mac1 = arg[2]
16332 }
16333 split(mac1, mac2, "(") #)
16334 macro = mac2[1]
16335 prefix = substr(line, 1, index(line, defundef) - 1)
16336 if (D_is_set[macro]) {
16337 # Preserve the white space surrounding the "#".
16338 print prefix "define", macro P[macro] D[macro]
16339 next
16340 } else {
16341 # Replace #undef with comments. This is necessary, for example,
16342 # in the case of _POSIX_SOURCE, which is predefined and required
16343 # on some systems where configure will not decide to define it.
16344 if (defundef == "undef") {
16345 print "/*", prefix defundef, macro, "*/"
16346 next
16347 }
16348 }
16349}
16350{ print }
16351_ACAWK
16352_ACEOF
16353cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016354 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016355fi # test -n "$CONFIG_HEADERS"
16356
16357
16358eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16359shift
16360for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016361do
16362 case $ac_tag in
16363 :[FHLC]) ac_mode=$ac_tag; continue;;
16364 esac
16365 case $ac_mode$ac_tag in
16366 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016367 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016368 :[FH]-) ac_tag=-:-;;
16369 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16370 esac
16371 ac_save_IFS=$IFS
16372 IFS=:
16373 set x $ac_tag
16374 IFS=$ac_save_IFS
16375 shift
16376 ac_file=$1
16377 shift
16378
16379 case $ac_mode in
16380 :L) ac_source=$1;;
16381 :[FH])
16382 ac_file_inputs=
16383 for ac_f
16384 do
16385 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016386 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016387 *) # Look for the file first in the build tree, then in the source tree
16388 # (if the path is not absolute). The absolute path cannot be DOS-style,
16389 # because $ac_f cannot contain `:'.
16390 test -f "$ac_f" ||
16391 case $ac_f in
16392 [\\/$]*) false;;
16393 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16394 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016395 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016396 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016397 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16398 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399 done
16400
16401 # Let's still pretend it is `configure' which instantiates (i.e., don't
16402 # use $as_me), people would be surprised to read:
16403 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016404 configure_input='Generated from '`
16405 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16406 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407 if test x"$ac_file" != x-; then
16408 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016409 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16410$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016411 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016412 # Neutralize special characters interpreted by sed in replacement strings.
16413 case $configure_input in #(
16414 *\&* | *\|* | *\\* )
16415 ac_sed_conf_input=`$as_echo "$configure_input" |
16416 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16417 *) ac_sed_conf_input=$configure_input;;
16418 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016419
16420 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016421 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16422 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016423 esac
16424 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016425 esac
16426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016427 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016428$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016429 X"$ac_file" : 'X\(//\)[^/]' \| \
16430 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016431 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016432$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016433 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16434 s//\1/
16435 q
16436 }
16437 /^X\(\/\/\)[^/].*/{
16438 s//\1/
16439 q
16440 }
16441 /^X\(\/\/\)$/{
16442 s//\1/
16443 q
16444 }
16445 /^X\(\/\).*/{
16446 s//\1/
16447 q
16448 }
16449 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016450 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016451 ac_builddir=.
16452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016453case "$ac_dir" in
16454.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16455*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016456 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016457 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016458 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016459 case $ac_top_builddir_sub in
16460 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16461 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16462 esac ;;
16463esac
16464ac_abs_top_builddir=$ac_pwd
16465ac_abs_builddir=$ac_pwd$ac_dir_suffix
16466# for backward compatibility:
16467ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016468
16469case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016470 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016471 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016472 ac_top_srcdir=$ac_top_builddir_sub
16473 ac_abs_top_srcdir=$ac_pwd ;;
16474 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016475 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016476 ac_top_srcdir=$srcdir
16477 ac_abs_top_srcdir=$srcdir ;;
16478 *) # Relative name.
16479 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16480 ac_top_srcdir=$ac_top_build_prefix$srcdir
16481 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016482esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016483ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016484
Martin v. Löwis11437992002-04-12 09:54:03 +000016485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016486 case $ac_mode in
16487 :F)
16488 #
16489 # CONFIG_FILE
16490 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016491
16492 case $INSTALL in
16493 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016494 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016495 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016496 ac_MKDIR_P=$MKDIR_P
16497 case $MKDIR_P in
16498 [\\/$]* | ?:[\\/]* ) ;;
16499 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16500 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016501_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016502
Matthias Kloseb9621712010-04-24 17:59:49 +000016503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016504# If the template does not know about datarootdir, expand it.
16505# FIXME: This hack should be removed a few years after 2.60.
16506ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016507ac_sed_dataroot='
16508/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509 p
16510 q
16511}
16512/@datadir@/p
16513/@docdir@/p
16514/@infodir@/p
16515/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016516/@mandir@/p'
16517case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518*datarootdir*) ac_datarootdir_seen=yes;;
16519*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16521$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016523cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016524 ac_datarootdir_hack='
16525 s&@datadir@&$datadir&g
16526 s&@docdir@&$docdir&g
16527 s&@infodir@&$infodir&g
16528 s&@localedir@&$localedir&g
16529 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016530 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531esac
16532_ACEOF
16533
16534# Neutralize VPATH when `$srcdir' = `.'.
16535# Shell code in configure.ac might set extrasub.
16536# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16538ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016539$extrasub
16540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016542:t
16543/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016544s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016545s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016546s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016547s&@srcdir@&$ac_srcdir&;t t
16548s&@abs_srcdir@&$ac_abs_srcdir&;t t
16549s&@top_srcdir@&$ac_top_srcdir&;t t
16550s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16551s&@builddir@&$ac_builddir&;t t
16552s&@abs_builddir@&$ac_abs_builddir&;t t
16553s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16554s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016555s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016557"
Victor Stinnere0be4232011-10-25 13:06:09 +020016558eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16559 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016562 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16563 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16564 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016566which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016567$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016568which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016569
Victor Stinnere0be4232011-10-25 13:06:09 +020016570 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016571 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016572 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16573 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016574 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016575 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016576 ;;
16577 :H)
16578 #
16579 # CONFIG_HEADER
16580 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016581 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016582 {
16583 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016584 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16585 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016586 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016587 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016588 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16589$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016590 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016591 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016592 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016593 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016594 fi
16595 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016596 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016597 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016598 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016599 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016600 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016602
16603 esac
16604
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016605
16606 case $ac_file$ac_mode in
16607 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16608
16609 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610done # for ac_tag
16611
Guido van Rossum627b2d71993-12-24 10:39:16 +000016612
Matthias Kloseb9621712010-04-24 17:59:49 +000016613as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016614_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016615ac_clean_files=$ac_clean_files_save
16616
Matthias Kloseb9621712010-04-24 17:59:49 +000016617test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016618 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016619
Martin v. Löwis11437992002-04-12 09:54:03 +000016620
16621# configure is writing to config.log, and then calls config.status.
16622# config.status does its own redirection, appending to config.log.
16623# Unfortunately, on DOS this fails, as config.log is still kept open
16624# by configure, so config.status won't be able to write to it; its
16625# output is simply discarded. So we exec the FD to /dev/null,
16626# effectively closing config.log, so it can be properly (re)opened and
16627# appended to by config.status. When coming back to configure, we
16628# need to make the FD available again.
16629if test "$no_create" != yes; then
16630 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016631 ac_config_status_args=
16632 test "$silent" = yes &&
16633 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016635 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016636 exec 5>>config.log
16637 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16638 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016639 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016640fi
16641if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16643$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016644fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016645
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016646
Christian Heimes75ed8902013-11-20 01:11:18 +010016647echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016648if test ! -f Modules/Setup
16649then
16650 cp $srcdir/Modules/Setup.dist Modules/Setup
16651fi
16652
Christian Heimes75ed8902013-11-20 01:11:18 +010016653echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016654if test ! -f Modules/Setup.local
16655then
16656 echo "# Edit this file for local setup changes" >Modules/Setup.local
16657fi
16658
Christian Heimes75ed8902013-11-20 01:11:18 +010016659echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016660$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16661 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016662 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016663mv config.c Modules