blob: b40058aea0313d9e68bf556a0de043b85c66fba5 [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
Ned Deilyb8f944f2013-11-21 22:42:25 -0800715FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000716FRAMEWORKALTINSTALLLAST
717FRAMEWORKALTINSTALLFIRST
718FRAMEWORKINSTALLLAST
719FRAMEWORKINSTALLFIRST
720PYTHONFRAMEWORKINSTALLDIR
721PYTHONFRAMEWORKPREFIX
722PYTHONFRAMEWORKDIR
723PYTHONFRAMEWORKIDENTIFIER
724PYTHONFRAMEWORK
725LIPO_32BIT_FLAGS
726ARCH_RUN_32BIT
727UNIVERSALSDK
728CONFIG_ARGS
729SOVERSION
730VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100732host_os
733host_vendor
734host_cpu
735host
736build_os
737build_vendor
738build_cpu
739build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500740HAS_HG
741HGBRANCH
742HGTAG
743HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400744BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000745target_alias
746host_alias
747build_alias
748LIBS
749ECHO_T
750ECHO_N
751ECHO_C
752DEFS
753mandir
754localedir
755libdir
756psdir
757pdfdir
758dvidir
759htmldir
760infodir
761docdir
762oldincludedir
763includedir
764localstatedir
765sharedstatedir
766sysconfdir
767datadir
768datarootdir
769libexecdir
770sbindir
771bindir
772program_transform_name
773prefix
774exec_prefix
775PACKAGE_URL
776PACKAGE_BUGREPORT
777PACKAGE_STRING
778PACKAGE_VERSION
779PACKAGE_TARNAME
780PACKAGE_NAME
781PATH_SEPARATOR
782SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000783ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000784ac_user_opts='
785enable_option_checking
786enable_universalsdk
787with_universal_archs
788with_framework_name
789enable_framework
790with_gcc
791with_cxx_main
792with_suffix
793enable_shared
794enable_profiling
795with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100796with_hash_algorithm
Matthias Kloseb9621712010-04-24 17:59:49 +0000797with_libs
798with_system_expat
799with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100800with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000801enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700802with_tcltk_includes
803with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000804with_dbmliborder
805with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000806with_threads
807with_thread
808enable_ipv6
809with_doc_strings
810with_tsc
811with_pymalloc
812with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_fpectl
814with_libm
815with_libc
816enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000817with_computed_gotos
818'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000819 ac_precious_vars='build_alias
820host_alias
821target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100822MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000823CC
824CFLAGS
825LDFLAGS
826LIBS
827CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200828CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000829
Guido van Rossum627b2d71993-12-24 10:39:16 +0000830
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000832ac_init_help=
833ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000834ac_unrecognized_opts=
835ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836# The variables have the same names as the options, with
837# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000838cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841no_recursion=
842prefix=NONE
843program_prefix=NONE
844program_suffix=NONE
845program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850x_includes=NONE
851x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000852
853# Installation directory options.
854# These are left unexpanded so users can "make install exec_prefix=/foo"
855# and all the variables that are supposed to be based on exec_prefix
856# by default will actually change.
857# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859bindir='${exec_prefix}/bin'
860sbindir='${exec_prefix}/sbin'
861libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862datarootdir='${prefix}/share'
863datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864sysconfdir='${prefix}/etc'
865sharedstatedir='${prefix}/com'
866localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867includedir='${prefix}/include'
868oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
870infodir='${datarootdir}/info'
871htmldir='${docdir}'
872dvidir='${docdir}'
873pdfdir='${docdir}'
874psdir='${docdir}'
875libdir='${exec_prefix}/lib'
876localedir='${datarootdir}/locale'
877mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000882do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883 # If the previous option needs an argument, assign it.
884 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886 ac_prev=
887 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000888 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200891 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
892 *=) ac_optarg= ;;
893 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896 # Accept the important Cygnus configure options, so we can diagnose typos.
897
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898 case $ac_dashdash$ac_option in
899 --)
900 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902 -bindir | --bindir | --bindi | --bind | --bin | --bi)
903 ac_prev=bindir ;;
904 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000905 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906
907 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912 -cache-file | --cache-file | --cache-fil | --cache-fi \
913 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
914 ac_prev=cache_file ;;
915 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
916 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 cache_file=$ac_optarg ;;
918
919 --config-cache | -C)
920 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
928 | --dataroo | --dataro | --datar)
929 ac_prev=datarootdir ;;
930 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
931 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
932 datarootdir=$ac_optarg ;;
933
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000935 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000937 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200938 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000939 ac_useropt_orig=$ac_useropt
940 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
941 case $ac_user_opts in
942 *"
943"enable_$ac_useropt"
944"*) ;;
945 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
946 ac_unrecognized_sep=', ';;
947 esac
948 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949
950 -docdir | --docdir | --docdi | --doc | --do)
951 ac_prev=docdir ;;
952 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
953 docdir=$ac_optarg ;;
954
955 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
956 ac_prev=dvidir ;;
957 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
958 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
960 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200964 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt_orig=$ac_useropt
966 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
967 case $ac_user_opts in
968 *"
969"enable_$ac_useropt"
970"*) ;;
971 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
972 ac_unrecognized_sep=', ';;
973 esac
974 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
977 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
978 | --exec | --exe | --ex)
979 ac_prev=exec_prefix ;;
980 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
981 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
982 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986 # Obsolete; use --with-gas.
987 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 -help | --help | --hel | --he | -h)
990 ac_init_help=long ;;
991 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
992 ac_init_help=recursive ;;
993 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
994 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001001 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1002 ac_prev=htmldir ;;
1003 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1004 | --ht=*)
1005 htmldir=$ac_optarg ;;
1006
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007 -includedir | --includedir | --includedi | --included | --include \
1008 | --includ | --inclu | --incl | --inc)
1009 ac_prev=includedir ;;
1010 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1011 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013
1014 -infodir | --infodir | --infodi | --infod | --info | --inf)
1015 ac_prev=infodir ;;
1016 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018
1019 -libdir | --libdir | --libdi | --libd)
1020 ac_prev=libdir ;;
1021 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1025 | --libexe | --libex | --libe)
1026 ac_prev=libexecdir ;;
1027 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1028 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 -localedir | --localedir | --localedi | --localed | --locale)
1032 ac_prev=localedir ;;
1033 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1034 localedir=$ac_optarg ;;
1035
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001037 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 ac_prev=localstatedir ;;
1039 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001040 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
1043 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1044 ac_prev=mandir ;;
1045 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001049 # Obsolete; use --without-fp.
1050 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
1052 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 no_create=yes ;;
1055
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001056 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1057 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1058 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1061 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1062 | --oldin | --oldi | --old | --ol | --o)
1063 ac_prev=oldincludedir ;;
1064 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1065 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1066 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1070 ac_prev=prefix ;;
1071 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1075 | --program-pre | --program-pr | --program-p)
1076 ac_prev=program_prefix ;;
1077 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1078 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
1081 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1082 | --program-suf | --program-su | --program-s)
1083 ac_prev=program_suffix ;;
1084 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1085 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -program-transform-name | --program-transform-name \
1089 | --program-transform-nam | --program-transform-na \
1090 | --program-transform-n | --program-transform- \
1091 | --program-transform | --program-transfor \
1092 | --program-transfo | --program-transf \
1093 | --program-trans | --program-tran \
1094 | --progr-tra | --program-tr | --program-t)
1095 ac_prev=program_transform_name ;;
1096 -program-transform-name=* | --program-transform-name=* \
1097 | --program-transform-nam=* | --program-transform-na=* \
1098 | --program-transform-n=* | --program-transform-=* \
1099 | --program-transform=* | --program-transfor=* \
1100 | --program-transfo=* | --program-transf=* \
1101 | --program-trans=* | --program-tran=* \
1102 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001105 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1106 ac_prev=pdfdir ;;
1107 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1108 pdfdir=$ac_optarg ;;
1109
1110 -psdir | --psdir | --psdi | --psd | --ps)
1111 ac_prev=psdir ;;
1112 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1113 psdir=$ac_optarg ;;
1114
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1116 | -silent | --silent | --silen | --sile | --sil)
1117 silent=yes ;;
1118
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1120 ac_prev=sbindir ;;
1121 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1122 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001124
1125 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1126 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1127 | --sharedst | --shareds | --shared | --share | --shar \
1128 | --sha | --sh)
1129 ac_prev=sharedstatedir ;;
1130 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1131 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1132 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1133 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 -site | --site | --sit)
1137 ac_prev=site ;;
1138 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1142 ac_prev=srcdir ;;
1143 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1147 | --syscon | --sysco | --sysc | --sys | --sy)
1148 ac_prev=sysconfdir ;;
1149 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1150 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
1158 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1159 verbose=yes ;;
1160
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 -version | --version | --versio | --versi | --vers | -V)
1162 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163
1164 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001168 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 ac_useropt_orig=$ac_useropt
1170 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171 case $ac_user_opts in
1172 *"
1173"with_$ac_useropt"
1174"*) ;;
1175 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1176 ac_unrecognized_sep=', ';;
1177 esac
1178 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
1180 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001184 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 ac_useropt_orig=$ac_useropt
1186 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1187 case $ac_user_opts in
1188 *"
1189"with_$ac_useropt"
1190"*) ;;
1191 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1192 ac_unrecognized_sep=', ';;
1193 esac
1194 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196 --x)
1197 # Obsolete; use --with-x.
1198 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1201 | --x-incl | --x-inc | --x-in | --x-i)
1202 ac_prev=x_includes ;;
1203 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1204 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
1207 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1208 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1209 ac_prev=x_libraries ;;
1210 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1211 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001212 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1215Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216 ;;
1217
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 *=*)
1219 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1220 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 case $ac_envvar in #(
1222 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001225 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 export $ac_envvar ;;
1227
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001228 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001230 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001232 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001233 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234 ;;
1235
1236 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001237done
1238
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001241 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242fi
1243
Matthias Kloseb9621712010-04-24 17:59:49 +00001244if test -n "$ac_unrecognized_opts"; then
1245 case $enable_option_checking in
1246 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001247 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1249 esac
1250fi
1251
1252# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1254 datadir sysconfdir sharedstatedir localstatedir includedir \
1255 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1256 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001257do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 # Remove trailing slashes.
1260 case $ac_val in
1261 */ )
1262 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1263 eval $ac_var=\$ac_val;;
1264 esac
1265 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 [\\/$]* | ?:[\\/]* ) continue;;
1268 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001270 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001271done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272
Martin v. Löwis11437992002-04-12 09:54:03 +00001273# There might be people who depend on the old broken behavior: `$host'
1274# used to hold the argument of --host etc.
1275# FIXME: To remove some day.
1276build=$build_alias
1277host=$host_alias
1278target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279
Martin v. Löwis11437992002-04-12 09:54:03 +00001280# FIXME: To remove some day.
1281if test "x$host_alias" != x; then
1282 if test "x$build_alias" = x; then
1283 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 elif test "x$build_alias" != "x$host_alias"; then
1285 cross_compiling=yes
1286 fi
1287fi
1288
1289ac_tool_prefix=
1290test -n "$host_alias" && ac_tool_prefix=$host_alias-
1291
1292test "$silent" = yes && exec 6>/dev/null
1293
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295ac_pwd=`pwd` && test -n "$ac_pwd" &&
1296ac_ls_di=`ls -di .` &&
1297ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001300 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301
1302
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303# Find the source files, if location was not specified.
1304if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001305 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001306 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001307 ac_confdir=`$as_dirname -- "$as_myself" ||
1308$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1309 X"$as_myself" : 'X\(//\)[^/]' \| \
1310 X"$as_myself" : 'X\(//\)$' \| \
1311 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1312$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1314 s//\1/
1315 q
1316 }
1317 /^X\(\/\/\)[^/].*/{
1318 s//\1/
1319 q
1320 }
1321 /^X\(\/\/\)$/{
1322 s//\1/
1323 q
1324 }
1325 /^X\(\/\).*/{
1326 s//\1/
1327 q
1328 }
1329 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001330 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332 srcdir=..
1333 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001334else
1335 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337if test ! -r "$srcdir/$ac_unique_file"; then
1338 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1342ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001343 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344 pwd)`
1345# When building in place, set srcdir=.
1346if test "$ac_abs_confdir" = "$ac_pwd"; then
1347 srcdir=.
1348fi
1349# Remove unnecessary trailing slashes from srcdir.
1350# Double slashes in file names in object file debugging info
1351# mess up M-x gdb in Emacs.
1352case $srcdir in
1353*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1354esac
1355for ac_var in $ac_precious_vars; do
1356 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1357 eval ac_env_${ac_var}_value=\$${ac_var}
1358 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1359 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1360done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001361
Martin v. Löwis11437992002-04-12 09:54:03 +00001362#
1363# Report the --help message.
1364#
1365if test "$ac_init_help" = "long"; then
1366 # Omit some internal or obsolete options to make the list less imposing.
1367 # This message is too long to be a string in the A/UX 3.1 sh.
1368 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001369\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001370
1371Usage: $0 [OPTION]... [VAR=VALUE]...
1372
1373To assign environment variables (e.g., CC, CFLAGS...), specify them as
1374VAR=VALUE. See below for descriptions of some of the useful variables.
1375
1376Defaults for the options are specified in brackets.
1377
1378Configuration:
1379 -h, --help display this help and exit
1380 --help=short display options specific to this package
1381 --help=recursive display the short help of all the included packages
1382 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 --cache-file=FILE cache test results in FILE [disabled]
1385 -C, --config-cache alias for \`--cache-file=config.cache'
1386 -n, --no-create do not create output files
1387 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1388
Martin v. Löwis11437992002-04-12 09:54:03 +00001389Installation directories:
1390 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001391 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001393 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001394
1395By default, \`make install' will install all the files in
1396\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1397an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1398for instance \`--prefix=\$HOME'.
1399
1400For better control, use the options below.
1401
1402Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001403 --bindir=DIR user executables [EPREFIX/bin]
1404 --sbindir=DIR system admin executables [EPREFIX/sbin]
1405 --libexecdir=DIR program executables [EPREFIX/libexec]
1406 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1407 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1408 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1409 --libdir=DIR object code libraries [EPREFIX/lib]
1410 --includedir=DIR C header files [PREFIX/include]
1411 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1412 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1413 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1414 --infodir=DIR info documentation [DATAROOTDIR/info]
1415 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1416 --mandir=DIR man documentation [DATAROOTDIR/man]
1417 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1418 --htmldir=DIR html documentation [DOCDIR]
1419 --dvidir=DIR dvi documentation [DOCDIR]
1420 --pdfdir=DIR pdf documentation [DOCDIR]
1421 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422_ACEOF
1423
1424 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001425
1426System types:
1427 --build=BUILD configure for building on BUILD [guessed]
1428 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429_ACEOF
1430fi
1431
1432if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001433 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001434 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001435 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 cat <<\_ACEOF
1437
1438Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001439 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1441 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001442 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001443 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --enable-framework[=INSTALLDIR]
1445 Build (MacOSX|Darwin) framework
1446 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001447 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001448 --enable-loadable-sqlite-extensions
1449 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001450 --enable-ipv6 Enable ipv6 (with ipv4) support
1451 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001452 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001453 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001454
1455Optional Packages:
1456 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1457 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001458 --with-universal-archs=ARCH
1459 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001460 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001461 --with-framework-name=FRAMEWORK
1462 specify an alternate name of the framework built
1463 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001464 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001465 --with-cxx-main=<compiler>
1466 compile main() and link python executable with C++
1467 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001468 --with-suffix=.exe set executable suffix
1469 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001470 --with-hash-algorithm=[fnv|siphash24]
1471 select hash algorithm
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001473 --with-system-expat build pyexpat module using an installed expat
1474 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001475 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001476 --with-system-libmpdec build _decimal module using an installed libmpdec
1477 library
Ned Deilyd819b932013-09-06 01:07:05 -07001478 --with-tcltk-includes='-I...'
1479 override search for Tcl and Tk include files
1480 --with-tcltk-libs='-L...'
1481 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001482 --with-dbmliborder=db1:db2:...
1483 order to check db backends for dbm. Valid value is a
1484 colon separated string with the backend names
1485 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --with(out)-threads[=DIRECTORY]
1488 disable/enable thread support
1489 --with(out)-thread[=DIRECTORY]
1490 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001492 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001494 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --with-fpectl enable SIGFPE catching
1496 --with-libm=STRING math library
1497 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001498 --with(out)-computed-gotos
1499 Use computed gotos in evaluation loop (enabled by
1500 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001501
1502Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001503 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001504 CC C compiler command
1505 CFLAGS C compiler flags
1506 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1507 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001508 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001509 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 CPP C preprocessor
1512
1513Use these variables to override the choices made by `configure' or to help
1514it to find libraries and programs with nonstandard names/locations.
1515
Georg Brandle2e15612009-05-20 18:25:10 +00001516Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001517_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001519fi
1520
1521if test "$ac_init_help" = "recursive"; then
1522 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001523 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001524 test -d "$ac_dir" ||
1525 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1526 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 ac_builddir=.
1528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529case "$ac_dir" in
1530.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1531*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001532 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001533 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001534 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001535 case $ac_top_builddir_sub in
1536 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1537 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1538 esac ;;
1539esac
1540ac_abs_top_builddir=$ac_pwd
1541ac_abs_builddir=$ac_pwd$ac_dir_suffix
1542# for backward compatibility:
1543ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001544
1545case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001546 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_top_srcdir=$ac_top_builddir_sub
1549 ac_abs_top_srcdir=$ac_pwd ;;
1550 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001552 ac_top_srcdir=$srcdir
1553 ac_abs_top_srcdir=$srcdir ;;
1554 *) # Relative name.
1555 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1556 ac_top_srcdir=$ac_top_build_prefix$srcdir
1557 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001558esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 cd "$ac_dir" || { ac_status=$?; continue; }
1562 # Check for guested configure.
1563 if test -f "$ac_srcdir/configure.gnu"; then
1564 echo &&
1565 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1566 elif test -f "$ac_srcdir/configure"; then
1567 echo &&
1568 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001570 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571 fi || ac_status=$?
1572 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 done
1574fi
1575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001576test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001577if $ac_init_version; then
1578 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001579python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001580generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001581
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001582Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001583This configure script is free software; the Free Software Foundation
1584gives unlimited permission to copy, distribute and modify it.
1585_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001588
1589## ------------------------ ##
1590## Autoconf initialization. ##
1591## ------------------------ ##
1592
1593# ac_fn_c_try_compile LINENO
1594# --------------------------
1595# Try to compile conftest.$ac_ext, and return whether this succeeded.
1596ac_fn_c_try_compile ()
1597{
1598 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1599 rm -f conftest.$ac_objext
1600 if { { ac_try="$ac_compile"
1601case "(($ac_try" in
1602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1603 *) ac_try_echo=$ac_try;;
1604esac
1605eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1606$as_echo "$ac_try_echo"; } >&5
1607 (eval "$ac_compile") 2>conftest.err
1608 ac_status=$?
1609 if test -s conftest.err; then
1610 grep -v '^ *+' conftest.err >conftest.er1
1611 cat conftest.er1 >&5
1612 mv -f conftest.er1 conftest.err
1613 fi
1614 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1615 test $ac_status = 0; } && {
1616 test -z "$ac_c_werror_flag" ||
1617 test ! -s conftest.err
1618 } && test -s conftest.$ac_objext; then :
1619 ac_retval=0
1620else
1621 $as_echo "$as_me: failed program was:" >&5
1622sed 's/^/| /' conftest.$ac_ext >&5
1623
1624 ac_retval=1
1625fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001626 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001627 as_fn_set_status $ac_retval
1628
1629} # ac_fn_c_try_compile
1630
Matthias Kloseb9621712010-04-24 17:59:49 +00001631# ac_fn_c_try_link LINENO
1632# -----------------------
1633# Try to link conftest.$ac_ext, and return whether this succeeded.
1634ac_fn_c_try_link ()
1635{
1636 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1637 rm -f conftest.$ac_objext conftest$ac_exeext
1638 if { { ac_try="$ac_link"
1639case "(($ac_try" in
1640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1641 *) ac_try_echo=$ac_try;;
1642esac
1643eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1644$as_echo "$ac_try_echo"; } >&5
1645 (eval "$ac_link") 2>conftest.err
1646 ac_status=$?
1647 if test -s conftest.err; then
1648 grep -v '^ *+' conftest.err >conftest.er1
1649 cat conftest.er1 >&5
1650 mv -f conftest.er1 conftest.err
1651 fi
1652 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1653 test $ac_status = 0; } && {
1654 test -z "$ac_c_werror_flag" ||
1655 test ! -s conftest.err
1656 } && test -s conftest$ac_exeext && {
1657 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001658 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001659 }; then :
1660 ac_retval=0
1661else
1662 $as_echo "$as_me: failed program was:" >&5
1663sed 's/^/| /' conftest.$ac_ext >&5
1664
1665 ac_retval=1
1666fi
1667 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1668 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1669 # interfere with the next link command; also delete a directory that is
1670 # left behind by Apple's compiler. We do this before executing the actions.
1671 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001672 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 as_fn_set_status $ac_retval
1674
1675} # ac_fn_c_try_link
1676
Matthias Kloseb9621712010-04-24 17:59:49 +00001677# ac_fn_c_try_cpp LINENO
1678# ----------------------
1679# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1680ac_fn_c_try_cpp ()
1681{
1682 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1683 if { { ac_try="$ac_cpp conftest.$ac_ext"
1684case "(($ac_try" in
1685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1686 *) ac_try_echo=$ac_try;;
1687esac
1688eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1689$as_echo "$ac_try_echo"; } >&5
1690 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1691 ac_status=$?
1692 if test -s conftest.err; then
1693 grep -v '^ *+' conftest.err >conftest.er1
1694 cat conftest.er1 >&5
1695 mv -f conftest.er1 conftest.err
1696 fi
1697 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001698 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001699 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1700 test ! -s conftest.err
1701 }; then :
1702 ac_retval=0
1703else
1704 $as_echo "$as_me: failed program was:" >&5
1705sed 's/^/| /' conftest.$ac_ext >&5
1706
1707 ac_retval=1
1708fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001709 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001710 as_fn_set_status $ac_retval
1711
1712} # ac_fn_c_try_cpp
1713
1714# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1715# -------------------------------------------------------
1716# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1717# the include files in INCLUDES and setting the cache variable VAR
1718# accordingly.
1719ac_fn_c_check_header_mongrel ()
1720{
1721 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001722 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1724$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001725if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001726 $as_echo_n "(cached) " >&6
1727fi
1728eval ac_res=\$$3
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1730$as_echo "$ac_res" >&6; }
1731else
1732 # Is the header compilable?
1733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1734$as_echo_n "checking $2 usability... " >&6; }
1735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1736/* end confdefs.h. */
1737$4
1738#include <$2>
1739_ACEOF
1740if ac_fn_c_try_compile "$LINENO"; then :
1741 ac_header_compiler=yes
1742else
1743 ac_header_compiler=no
1744fi
1745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1747$as_echo "$ac_header_compiler" >&6; }
1748
1749# Is the header present?
1750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1751$as_echo_n "checking $2 presence... " >&6; }
1752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1753/* end confdefs.h. */
1754#include <$2>
1755_ACEOF
1756if ac_fn_c_try_cpp "$LINENO"; then :
1757 ac_header_preproc=yes
1758else
1759 ac_header_preproc=no
1760fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001761rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1763$as_echo "$ac_header_preproc" >&6; }
1764
1765# So? What about this header?
1766case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1767 yes:no: )
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1769$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1771$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1772 ;;
1773 no:yes:* )
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1775$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1777$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1779$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1781$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1783$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001784( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001785## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001786## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001787 ) | sed "s/^/$as_me: WARNING: /" >&2
1788 ;;
1789esac
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1791$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001792if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001793 $as_echo_n "(cached) " >&6
1794else
1795 eval "$3=\$ac_header_compiler"
1796fi
1797eval ac_res=\$$3
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1799$as_echo "$ac_res" >&6; }
1800fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001801 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001802
1803} # ac_fn_c_check_header_mongrel
1804
1805# ac_fn_c_try_run LINENO
1806# ----------------------
1807# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1808# that executables *can* be run.
1809ac_fn_c_try_run ()
1810{
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 if { { ac_try="$ac_link"
1813case "(($ac_try" in
1814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1815 *) ac_try_echo=$ac_try;;
1816esac
1817eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1818$as_echo "$ac_try_echo"; } >&5
1819 (eval "$ac_link") 2>&5
1820 ac_status=$?
1821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1822 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1823 { { case "(($ac_try" in
1824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1825 *) ac_try_echo=$ac_try;;
1826esac
1827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1828$as_echo "$ac_try_echo"; } >&5
1829 (eval "$ac_try") 2>&5
1830 ac_status=$?
1831 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1832 test $ac_status = 0; }; }; then :
1833 ac_retval=0
1834else
1835 $as_echo "$as_me: program exited with status $ac_status" >&5
1836 $as_echo "$as_me: failed program was:" >&5
1837sed 's/^/| /' conftest.$ac_ext >&5
1838
1839 ac_retval=$ac_status
1840fi
1841 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001842 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 as_fn_set_status $ac_retval
1844
1845} # ac_fn_c_try_run
1846
1847# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1848# -------------------------------------------------------
1849# Tests whether HEADER exists and can be compiled using the include files in
1850# INCLUDES, setting the cache variable VAR accordingly.
1851ac_fn_c_check_header_compile ()
1852{
1853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1855$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001856if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001857 $as_echo_n "(cached) " >&6
1858else
1859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1860/* end confdefs.h. */
1861$4
1862#include <$2>
1863_ACEOF
1864if ac_fn_c_try_compile "$LINENO"; then :
1865 eval "$3=yes"
1866else
1867 eval "$3=no"
1868fi
1869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1870fi
1871eval ac_res=\$$3
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1873$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001874 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001875
1876} # ac_fn_c_check_header_compile
1877
Matthias Kloseb9621712010-04-24 17:59:49 +00001878# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1879# -------------------------------------------
1880# Tests whether TYPE exists after having included INCLUDES, setting cache
1881# variable VAR accordingly.
1882ac_fn_c_check_type ()
1883{
1884 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1886$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001887if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 $as_echo_n "(cached) " >&6
1889else
1890 eval "$3=no"
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$4
1894int
1895main ()
1896{
1897if (sizeof ($2))
1898 return 0;
1899 ;
1900 return 0;
1901}
1902_ACEOF
1903if ac_fn_c_try_compile "$LINENO"; then :
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907int
1908main ()
1909{
1910if (sizeof (($2)))
1911 return 0;
1912 ;
1913 return 0;
1914}
1915_ACEOF
1916if ac_fn_c_try_compile "$LINENO"; then :
1917
1918else
1919 eval "$3=yes"
1920fi
1921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1922fi
1923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924fi
1925eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001928 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001929
1930} # ac_fn_c_check_type
1931
1932# ac_fn_c_find_uintX_t LINENO BITS VAR
1933# ------------------------------------
1934# Finds an unsigned integer type with width BITS, setting cache variable VAR
1935# accordingly.
1936ac_fn_c_find_uintX_t ()
1937{
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1940$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001941if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001942 $as_echo_n "(cached) " >&6
1943else
1944 eval "$3=no"
1945 # Order is important - never check a type that is potentially smaller
1946 # than half of the expected target width.
1947 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1948 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$ac_includes_default
1952int
1953main ()
1954{
1955static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001956test_array [0] = 0;
1957return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001958
1959 ;
1960 return 0;
1961}
1962_ACEOF
1963if ac_fn_c_try_compile "$LINENO"; then :
1964 case $ac_type in #(
1965 uint$2_t) :
1966 eval "$3=yes" ;; #(
1967 *) :
1968 eval "$3=\$ac_type" ;;
1969esac
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001972 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001973
1974else
1975 break
1976fi
1977 done
1978fi
1979eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001982 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001983
1984} # ac_fn_c_find_uintX_t
1985
1986# ac_fn_c_find_intX_t LINENO BITS VAR
1987# -----------------------------------
1988# Finds a signed integer type with width BITS, setting cache variable VAR
1989# accordingly.
1990ac_fn_c_find_intX_t ()
1991{
1992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1994$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001995if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001996 $as_echo_n "(cached) " >&6
1997else
1998 eval "$3=no"
1999 # Order is important - never check a type that is potentially smaller
2000 # than half of the expected target width.
2001 for ac_type in int$2_t 'int' 'long int' \
2002 'long long int' 'short int' 'signed char'; do
2003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002006 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002007int
2008main ()
2009{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002010static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002022 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002023int
2024main ()
2025{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002026static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002027 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002028test_array [0] = 0;
2029return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002030
2031 ;
2032 return 0;
2033}
2034_ACEOF
2035if ac_fn_c_try_compile "$LINENO"; then :
2036
2037else
2038 case $ac_type in #(
2039 int$2_t) :
2040 eval "$3=yes" ;; #(
2041 *) :
2042 eval "$3=\$ac_type" ;;
2043esac
2044fi
2045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2046fi
2047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002048 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002049
2050else
2051 break
2052fi
2053 done
2054fi
2055eval ac_res=\$$3
2056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2057$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002058 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002059
2060} # ac_fn_c_find_intX_t
2061
2062# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2063# --------------------------------------------
2064# Tries to find the compile-time value of EXPR in a program that includes
2065# INCLUDES, setting VAR accordingly. Returns whether the value could be
2066# computed
2067ac_fn_c_compute_int ()
2068{
2069 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2070 if test "$cross_compiling" = yes; then
2071 # Depending upon the size, compute the lo and hi bounds.
2072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073/* end confdefs.h. */
2074$4
2075int
2076main ()
2077{
2078static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002079test_array [0] = 0;
2080return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002081
2082 ;
2083 return 0;
2084}
2085_ACEOF
2086if ac_fn_c_try_compile "$LINENO"; then :
2087 ac_lo=0 ac_mid=0
2088 while :; do
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002096test_array [0] = 0;
2097return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_hi=$ac_mid; break
2105else
2106 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2107 if test $ac_lo -le $ac_mid; then
2108 ac_lo= ac_hi=
2109 break
2110 fi
2111 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114 done
2115else
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119int
2120main ()
2121{
2122static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002123test_array [0] = 0;
2124return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002125
2126 ;
2127 return 0;
2128}
2129_ACEOF
2130if ac_fn_c_try_compile "$LINENO"; then :
2131 ac_hi=-1 ac_mid=-1
2132 while :; do
2133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2134/* end confdefs.h. */
2135$4
2136int
2137main ()
2138{
2139static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002140test_array [0] = 0;
2141return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002142
2143 ;
2144 return 0;
2145}
2146_ACEOF
2147if ac_fn_c_try_compile "$LINENO"; then :
2148 ac_lo=$ac_mid; break
2149else
2150 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2151 if test $ac_mid -le $ac_hi; then
2152 ac_lo= ac_hi=
2153 break
2154 fi
2155 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2156fi
2157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2158 done
2159else
2160 ac_lo= ac_hi=
2161fi
2162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163fi
2164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2165# Binary search between lo and hi bounds.
2166while test "x$ac_lo" != "x$ac_hi"; do
2167 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2169/* end confdefs.h. */
2170$4
2171int
2172main ()
2173{
2174static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002175test_array [0] = 0;
2176return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002177
2178 ;
2179 return 0;
2180}
2181_ACEOF
2182if ac_fn_c_try_compile "$LINENO"; then :
2183 ac_hi=$ac_mid
2184else
2185 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2186fi
2187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2188done
2189case $ac_lo in #((
2190?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2191'') ac_retval=1 ;;
2192esac
2193 else
2194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2195/* end confdefs.h. */
2196$4
2197static long int longval () { return $2; }
2198static unsigned long int ulongval () { return $2; }
2199#include <stdio.h>
2200#include <stdlib.h>
2201int
2202main ()
2203{
2204
2205 FILE *f = fopen ("conftest.val", "w");
2206 if (! f)
2207 return 1;
2208 if (($2) < 0)
2209 {
2210 long int i = longval ();
2211 if (i != ($2))
2212 return 1;
2213 fprintf (f, "%ld", i);
2214 }
2215 else
2216 {
2217 unsigned long int i = ulongval ();
2218 if (i != ($2))
2219 return 1;
2220 fprintf (f, "%lu", i);
2221 }
2222 /* Do not output a trailing newline, as this causes \r\n confusion
2223 on some platforms. */
2224 return ferror (f) || fclose (f) != 0;
2225
2226 ;
2227 return 0;
2228}
2229_ACEOF
2230if ac_fn_c_try_run "$LINENO"; then :
2231 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2232else
2233 ac_retval=1
2234fi
2235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2236 conftest.$ac_objext conftest.beam conftest.$ac_ext
2237rm -f conftest.val
2238
2239 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002240 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002241 as_fn_set_status $ac_retval
2242
2243} # ac_fn_c_compute_int
2244
2245# ac_fn_c_check_func LINENO FUNC VAR
2246# ----------------------------------
2247# Tests whether FUNC exists, setting the cache variable VAR accordingly
2248ac_fn_c_check_func ()
2249{
2250 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2252$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002253if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002254 $as_echo_n "(cached) " >&6
2255else
2256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257/* end confdefs.h. */
2258/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2259 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2260#define $2 innocuous_$2
2261
2262/* System header to define __stub macros and hopefully few prototypes,
2263 which can conflict with char $2 (); below.
2264 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2265 <limits.h> exists even on freestanding compilers. */
2266
2267#ifdef __STDC__
2268# include <limits.h>
2269#else
2270# include <assert.h>
2271#endif
2272
2273#undef $2
2274
2275/* Override any GCC internal prototype to avoid an error.
2276 Use char because int might match the return type of a GCC
2277 builtin and then its argument prototype would still apply. */
2278#ifdef __cplusplus
2279extern "C"
2280#endif
2281char $2 ();
2282/* The GNU C library defines this for functions which it implements
2283 to always fail with ENOSYS. Some functions are actually named
2284 something starting with __ and the normal name is an alias. */
2285#if defined __stub_$2 || defined __stub___$2
2286choke me
2287#endif
2288
2289int
2290main ()
2291{
2292return $2 ();
2293 ;
2294 return 0;
2295}
2296_ACEOF
2297if ac_fn_c_try_link "$LINENO"; then :
2298 eval "$3=yes"
2299else
2300 eval "$3=no"
2301fi
2302rm -f core conftest.err conftest.$ac_objext \
2303 conftest$ac_exeext conftest.$ac_ext
2304fi
2305eval ac_res=\$$3
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2307$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002308 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002309
2310} # ac_fn_c_check_func
2311
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002312# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2313# ---------------------------------------------
2314# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2315# accordingly.
2316ac_fn_c_check_decl ()
2317{
2318 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2319 as_decl_name=`echo $2|sed 's/ *(.*//'`
2320 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2322$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2323if eval \${$3+:} false; then :
2324 $as_echo_n "(cached) " >&6
2325else
2326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2327/* end confdefs.h. */
2328$4
2329int
2330main ()
2331{
2332#ifndef $as_decl_name
2333#ifdef __cplusplus
2334 (void) $as_decl_use;
2335#else
2336 (void) $as_decl_name;
2337#endif
2338#endif
2339
2340 ;
2341 return 0;
2342}
2343_ACEOF
2344if ac_fn_c_try_compile "$LINENO"; then :
2345 eval "$3=yes"
2346else
2347 eval "$3=no"
2348fi
2349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2350fi
2351eval ac_res=\$$3
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2353$as_echo "$ac_res" >&6; }
2354 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2355
2356} # ac_fn_c_check_decl
2357
Matthias Kloseb9621712010-04-24 17:59:49 +00002358# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2359# ----------------------------------------------------
2360# Tries to find if the field MEMBER exists in type AGGR, after including
2361# INCLUDES, setting cache variable VAR accordingly.
2362ac_fn_c_check_member ()
2363{
2364 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2366$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002367if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002368 $as_echo_n "(cached) " >&6
2369else
2370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371/* end confdefs.h. */
2372$5
2373int
2374main ()
2375{
2376static $2 ac_aggr;
2377if (ac_aggr.$3)
2378return 0;
2379 ;
2380 return 0;
2381}
2382_ACEOF
2383if ac_fn_c_try_compile "$LINENO"; then :
2384 eval "$4=yes"
2385else
2386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387/* end confdefs.h. */
2388$5
2389int
2390main ()
2391{
2392static $2 ac_aggr;
2393if (sizeof ac_aggr.$3)
2394return 0;
2395 ;
2396 return 0;
2397}
2398_ACEOF
2399if ac_fn_c_try_compile "$LINENO"; then :
2400 eval "$4=yes"
2401else
2402 eval "$4=no"
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405fi
2406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2407fi
2408eval ac_res=\$$4
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2410$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002411 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002412
2413} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002415This file contains any messages produced by compilers while
2416running configure, to aid debugging if configure makes a mistake.
2417
Georg Brandl08a90122012-09-29 09:34:13 +02002418It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002419generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002420
2421 $ $0 $@
2422
2423_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002425{
2426cat <<_ASUNAME
2427## --------- ##
2428## Platform. ##
2429## --------- ##
2430
2431hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2432uname -m = `(uname -m) 2>/dev/null || echo unknown`
2433uname -r = `(uname -r) 2>/dev/null || echo unknown`
2434uname -s = `(uname -s) 2>/dev/null || echo unknown`
2435uname -v = `(uname -v) 2>/dev/null || echo unknown`
2436
2437/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2438/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2439
2440/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2441/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2442/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002444/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2445/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2446/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2447
2448_ASUNAME
2449
2450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2451for as_dir in $PATH
2452do
2453 IFS=$as_save_IFS
2454 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 $as_echo "PATH: $as_dir"
2456 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002458
2459} >&5
2460
2461cat >&5 <<_ACEOF
2462
2463
2464## ----------- ##
2465## Core tests. ##
2466## ----------- ##
2467
2468_ACEOF
2469
2470
2471# Keep a trace of the command line.
2472# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002473# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002474# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002475# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002476ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002477ac_configure_args0=
2478ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002479ac_must_keep_next=false
2480for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002481do
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 for ac_arg
2483 do
2484 case $ac_arg in
2485 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2486 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2487 | -silent | --silent | --silen | --sile | --sil)
2488 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 esac
2492 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002497 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002499 case $ac_arg in
2500 *=* | --config-cache | -C | -disable-* | --disable-* \
2501 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2502 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2503 | -with-* | --with-* | -without-* | --without-* | --x)
2504 case "$ac_configure_args0 " in
2505 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2506 esac
2507 ;;
2508 -* ) ac_must_keep_next=true ;;
2509 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 ;;
2513 esac
2514 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002515done
Matthias Kloseb9621712010-04-24 17:59:49 +00002516{ ac_configure_args0=; unset ac_configure_args0;}
2517{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002518
2519# When interrupted or exit'd, cleanup temporary files, and complete
2520# config.log. We remove comments because anyway the quotes in there
2521# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522# WARNING: Use '\'' to represent an apostrophe within the trap.
2523# 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 +00002524trap 'exit_status=$?
2525 # Save into config.log some information that might help in debugging.
2526 {
2527 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002528
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002529 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002530## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 echo
2533 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534(
2535 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2536 eval ac_val=\$$ac_var
2537 case $ac_val in #(
2538 *${as_nl}*)
2539 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2541$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 esac
2543 case $ac_var in #(
2544 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2546 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 esac ;;
2548 esac
2549 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2552 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 "s/'\''/'\''\\\\'\'''\''/g;
2555 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2556 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002557 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002559 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 esac |
2561 sort
2562)
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002564
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002565 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002566## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002567## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002568 echo
2569 for ac_var in $ac_subst_vars
2570 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 eval ac_val=\$$ac_var
2572 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002576 done | sort
2577 echo
2578
2579 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002582## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002583 echo
2584 for ac_var in $ac_subst_files
2585 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586 eval ac_val=\$$ac_var
2587 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002591 done | sort
2592 echo
2593 fi
2594
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002596 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002597## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 echo
2602 fi
2603 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 $as_echo "$as_me: caught signal $ac_signal"
2605 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 rm -f core *.core core.conftest.* &&
2608 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002611for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002612 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002613done
2614ac_signal=0
2615
2616# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002618
Matthias Kloseb9621712010-04-24 17:59:49 +00002619$as_echo "/* confdefs.h */" > confdefs.h
2620
Martin v. Löwis11437992002-04-12 09:54:03 +00002621# Predefined preprocessor variables.
2622
2623cat >>confdefs.h <<_ACEOF
2624#define PACKAGE_NAME "$PACKAGE_NAME"
2625_ACEOF
2626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2629_ACEOF
2630
Martin v. Löwis11437992002-04-12 09:54:03 +00002631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_VERSION "$PACKAGE_VERSION"
2633_ACEOF
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_STRING "$PACKAGE_STRING"
2637_ACEOF
2638
Martin v. Löwis11437992002-04-12 09:54:03 +00002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2641_ACEOF
2642
Matthias Kloseb9621712010-04-24 17:59:49 +00002643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_URL "$PACKAGE_URL"
2645_ACEOF
2646
Martin v. Löwis11437992002-04-12 09:54:03 +00002647
2648# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002649# Prefer an explicitly selected file to automatically selected ones.
2650ac_site_file1=NONE
2651ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002653 # We do not want a PATH search for config.site.
2654 case $CONFIG_SITE in #((
2655 -*) ac_site_file1=./$CONFIG_SITE;;
2656 */*) ac_site_file1=$CONFIG_SITE;;
2657 *) ac_site_file1=./$CONFIG_SITE;;
2658 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002659elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 ac_site_file1=$prefix/share/config.site
2661 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662else
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 ac_site_file1=$ac_default_prefix/share/config.site
2664 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002666for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667do
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 test "x$ac_site_file" = xNONE && continue
2669 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2671$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002673 . "$ac_site_file" \
2674 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2676as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002677See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678 fi
2679done
2680
2681if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002682 # Some versions of bash will fail to source /dev/null (special files
2683 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2684 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2686$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2689 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002690 esac
2691 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002692else
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2694$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 >$cache_file
2696fi
2697
2698# Check that the precious variables saved in the cache have kept the same
2699# value.
2700ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002701for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2703 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2705 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 case $ac_old_set,$ac_new_set in
2707 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2709$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 +00002710 ac_cache_corrupted=: ;;
2711 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2713$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 ac_cache_corrupted=: ;;
2715 ,);;
2716 *)
2717 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002718 # differences in whitespace do not lead to failure.
2719 ac_old_val_w=`echo x $ac_old_val`
2720 ac_new_val_w=`echo x $ac_new_val`
2721 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2723$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2724 ac_cache_corrupted=:
2725 else
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2727$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2728 eval $ac_var=\$ac_old_val
2729 fi
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2731$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2733$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 fi;;
2735 esac
2736 # Pass precious variables to config.status.
2737 if test "$ac_new_set" = set; then
2738 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002739 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 *) ac_arg=$ac_var=$ac_new_val ;;
2741 esac
2742 case " $ac_configure_args " in
2743 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002744 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 esac
2746 fi
2747done
2748if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2752$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002753 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002755## -------------------- ##
2756## Main body of script. ##
2757## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002758
Guido van Rossum7f43da71994-08-01 12:15:30 +00002759ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002760ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002761ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2762ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2763ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002764
Guido van Rossum627b2d71993-12-24 10:39:16 +00002765
Michael W. Hudson54241132001-12-07 15:38:26 +00002766
Trent Nelson4d4ec652012-10-16 08:51:24 -04002767
Trent Nelson5595ab52012-10-17 04:47:31 -04002768if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002769 # If we're building out-of-tree, we need to make sure the following
2770 # resources get picked up before their $srcdir counterparts.
2771 # Objects/ -> typeslots.inc
2772 # Include/ -> Python-ast.h, graminit.h
2773 # Python/ -> importlib.h
2774 # (A side effect of this is that these resources will automatically be
2775 # regenerated when building out-of-tree, regardless of whether or not
2776 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2777 # off.)
2778 BASECPPFLAGS="-IObjects -IInclude -IPython"
2779else
2780 BASECPPFLAGS=""
2781fi
2782
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002783
2784
2785
2786
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002787if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002788then
2789# Extract the first word of "hg", so it can be a program name with args.
2790set dummy hg; ac_word=$2
2791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2792$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002793if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002794 $as_echo_n "(cached) " >&6
2795else
2796 if test -n "$HAS_HG"; then
2797 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2798else
2799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2800for as_dir in $PATH
2801do
2802 IFS=$as_save_IFS
2803 test -z "$as_dir" && as_dir=.
2804 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002805 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002806 ac_cv_prog_HAS_HG="found"
2807 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2808 break 2
2809 fi
2810done
2811 done
2812IFS=$as_save_IFS
2813
2814 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2815fi
2816fi
2817HAS_HG=$ac_cv_prog_HAS_HG
2818if test -n "$HAS_HG"; then
2819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2820$as_echo "$HAS_HG" >&6; }
2821else
2822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2823$as_echo "no" >&6; }
2824fi
2825
2826
2827else
2828HAS_HG=no-repository
2829fi
2830if test $HAS_HG = found
2831then
2832 HGVERSION="hg id -i \$(srcdir)"
2833 HGTAG="hg id -t \$(srcdir)"
2834 HGBRANCH="hg id -b \$(srcdir)"
2835else
2836 HGVERSION=""
2837 HGTAG=""
2838 HGBRANCH=""
2839fi
2840
2841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002842ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002843
2844
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002845ac_aux_dir=
2846for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2847 if test -f "$ac_dir/install-sh"; then
2848 ac_aux_dir=$ac_dir
2849 ac_install_sh="$ac_aux_dir/install-sh -c"
2850 break
2851 elif test -f "$ac_dir/install.sh"; then
2852 ac_aux_dir=$ac_dir
2853 ac_install_sh="$ac_aux_dir/install.sh -c"
2854 break
2855 elif test -f "$ac_dir/shtool"; then
2856 ac_aux_dir=$ac_dir
2857 ac_install_sh="$ac_aux_dir/shtool install -c"
2858 break
2859 fi
2860done
2861if test -z "$ac_aux_dir"; then
2862 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2863fi
2864
2865# These three variables are undocumented and unsupported,
2866# and are intended to be withdrawn in a future Autoconf release.
2867# They can cause serious problems if a builder's source tree is in a directory
2868# whose full name contains unusual characters.
2869ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2870ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2871ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2872
2873
2874# Make sure we can run config.sub.
2875$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2876 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2877
2878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2879$as_echo_n "checking build system type... " >&6; }
2880if ${ac_cv_build+:} false; then :
2881 $as_echo_n "(cached) " >&6
2882else
2883 ac_build_alias=$build_alias
2884test "x$ac_build_alias" = x &&
2885 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2886test "x$ac_build_alias" = x &&
2887 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2888ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2889 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2890
2891fi
2892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2893$as_echo "$ac_cv_build" >&6; }
2894case $ac_cv_build in
2895*-*-*) ;;
2896*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2897esac
2898build=$ac_cv_build
2899ac_save_IFS=$IFS; IFS='-'
2900set x $ac_cv_build
2901shift
2902build_cpu=$1
2903build_vendor=$2
2904shift; shift
2905# Remember, the first character of IFS is used to create $*,
2906# except with old shells:
2907build_os=$*
2908IFS=$ac_save_IFS
2909case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2910
2911
2912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2913$as_echo_n "checking host system type... " >&6; }
2914if ${ac_cv_host+:} false; then :
2915 $as_echo_n "(cached) " >&6
2916else
2917 if test "x$host_alias" = x; then
2918 ac_cv_host=$ac_cv_build
2919else
2920 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2921 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2922fi
2923
2924fi
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2926$as_echo "$ac_cv_host" >&6; }
2927case $ac_cv_host in
2928*-*-*) ;;
2929*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2930esac
2931host=$ac_cv_host
2932ac_save_IFS=$IFS; IFS='-'
2933set x $ac_cv_host
2934shift
2935host_cpu=$1
2936host_vendor=$2
2937shift; shift
2938# Remember, the first character of IFS is used to create $*,
2939# except with old shells:
2940host_os=$*
2941IFS=$ac_save_IFS
2942case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2943
2944
2945
doko@python.orga10e4a92013-01-25 18:45:12 +01002946
2947
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002948if test "$cross_compiling" = yes; then
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2950$as_echo_n "checking for python interpreter for cross build... " >&6; }
2951 if test -z "$PYTHON_FOR_BUILD"; then
2952 for interp in python$PACKAGE_VERSION python3 python; do
2953 which $interp >/dev/null 2>&1 || continue
2954 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2955 break
2956 fi
2957 interp=
2958 done
2959 if test x$interp = x; then
2960 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2961 fi
2962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2963$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002964 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 +02002965 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002966elif test "$cross_compiling" = maybe; then
2967 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002968else
2969 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2970fi
2971
2972
Martin v. Löwis11437992002-04-12 09:54:03 +00002973
Benjamin Petersond23f8222009-04-05 19:13:16 +00002974if test "$prefix" != "/"; then
2975 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2976fi
2977
2978
Martin v. Löwis11437992002-04-12 09:54:03 +00002979
2980
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002981# We don't use PACKAGE_ variables, and they cause conflicts
2982# with other autoconf-based packages that include Python.h
2983grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2984rm confdefs.h
2985mv confdefs.h.new confdefs.h
2986
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002987
Georg Brandl08a90122012-09-29 09:34:13 +02002988VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002989
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002990# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002991
2992SOVERSION=1.0
2993
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002994# The later defininition of _XOPEN_SOURCE disables certain features
2995# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002998
2999
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003000# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3001# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3002# them.
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003005
3006
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003007# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3008# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3009# them.
3010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003012
3013
Martin v. Löwisd6320502004-08-12 13:45:08 +00003014# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3015# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003018
3019
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003020# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3021# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3022# them.
3023
Matthias Kloseb9621712010-04-24 17:59:49 +00003024$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003025
3026
3027
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003028define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003029
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003030# Arguments passed to configure.
3031
3032CONFIG_ARGS="$ac_configure_args"
3033
Matthias Kloseb9621712010-04-24 17:59:49 +00003034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3035$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003036# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003037if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039 case $enableval in
3040 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003041 # Locate the best usable SDK, see Mac/README.txt for more
3042 # information
3043 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003044 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003046 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3047 if test ! -d "${enableval}"
3048 then
3049 enableval=/
3050 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052 ;;
3053 esac
3054 case $enableval in
3055 no)
3056 UNIVERSALSDK=
3057 enable_universalsdk=
3058 ;;
3059 *)
3060 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061 if test ! -d "${UNIVERSALSDK}"
3062 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003063 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003064 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003065 ;;
3066 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003067
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003068
Thomas Wouters477c8d52006-05-27 19:21:47 +00003069else
3070
3071 UNIVERSALSDK=
3072 enable_universalsdk=
3073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003075
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076if test -n "${UNIVERSALSDK}"
3077then
Matthias Kloseb9621712010-04-24 17:59:49 +00003078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3079$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003080else
Matthias Kloseb9621712010-04-24 17:59:49 +00003081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3082$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003083fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003084
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003085
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003086
Ned Deily87adb6e2013-10-18 21:09:56 -07003087ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003088
Ned Deilycbfb9a52012-06-23 16:02:19 -07003089# For backward compatibility reasons we prefer to select '32-bit' if available,
3090# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003092if test "`uname -s`" = "Darwin"
3093then
3094 if test -n "${UNIVERSALSDK}"
3095 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003096 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097 then
3098 UNIVERSAL_ARCHS="intel"
3099 fi
3100 fi
3101fi
3102
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003103
Matthias Kloseb9621712010-04-24 17:59:49 +00003104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3105$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003106
3107# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003108if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003109 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003110 UNIVERSAL_ARCHS="$withval"
3111
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003112fi
3113
Ned Deily87adb6e2013-10-18 21:09:56 -07003114if test -n "${UNIVERSALSDK}"
3115then
3116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3117$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3118else
3119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3120$as_echo "no" >&6; }
3121fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003123
3124# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003125if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003126 withval=$with_framework_name;
3127 PYTHONFRAMEWORK=${withval}
3128 PYTHONFRAMEWORKDIR=${withval}.framework
3129 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3130
3131else
3132
3133 PYTHONFRAMEWORK=Python
3134 PYTHONFRAMEWORKDIR=Python.framework
3135 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3136
3137fi
3138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003139# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003140if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003142 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003143 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003144 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 esac
3146 case $enableval in
3147 no)
3148 PYTHONFRAMEWORK=
3149 PYTHONFRAMEWORKDIR=no-framework
3150 PYTHONFRAMEWORKPREFIX=
3151 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003152 FRAMEWORKINSTALLFIRST=
3153 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003154 FRAMEWORKALTINSTALLFIRST=
3155 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003156 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 if test "x${prefix}" = "xNONE"; then
3158 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3159 else
3160 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3161 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003162 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003163 ;;
3164 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003165 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003166 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003167 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003168 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003169 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3170 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003171 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003172 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003173
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003174 if test "x${prefix}" = "xNONE" ; then
3175 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003176
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003177 else
3178 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3179 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003180
3181 case "${enableval}" in
3182 /System*)
3183 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3184 if test "${prefix}" = "NONE" ; then
3185 # See below
3186 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3187 fi
3188 ;;
3189
3190 /Library*)
3191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3192 ;;
3193
3194 */Library/Frameworks)
3195 MDIR="`dirname "${enableval}"`"
3196 MDIR="`dirname "${MDIR}"`"
3197 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3198
3199 if test "${prefix}" = "NONE"; then
3200 # User hasn't specified the
3201 # --prefix option, but wants to install
3202 # the framework in a non-default location,
3203 # ensure that the compatibility links get
3204 # installed relative to that prefix as well
3205 # instead of in /usr/local.
3206 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3207 fi
3208 ;;
3209
3210 *)
3211 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3212 ;;
3213 esac
3214
Jack Jansen127e56e2001-09-11 14:41:54 +00003215 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003217 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003222
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003223 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3224
3225 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3226
Jack Jansene578a632001-08-15 01:27:14 +00003227 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003228
Guido van Rossum563e7081996-09-10 18:20:48 +00003229else
Martin v. Löwis11437992002-04-12 09:54:03 +00003230
Jack Jansene578a632001-08-15 01:27:14 +00003231 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003232 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003233 PYTHONFRAMEWORKPREFIX=
3234 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003235 FRAMEWORKINSTALLFIRST=
3236 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003237 FRAMEWORKALTINSTALLFIRST=
3238 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003239 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003240 if test "x${prefix}" = "xNONE" ; then
3241 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3242 else
3243 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3244 fi
Jack Jansene578a632001-08-15 01:27:14 +00003245 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003247
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003248fi
3249
Thomas Wouters477c8d52006-05-27 19:21:47 +00003250
3251
Michael W. Hudson54241132001-12-07 15:38:26 +00003252
3253
3254
3255
Jack Jansene578a632001-08-15 01:27:14 +00003256
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003257
3258
3259
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003260
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003261
Ned Deilyb8f944f2013-11-21 22:42:25 -08003262
Jack Jansene578a632001-08-15 01:27:14 +00003263##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003264## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003265## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003266##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003267# Set name for machine-dependent library files
3268
Matthias Kloseb9621712010-04-24 17:59:49 +00003269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3270$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271if test -z "$MACHDEP"
3272then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003273 # avoid using uname for cross builds
3274 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003275 # ac_sys_system and ac_sys_release are used for setting
3276 # a lot of different things including 'define_xopen_source'
3277 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 case "$host" in
3279 *-*-linux*)
3280 ac_sys_system=Linux
3281 ;;
3282 *-*-cygwin*)
3283 ac_sys_system=Cygwin
3284 ;;
3285 *)
3286 # for now, limit cross builds to known configurations
3287 MACHDEP="unknown"
3288 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3289 esac
3290 ac_sys_release=
3291 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003292 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003293 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003294 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003295 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003296 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003297 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003299 fi
3300 ac_md_system=`echo $ac_sys_system |
3301 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3302 ac_md_release=`echo $ac_sys_release |
3303 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3304 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003305
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003306 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003307 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003308 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003309 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003310 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003311 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003312 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003313fi
Guido van Rossum91922671997-10-09 20:24:13 +00003314
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003315
3316if test "$cross_compiling" = yes; then
3317 case "$host" in
3318 *-*-linux*)
3319 case "$host_cpu" in
3320 arm*)
3321 _host_cpu=arm
3322 ;;
3323 *)
3324 _host_cpu=$host_cpu
3325 esac
3326 ;;
3327 *-*-cygwin*)
3328 _host_cpu=
3329 ;;
3330 *)
3331 # for now, limit cross builds to known configurations
3332 MACHDEP="unknown"
3333 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3334 esac
3335 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3336fi
3337
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003338# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3339# disable features if it is defined, without any means to access these
3340# features as extensions. For these systems, we skip the definition of
3341# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3342# some feature, make sure there is no alternative way to access this
3343# feature. Also, when using wildcards, make sure you have verified the
3344# need for not defining _XOPEN_SOURCE on all systems matching the
3345# wildcard, and that the wildcard does not include future systems
3346# (which may remove their limitations).
3347case $ac_sys_system/$ac_sys_release in
3348 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3349 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003350 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003351 # In addition, Stefan Krah confirms that issue #1244610 exists through
3352 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003353 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003354 define_xopen_source=no
3355 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3356 # also defined. This can be overridden by defining _BSD_SOURCE
3357 # As this has a different meaning on Linux, only define it on OpenBSD
3358
Matthias Kloseb9621712010-04-24 17:59:49 +00003359$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003360
3361 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003362 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003363 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3364 # also defined. This can be overridden by defining _BSD_SOURCE
3365 # As this has a different meaning on Linux, only define it on OpenBSD
3366
Matthias Kloseb9621712010-04-24 17:59:49 +00003367$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003368
3369 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003370 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3371 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3372 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003373 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 +00003374 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003375 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3376 # request to enable features supported by the standard as a request
3377 # to disable features not supported by the standard. The best way
3378 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3379 # entirely and define __EXTENSIONS__ instead.
3380 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003381 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003382 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3383 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003384 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003385 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003386 define_xopen_source=no;;
3387 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003388 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003389 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003390 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003391 # On FreeBSD 4, the math functions C89 does not cover are never defined
3392 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3393 FreeBSD/4.*)
3394 define_xopen_source=no;;
3395 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3396 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3397 # identifies itself as Darwin/7.*
3398 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3399 # disables platform specific features beyond repair.
3400 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3401 # has no effect, don't bother defining them
3402 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003403 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003404 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003405 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003406 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3407 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3408 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003409 AIX/4)
3410 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003411 AIX/5)
3412 if test `uname -r` -eq 1; then
3413 define_xopen_source=no
3414 fi
3415 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003416 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3417 # defining NI_NUMERICHOST.
3418 QNX/6.3.2)
3419 define_xopen_source=no
3420 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003421
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003422esac
3423
3424if test $define_xopen_source = yes
3425then
Victor Stinner14d098d2011-09-07 22:29:43 +02003426 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Victor Stinner14d098d2011-09-07 22:29:43 +02003428$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003429
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003430
3431 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3432 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3433 # several APIs are not declared. Since this is also needed in some
3434 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
Matthias Kloseb9621712010-04-24 17:59:49 +00003436$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003437
3438
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003439
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003440$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003441
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003442fi
3443
Guido van Rossum91922671997-10-09 20:24:13 +00003444#
3445# SGI compilers allow the specification of the both the ABI and the
3446# ISA on the command line. Depending on the values of these switches,
3447# different and often incompatable code will be generated.
3448#
3449# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3450# thus supply support for various ABI/ISA combinations. The MACHDEP
3451# variable is also adjusted.
3452#
3453
3454if test ! -z "$SGI_ABI"
3455then
3456 CC="cc $SGI_ABI"
3457 LDFLAGS="$SGI_ABI $LDFLAGS"
3458 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3461$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003462
Jack Jansen6b08a402004-06-03 12:41:45 +00003463# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3464# it may influence the way we can build extensions, so distutils
3465# needs to check it
3466
Thomas Wouters477c8d52006-05-27 19:21:47 +00003467
Jack Jansen6b08a402004-06-03 12:41:45 +00003468CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003469EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003470
Guido van Rossum627b2d71993-12-24 10:39:16 +00003471# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003472
3473# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3474# for debug/optimization stuff. BASECFLAGS is for flags that are required
3475# just to get things to compile and link. Users are free to override OPT
3476# when running configure or make. The build should not break if they do.
3477# BASECFLAGS should generally not be messed with, however.
3478
3479# XXX shouldn't some/most/all of this code be merged with the stuff later
3480# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3482$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003485if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003486 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003487 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003488 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003489 without_gcc=yes;;
3490 yes) CC=gcc
3491 without_gcc=no;;
3492 *) CC=$withval
3493 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003494 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003495else
Martin v. Löwis11437992002-04-12 09:54:03 +00003496
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003497 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003498 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003499 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003500 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003501 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502fi
3503
Matthias Kloseb9621712010-04-24 17:59:49 +00003504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3505$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003506
Guido van Rossum8b131c51995-03-09 14:10:13 +00003507# If the user switches compilers, we can't believe the cache
3508if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3509then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003510 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003511(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003512fi
3513
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003514# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3515# when the compiler supports them, but we don't always want -O2, and
3516# we set -g later.
3517if test -z "$CFLAGS"; then
3518 CFLAGS=
3519fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003520
3521if test "$ac_sys_system" = "Darwin"
3522then
3523 # Compiler selection on MacOSX is more complicated than
3524 # AC_PROG_CC can handle, see Mac/README.txt for more
3525 # information
3526 if test -z "${CC}"
3527 then
3528 found_gcc=
3529 found_clang=
3530 as_save_IFS=$IFS; IFS=:
3531 for as_dir in $PATH
3532 do
3533 IFS=$as_save_IFS
3534 if test -x $as_dir/gcc; then
3535 if test -z "${found_gcc}"; then
3536 found_gcc=$as_dir/gcc
3537 fi
3538 fi
3539 if test -x $as_dir/clang; then
3540 if test -z "${found_clang}"; then
3541 found_clang=$as_dir/clang
3542 fi
3543 fi
3544 done
3545 IFS=$as_save_IFS
3546
3547 if test -n "$found_gcc" -a -n "$found_clang"
3548 then
3549 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3550 then
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3552$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3553 CC="$found_clang"
3554 CXX="$found_clang++"
3555 fi
3556
3557
3558 elif test -z "$found_gcc" -a -n "$found_clang"
3559 then
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3561$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3562 CC="$found_clang"
3563 CXX="$found_clang++"
3564
3565 elif test -z "$found_gcc" -a -z "$found_clang"
3566 then
3567 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3568 if test -n "${found_clang}"
3569 then
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3571$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3572 CC="${found_clang}"
3573 CXX="`/usr/bin/xcrun -find clang++`"
3574
3575 # else: use default behaviour
3576 fi
3577 fi
3578 fi
3579fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003580ac_ext=c
3581ac_cpp='$CPP $CPPFLAGS'
3582ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3583ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3584ac_compiler_gnu=$ac_cv_c_compiler_gnu
3585if test -n "$ac_tool_prefix"; then
3586 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3587set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3589$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003590if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003592else
3593 if test -n "$CC"; then
3594 ac_cv_prog_CC="$CC" # Let the user override the test.
3595else
Martin v. Löwis11437992002-04-12 09:54:03 +00003596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3597for as_dir in $PATH
3598do
3599 IFS=$as_save_IFS
3600 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003603 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 $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 +00003605 break 2
3606 fi
3607done
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003610
Jack Jansendd19cf82001-12-06 22:36:17 +00003611fi
3612fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003613CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003614if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3616$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003617else
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3619$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003620fi
3621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622
Martin v. Löwis11437992002-04-12 09:54:03 +00003623fi
3624if test -z "$ac_cv_prog_CC"; then
3625 ac_ct_CC=$CC
3626 # Extract the first word of "gcc", so it can be a program name with args.
3627set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3629$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003630if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003632else
3633 if test -n "$ac_ct_CC"; then
3634 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3635else
3636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3637for as_dir in $PATH
3638do
3639 IFS=$as_save_IFS
3640 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 $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 +00003645 break 2
3646 fi
3647done
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003649IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003650
3651fi
3652fi
3653ac_ct_CC=$ac_cv_prog_ac_ct_CC
3654if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3656$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003657else
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3659$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003660fi
3661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662 if test "x$ac_ct_CC" = x; then
3663 CC=""
3664 else
3665 case $cross_compiling:$ac_tool_warned in
3666yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003667{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3668$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669ac_tool_warned=yes ;;
3670esac
3671 CC=$ac_ct_CC
3672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003673else
3674 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003675fi
3676
Jack Jansendd19cf82001-12-06 22:36:17 +00003677if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678 if test -n "$ac_tool_prefix"; then
3679 # 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 +00003680set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3682$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003683if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003685else
3686 if test -n "$CC"; then
3687 ac_cv_prog_CC="$CC" # Let the user override the test.
3688else
Martin v. Löwis11437992002-04-12 09:54:03 +00003689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3690for as_dir in $PATH
3691do
3692 IFS=$as_save_IFS
3693 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003695 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 $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 +00003698 break 2
3699 fi
3700done
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003703
3704fi
3705fi
3706CC=$ac_cv_prog_CC
3707if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3709$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003710else
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3712$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003713fi
3714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715
Martin v. Löwis11437992002-04-12 09:54:03 +00003716 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003717fi
3718if test -z "$CC"; then
3719 # Extract the first word of "cc", so it can be a program name with args.
3720set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3722$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003723if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003725else
3726 if test -n "$CC"; then
3727 ac_cv_prog_CC="$CC" # Let the user override the test.
3728else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003729 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3731for as_dir in $PATH
3732do
3733 IFS=$as_save_IFS
3734 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3738 ac_prog_rejected=yes
3739 continue
3740 fi
3741 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 $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 +00003743 break 2
3744 fi
3745done
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003747IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003748
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749if test $ac_prog_rejected = yes; then
3750 # We found a bogon in the path, so make sure we never use it.
3751 set dummy $ac_cv_prog_CC
3752 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754 # We chose a different compiler from the bogus one.
3755 # However, it has the same basename, so the bogon will be chosen
3756 # first if we set CC to just the basename; use the full file name.
3757 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003758 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759 fi
3760fi
3761fi
3762fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003763CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3766$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767else
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3769$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770fi
3771
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772
Martin v. Löwis11437992002-04-12 09:54:03 +00003773fi
3774if test -z "$CC"; then
3775 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 do
3778 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3779set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3781$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003782if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003784else
3785 if test -n "$CC"; then
3786 ac_cv_prog_CC="$CC" # Let the user override the test.
3787else
Martin v. Löwis11437992002-04-12 09:54:03 +00003788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3789for as_dir in $PATH
3790do
3791 IFS=$as_save_IFS
3792 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 $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 +00003797 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003798 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003799done
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003802
3803fi
3804fi
3805CC=$ac_cv_prog_CC
3806if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3808$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003809else
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3811$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003812fi
3813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 test -n "$CC" && break
3816 done
3817fi
3818if test -z "$CC"; then
3819 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003821do
3822 # Extract the first word of "$ac_prog", so it can be a program name with args.
3823set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3825$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003826if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003828else
3829 if test -n "$ac_ct_CC"; then
3830 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3831else
3832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3833for as_dir in $PATH
3834do
3835 IFS=$as_save_IFS
3836 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 $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 +00003841 break 2
3842 fi
3843done
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003846
Martin v. Löwis11437992002-04-12 09:54:03 +00003847fi
3848fi
3849ac_ct_CC=$ac_cv_prog_ac_ct_CC
3850if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3852$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003853else
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003856fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 test -n "$ac_ct_CC" && break
3860done
Michael W. Hudson54241132001-12-07 15:38:26 +00003861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862 if test "x$ac_ct_CC" = x; then
3863 CC=""
3864 else
3865 case $cross_compiling:$ac_tool_warned in
3866yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003867{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3868$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869ac_tool_warned=yes ;;
3870esac
3871 CC=$ac_ct_CC
3872 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003873fi
3874
3875fi
3876
3877
Matthias Kloseb9621712010-04-24 17:59:49 +00003878test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003880as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003881See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003882
3883# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003884$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3885set X $ac_compile
3886ac_compiler=$2
3887for ac_option in --version -v -V -qversion; do
3888 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889case "(($ac_try" in
3890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3891 *) ac_try_echo=$ac_try;;
3892esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003893eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3894$as_echo "$ac_try_echo"; } >&5
3895 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003896 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003897 if test -s conftest.err; then
3898 sed '10a\
3899... rest of stderr output deleted ...
3900 10q' conftest.err >conftest.er1
3901 cat conftest.er1 >&5
3902 fi
3903 rm -f conftest.er1 conftest.err
3904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3905 test $ac_status = 0; }
3906done
Martin v. Löwis11437992002-04-12 09:54:03 +00003907
Matthias Kloseb9621712010-04-24 17:59:49 +00003908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003909/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003910
Martin v. Löwis11437992002-04-12 09:54:03 +00003911int
3912main ()
3913{
3914
3915 ;
3916 return 0;
3917}
3918_ACEOF
3919ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003920ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003921# Try to create an executable without -o first, disregard a.out.
3922# It will help us diagnose broken compilers, and finding out an intuition
3923# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3925$as_echo_n "checking whether the C compiler works... " >&6; }
3926ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3927
3928# The possible output files:
3929ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931ac_rmfiles=
3932for ac_file in $ac_files
3933do
3934 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3937 esac
3938done
3939rm -f $ac_rmfiles
3940
Matthias Kloseb9621712010-04-24 17:59:49 +00003941if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942case "(($ac_try" in
3943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3944 *) ac_try_echo=$ac_try;;
3945esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3947$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3951 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3953# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3954# in a Makefile. We should not override ac_cv_exeext if it was cached,
3955# so that the user can short-circuit this test for compilers unknown to
3956# Autoconf.
3957for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003958do
3959 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003960 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003962 ;;
3963 [ab].out )
3964 # We found the default executable, but exeext='' is most
3965 # certainly right.
3966 break;;
3967 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 then :; else
3970 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3971 fi
3972 # We set ac_cv_exeext here because the later test for it is not
3973 # safe: cross compilers may not add the suffix if given an `-o'
3974 # argument, so we may need to know it at that point already.
3975 # Even if this section looks crufty: it has the advantage of
3976 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003977 break;;
3978 * )
3979 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003980 esac
3981done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982test "$ac_cv_exeext" = no && ac_cv_exeext=
3983
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003984else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985 ac_file=''
3986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003987if test -z "$ac_file"; then :
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3989$as_echo "no" >&6; }
3990$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003991sed 's/^/| /' conftest.$ac_ext >&5
3992
Matthias Kloseb9621712010-04-24 17:59:49 +00003993{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3994$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003995as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003996See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003997else
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3999$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4002$as_echo_n "checking for C compiler default output file name... " >&6; }
4003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4004$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004005ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004006
Matthias Kloseb9621712010-04-24 17:59:49 +00004007rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4010$as_echo_n "checking for suffix of executables... " >&6; }
4011if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012case "(($ac_try" in
4013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014 *) ac_try_echo=$ac_try;;
4015esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004016eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4017$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4021 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004022 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4023# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4024# work properly (i.e., refer to `conftest.exe'), while it won't with
4025# `rm'.
4026for ac_file in conftest.exe conftest conftest.*; do
4027 test -f "$ac_file" || continue
4028 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004030 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4031 break;;
4032 * ) break;;
4033 esac
4034done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004035else
Matthias Kloseb9621712010-04-24 17:59:49 +00004036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004038as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004039See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004041rm -f conftest conftest$ac_cv_exeext
4042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4043$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004044
4045rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004046EXEEXT=$ac_cv_exeext
4047ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4049/* end confdefs.h. */
4050#include <stdio.h>
4051int
4052main ()
4053{
4054FILE *f = fopen ("conftest.out", "w");
4055 return ferror (f) || fclose (f) != 0;
4056
4057 ;
4058 return 0;
4059}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004061ac_clean_files="$ac_clean_files conftest.out"
4062# Check that the compiler produces executables we can run. If not, either
4063# the compiler is broken, or we cross compile.
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4065$as_echo_n "checking whether we are cross compiling... " >&6; }
4066if test "$cross_compiling" != yes; then
4067 { { ac_try="$ac_link"
4068case "(($ac_try" in
4069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070 *) ac_try_echo=$ac_try;;
4071esac
4072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073$as_echo "$ac_try_echo"; } >&5
4074 (eval "$ac_link") 2>&5
4075 ac_status=$?
4076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077 test $ac_status = 0; }
4078 if { ac_try='./conftest$ac_cv_exeext'
4079 { { case "(($ac_try" in
4080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4081 *) ac_try_echo=$ac_try;;
4082esac
4083eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4084$as_echo "$ac_try_echo"; } >&5
4085 (eval "$ac_try") 2>&5
4086 ac_status=$?
4087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4088 test $ac_status = 0; }; }; then
4089 cross_compiling=no
4090 else
4091 if test "$cross_compiling" = maybe; then
4092 cross_compiling=yes
4093 else
4094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004096as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004097If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004098See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 fi
4100 fi
4101fi
4102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4103$as_echo "$cross_compiling" >&6; }
4104
4105rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4106ac_clean_files=$ac_clean_files_save
4107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4108$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004109if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo_n "(cached) " >&6
4111else
4112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004113/* end confdefs.h. */
4114
4115int
4116main ()
4117{
4118
4119 ;
4120 return 0;
4121}
4122_ACEOF
4123rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004124if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125case "(($ac_try" in
4126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4127 *) ac_try_echo=$ac_try;;
4128esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004129eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4130$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004132 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4134 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 for ac_file in conftest.o conftest.obj conftest.*; do
4136 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4140 break;;
4141 esac
4142done
4143else
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004145sed 's/^/| /' conftest.$ac_ext >&5
4146
Matthias Kloseb9621712010-04-24 17:59:49 +00004147{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4148$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004149as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004150See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004151fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004152rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004153fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4155$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004156OBJEXT=$ac_cv_objext
4157ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4159$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004160if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004162else
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004165
Martin v. Löwis11437992002-04-12 09:54:03 +00004166int
4167main ()
4168{
4169#ifndef __GNUC__
4170 choke me
4171#endif
4172
4173 ;
4174 return 0;
4175}
4176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 ac_compiler_gnu=yes
4179else
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004183ac_cv_c_compiler_gnu=$ac_compiler_gnu
4184
4185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4187$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4188if test $ac_compiler_gnu = yes; then
4189 GCC=yes
4190else
4191 GCC=
4192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004193ac_test_CFLAGS=${CFLAGS+set}
4194ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4196$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004197if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004199else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200 ac_save_c_werror_flag=$ac_c_werror_flag
4201 ac_c_werror_flag=yes
4202 ac_cv_prog_cc_g=no
4203 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004206
Martin v. Löwis11437992002-04-12 09:54:03 +00004207int
4208main ()
4209{
4210
4211 ;
4212 return 0;
4213}
4214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004215if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004216 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004217else
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 CFLAGS=""
4219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220/* end confdefs.h. */
4221
4222int
4223main ()
4224{
4225
4226 ;
4227 return 0;
4228}
4229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004230if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231
Matthias Kloseb9621712010-04-24 17:59:49 +00004232else
4233 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004236/* end confdefs.h. */
4237
4238int
4239main ()
4240{
4241
4242 ;
4243 return 0;
4244}
4245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004246if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254 ac_c_werror_flag=$ac_save_c_werror_flag
4255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4257$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004259 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004260elif test $ac_cv_prog_cc_g = yes; then
4261 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004262 CFLAGS="-g -O2"
4263 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004264 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265 fi
4266else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004267 if test "$GCC" = yes; then
4268 CFLAGS="-O2"
4269 else
4270 CFLAGS=
4271 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4274$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004275if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004277else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004279ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004281/* end confdefs.h. */
4282#include <stdarg.h>
4283#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004284struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004285/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4286struct buf { int x; };
4287FILE * (*rcsopen) (struct buf *, struct stat *, int);
4288static char *e (p, i)
4289 char **p;
4290 int i;
4291{
4292 return p[i];
4293}
4294static char *f (char * (*g) (char **, int), char **p, ...)
4295{
4296 char *s;
4297 va_list v;
4298 va_start (v,p);
4299 s = g (p, va_arg (v,int));
4300 va_end (v);
4301 return s;
4302}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004303
4304/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4305 function prototypes and stuff, but not '\xHH' hex character constants.
4306 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004308 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4309 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004311int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4312
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4314 inside strings and character constants. */
4315#define FOO(x) 'x'
4316int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4317
Skip Montanaro6dead952003-09-25 14:50:04 +00004318int test (int i, double x);
4319struct s1 {int (*f) (int a);};
4320struct s2 {int (*f) (double a);};
4321int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4322int argc;
4323char **argv;
4324int
4325main ()
4326{
4327return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4328 ;
4329 return 0;
4330}
4331_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4333 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004334do
4335 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339rm -f core conftest.err conftest.$ac_objext
4340 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004341done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004343CC=$ac_save_CC
4344
4345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346# AC_CACHE_VAL
4347case "x$ac_cv_prog_cc_c89" in
4348 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4350$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4353$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004354 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4357$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004358esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004359if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004360
Matthias Kloseb9621712010-04-24 17:59:49 +00004361fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004362
Martin v. Löwis11437992002-04-12 09:54:03 +00004363ac_ext=c
4364ac_cpp='$CPP $CPPFLAGS'
4365ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4366ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4367ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004368
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004369
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004370
4371
Matthias Kloseb9621712010-04-24 17:59:49 +00004372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4373$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004376if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004378
4379 case $withval in
4380 no) with_cxx_main=no
4381 MAINCC='$(CC)';;
4382 yes) with_cxx_main=yes
4383 MAINCC='$(CXX)';;
4384 *) with_cxx_main=yes
4385 MAINCC=$withval
4386 if test -z "$CXX"
4387 then
4388 CXX=$withval
4389 fi;;
4390 esac
4391else
4392
4393 with_cxx_main=no
4394 MAINCC='$(CC)'
4395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396fi
4397
Matthias Kloseb9621712010-04-24 17:59:49 +00004398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4399$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004400
4401preset_cxx="$CXX"
4402if test -z "$CXX"
4403then
4404 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004405 gcc) if test -n "$ac_tool_prefix"; then
4406 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4407set dummy ${ac_tool_prefix}g++; ac_word=$2
4408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4409$as_echo_n "checking for $ac_word... " >&6; }
4410if ${ac_cv_path_CXX+:} false; then :
4411 $as_echo_n "(cached) " >&6
4412else
4413 case $CXX in
4414 [\\/]* | ?:[\\/]*)
4415 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4416 ;;
4417 *)
4418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4419for as_dir in notfound
4420do
4421 IFS=$as_save_IFS
4422 test -z "$as_dir" && as_dir=.
4423 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004424 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004425 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4426 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4427 break 2
4428 fi
4429done
4430 done
4431IFS=$as_save_IFS
4432
4433 ;;
4434esac
4435fi
4436CXX=$ac_cv_path_CXX
4437if test -n "$CXX"; then
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4439$as_echo "$CXX" >&6; }
4440else
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4442$as_echo "no" >&6; }
4443fi
4444
4445
4446fi
4447if test -z "$ac_cv_path_CXX"; then
4448 ac_pt_CXX=$CXX
4449 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004450set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4452$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004453if ${ac_cv_path_ac_pt_CXX+:} false; then :
4454 $as_echo_n "(cached) " >&6
4455else
4456 case $ac_pt_CXX in
4457 [\\/]* | ?:[\\/]*)
4458 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4459 ;;
4460 *)
4461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4462for as_dir in notfound
4463do
4464 IFS=$as_save_IFS
4465 test -z "$as_dir" && as_dir=.
4466 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004467 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004468 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4469 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4470 break 2
4471 fi
4472done
4473 done
4474IFS=$as_save_IFS
4475
4476 ;;
4477esac
4478fi
4479ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4480if test -n "$ac_pt_CXX"; then
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4482$as_echo "$ac_pt_CXX" >&6; }
4483else
4484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4485$as_echo "no" >&6; }
4486fi
4487
4488 if test "x$ac_pt_CXX" = x; then
4489 CXX="g++"
4490 else
4491 case $cross_compiling:$ac_tool_warned in
4492yes:)
4493{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4494$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4495ac_tool_warned=yes ;;
4496esac
4497 CXX=$ac_pt_CXX
4498 fi
4499else
4500 CXX="$ac_cv_path_CXX"
4501fi
4502 ;;
4503 cc) if test -n "$ac_tool_prefix"; then
4504 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4505set dummy ${ac_tool_prefix}c++; ac_word=$2
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4507$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004508if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004509 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004510else
4511 case $CXX in
4512 [\\/]* | ?:[\\/]*)
4513 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4514 ;;
4515 *)
4516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517for as_dir in notfound
4518do
4519 IFS=$as_save_IFS
4520 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004521 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004522 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004523 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004524 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004525 break 2
4526 fi
4527done
Matthias Kloseb9621712010-04-24 17:59:49 +00004528 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004529IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004530
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004531 ;;
4532esac
4533fi
4534CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004535if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4537$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004538else
Matthias Kloseb9621712010-04-24 17:59:49 +00004539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004542
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004543
4544fi
4545if test -z "$ac_cv_path_CXX"; then
4546 ac_pt_CXX=$CXX
4547 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004548set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4550$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004551if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004552 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004553else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004554 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004555 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004556 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 +00004557 ;;
4558 *)
4559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4560for as_dir in notfound
4561do
4562 IFS=$as_save_IFS
4563 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004564 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004565 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004566 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004567 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004568 break 2
4569 fi
4570done
Matthias Kloseb9621712010-04-24 17:59:49 +00004571 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004572IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004573
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004574 ;;
4575esac
4576fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004577ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4578if test -n "$ac_pt_CXX"; then
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4580$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004581else
Matthias Kloseb9621712010-04-24 17:59:49 +00004582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4583$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004585
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004586 if test "x$ac_pt_CXX" = x; then
4587 CXX="c++"
4588 else
4589 case $cross_compiling:$ac_tool_warned in
4590yes:)
4591{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4592$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4593ac_tool_warned=yes ;;
4594esac
4595 CXX=$ac_pt_CXX
4596 fi
4597else
4598 CXX="$ac_cv_path_CXX"
4599fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004600 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004601 clang|*/clang) if test -n "$ac_tool_prefix"; then
4602 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4603set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4605$as_echo_n "checking for $ac_word... " >&6; }
4606if ${ac_cv_path_CXX+:} false; then :
4607 $as_echo_n "(cached) " >&6
4608else
4609 case $CXX in
4610 [\\/]* | ?:[\\/]*)
4611 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4612 ;;
4613 *)
4614 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4615for as_dir in notfound
4616do
4617 IFS=$as_save_IFS
4618 test -z "$as_dir" && as_dir=.
4619 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004620 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004621 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4622 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4623 break 2
4624 fi
4625done
4626 done
4627IFS=$as_save_IFS
4628
Ned Deilycbfb9a52012-06-23 16:02:19 -07004629 ;;
4630esac
4631fi
4632CXX=$ac_cv_path_CXX
4633if test -n "$CXX"; then
4634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4635$as_echo "$CXX" >&6; }
4636else
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4638$as_echo "no" >&6; }
4639fi
4640
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004641
4642fi
4643if test -z "$ac_cv_path_CXX"; then
4644 ac_pt_CXX=$CXX
4645 # Extract the first word of "clang++", so it can be a program name with args.
4646set dummy clang++; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if ${ac_cv_path_ac_pt_CXX+:} false; then :
4650 $as_echo_n "(cached) " >&6
4651else
4652 case $ac_pt_CXX in
4653 [\\/]* | ?:[\\/]*)
4654 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4655 ;;
4656 *)
4657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in notfound
4659do
4660 IFS=$as_save_IFS
4661 test -z "$as_dir" && as_dir=.
4662 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666 break 2
4667 fi
4668done
4669 done
4670IFS=$as_save_IFS
4671
4672 ;;
4673esac
4674fi
4675ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4676if test -n "$ac_pt_CXX"; then
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4678$as_echo "$ac_pt_CXX" >&6; }
4679else
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684 if test "x$ac_pt_CXX" = x; then
4685 CXX="clang++"
4686 else
4687 case $cross_compiling:$ac_tool_warned in
4688yes:)
4689{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4690$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4691ac_tool_warned=yes ;;
4692esac
4693 CXX=$ac_pt_CXX
4694 fi
4695else
4696 CXX="$ac_cv_path_CXX"
4697fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004698 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004699 esac
4700 if test "$CXX" = "notfound"
4701 then
4702 CXX=""
4703 fi
4704fi
4705if test -z "$CXX"
4706then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004707 if test -n "$ac_tool_prefix"; then
4708 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4709 do
4710 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4711set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4713$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004714if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004715 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004716else
4717 if test -n "$CXX"; then
4718 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4719else
4720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4721for as_dir in $PATH
4722do
4723 IFS=$as_save_IFS
4724 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004725 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004727 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004729 break 2
4730 fi
4731done
Matthias Kloseb9621712010-04-24 17:59:49 +00004732 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004733IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004734
4735fi
4736fi
4737CXX=$ac_cv_prog_CXX
4738if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4740$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741else
Matthias Kloseb9621712010-04-24 17:59:49 +00004742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4743$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004744fi
4745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004746
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004747 test -n "$CXX" && break
4748 done
4749fi
4750if test -z "$CXX"; then
4751 ac_ct_CXX=$CXX
4752 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4753do
4754 # Extract the first word of "$ac_prog", so it can be a program name with args.
4755set dummy $ac_prog; ac_word=$2
4756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4757$as_echo_n "checking for $ac_word... " >&6; }
4758if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4759 $as_echo_n "(cached) " >&6
4760else
4761 if test -n "$ac_ct_CXX"; then
4762 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4763else
4764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4765for as_dir in $PATH
4766do
4767 IFS=$as_save_IFS
4768 test -z "$as_dir" && as_dir=.
4769 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771 ac_cv_prog_ac_ct_CXX="$ac_prog"
4772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4773 break 2
4774 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004776 done
4777IFS=$as_save_IFS
4778
4779fi
4780fi
4781ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4782if test -n "$ac_ct_CXX"; then
4783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4784$as_echo "$ac_ct_CXX" >&6; }
4785else
4786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4787$as_echo "no" >&6; }
4788fi
4789
4790
4791 test -n "$ac_ct_CXX" && break
4792done
4793
4794 if test "x$ac_ct_CXX" = x; then
4795 CXX="notfound"
4796 else
4797 case $cross_compiling:$ac_tool_warned in
4798yes:)
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4801ac_tool_warned=yes ;;
4802esac
4803 CXX=$ac_ct_CXX
4804 fi
4805fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806
4807 if test "$CXX" = "notfound"
4808 then
4809 CXX=""
4810 fi
4811fi
4812if test "$preset_cxx" != "$CXX"
4813then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004814 { $as_echo "$as_me:${as_lineno-$LINENO}:
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.
4818 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004819$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820
4821 By default, distutils will build C++ extension modules with \"$CXX\".
4822 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004823 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824fi
4825
4826
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4828$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4829save_LDFLAGS="$LDFLAGS"
4830LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004831
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4833/* end confdefs.h. */
4834
4835int
4836main ()
4837{
4838
4839 ;
4840 return 0;
4841}
4842_ACEOF
4843if ac_fn_c_try_link "$LINENO"; then :
4844 NO_AS_NEEDED="-Wl,--no-as-needed"
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4846$as_echo "yes" >&6; }
4847else
4848 NO_AS_NEEDED=""
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4850$as_echo "no" >&6; }
4851fi
4852rm -f core conftest.err conftest.$ac_objext \
4853 conftest$ac_exeext conftest.$ac_ext
4854LDFLAGS="$save_LDFLAGS"
4855
4856
4857
4858# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004859ac_ext=c
4860ac_cpp='$CPP $CPPFLAGS'
4861ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4862ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4863ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4865$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004866# On Suns, sometimes $CPP names a directory.
4867if test -n "$CPP" && test -d "$CPP"; then
4868 CPP=
4869fi
4870if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004871 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004872 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004873else
Martin v. Löwis11437992002-04-12 09:54:03 +00004874 # Double quotes because CPP needs to be expanded
4875 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4876 do
4877 ac_preproc_ok=false
4878for ac_c_preproc_warn_flag in '' yes
4879do
4880 # Use a header file that comes with gcc, so configuring glibc
4881 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004882 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4883 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004884 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004885 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004887/* end confdefs.h. */
4888#ifdef __STDC__
4889# include <limits.h>
4890#else
4891# include <assert.h>
4892#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004893 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004895if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004896
Matthias Kloseb9621712010-04-24 17:59:49 +00004897else
Martin v. Löwis11437992002-04-12 09:54:03 +00004898 # Broken: fails on valid input.
4899continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004900fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004901rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004903 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004904 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004907#include <ac_nonexistent.h>
4908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004909if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004910 # Broken: success on invalid input.
4911continue
4912else
Martin v. Löwis11437992002-04-12 09:54:03 +00004913 # Passes both tests.
4914ac_preproc_ok=:
4915break
4916fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004917rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004918
4919done
4920# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004921rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004922if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004923 break
4924fi
4925
4926 done
4927 ac_cv_prog_CPP=$CPP
4928
4929fi
4930 CPP=$ac_cv_prog_CPP
4931else
4932 ac_cv_prog_CPP=$CPP
4933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4935$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004936ac_preproc_ok=false
4937for ac_c_preproc_warn_flag in '' yes
4938do
4939 # Use a header file that comes with gcc, so configuring glibc
4940 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004941 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4942 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004943 # On the NeXT, cc -E runs the code through the compiler's parser,
4944 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004946/* end confdefs.h. */
4947#ifdef __STDC__
4948# include <limits.h>
4949#else
4950# include <assert.h>
4951#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004952 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004954if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004955
Matthias Kloseb9621712010-04-24 17:59:49 +00004956else
Martin v. Löwis11437992002-04-12 09:54:03 +00004957 # Broken: fails on valid input.
4958continue
4959fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004960rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004962 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004963 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004966#include <ac_nonexistent.h>
4967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004968if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004969 # Broken: success on invalid input.
4970continue
4971else
Martin v. Löwis11437992002-04-12 09:54:03 +00004972 # Passes both tests.
4973ac_preproc_ok=:
4974break
4975fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004976rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004977
4978done
4979# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004980rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004981if $ac_preproc_ok; then :
4982
Martin v. Löwis11437992002-04-12 09:54:03 +00004983else
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004986as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004987See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004988fi
4989
4990ac_ext=c
4991ac_cpp='$CPP $CPPFLAGS'
4992ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4993ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4994ac_compiler_gnu=$ac_cv_c_compiler_gnu
4995
4996
Matthias Kloseb9621712010-04-24 17:59:49 +00004997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4998$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004999if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005000 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005001else
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005003 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 # Loop through the user's path and test for each of PROGNAME-LIST
5005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005006for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5007do
5008 IFS=$as_save_IFS
5009 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005010 for ac_prog in grep ggrep; do
5011 for ac_exec_ext in '' $ac_executable_extensions; do
5012 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005013 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005014# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005015 # Check for GNU $ac_path_GREP
5016case `"$ac_path_GREP" --version 2>&1` in
5017*GNU*)
5018 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5019*)
5020 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005022 while :
5023 do
5024 cat "conftest.in" "conftest.in" >"conftest.tmp"
5025 mv "conftest.tmp" "conftest.in"
5026 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005028 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5029 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005031 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5032 # Best one so far, save it but keep looking for a better one
5033 ac_cv_path_GREP="$ac_path_GREP"
5034 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005035 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005036 # 10*(2^10) chars as input seems more than enough
5037 test $ac_count -gt 10 && break
5038 done
5039 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5040esac
5041
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 $ac_path_GREP_found && break 3
5043 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005044 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005048 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 +00005049 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005050else
5051 ac_cv_path_GREP=$GREP
5052fi
5053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5056$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005057 GREP="$ac_cv_path_GREP"
5058
5059
Matthias Kloseb9621712010-04-24 17:59:49 +00005060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5061$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005062if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064else
5065 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5066 then ac_cv_path_EGREP="$GREP -E"
5067 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 # Loop through the user's path and test for each of PROGNAME-LIST
5071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005072for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5073do
5074 IFS=$as_save_IFS
5075 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 for ac_prog in egrep; do
5077 for ac_exec_ext in '' $ac_executable_extensions; do
5078 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005079 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005080# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005081 # Check for GNU $ac_path_EGREP
5082case `"$ac_path_EGREP" --version 2>&1` in
5083*GNU*)
5084 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5085*)
5086 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005088 while :
5089 do
5090 cat "conftest.in" "conftest.in" >"conftest.tmp"
5091 mv "conftest.tmp" "conftest.in"
5092 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5095 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005097 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5098 # Best one so far, save it but keep looking for a better one
5099 ac_cv_path_EGREP="$ac_path_EGREP"
5100 ac_path_EGREP_max=$ac_count
5101 fi
5102 # 10*(2^10) chars as input seems more than enough
5103 test $ac_count -gt 10 && break
5104 done
5105 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5106esac
5107
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 $ac_path_EGREP_found && break 3
5109 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005110 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005112IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005114 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 +00005115 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005116else
5117 ac_cv_path_EGREP=$EGREP
5118fi
5119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120 fi
5121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5123$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005124 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005125
5126
Matthias Kloseb9621712010-04-24 17:59:49 +00005127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5128$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005129if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 $as_echo_n "(cached) " >&6
5131else
5132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005133/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005134#include <stdlib.h>
5135#include <stdarg.h>
5136#include <string.h>
5137#include <float.h>
5138
5139int
5140main ()
5141{
5142
5143 ;
5144 return 0;
5145}
5146_ACEOF
5147if ac_fn_c_try_compile "$LINENO"; then :
5148 ac_cv_header_stdc=yes
5149else
5150 ac_cv_header_stdc=no
5151fi
5152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5153
5154if test $ac_cv_header_stdc = yes; then
5155 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5157/* end confdefs.h. */
5158#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005159
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005160_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005162 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005163
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005164else
Matthias Kloseb9621712010-04-24 17:59:49 +00005165 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005166fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005167rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168
Matthias Kloseb9621712010-04-24 17:59:49 +00005169fi
5170
5171if test $ac_cv_header_stdc = yes; then
5172 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5174/* end confdefs.h. */
5175#include <stdlib.h>
5176
5177_ACEOF
5178if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5179 $EGREP "free" >/dev/null 2>&1; then :
5180
5181else
5182 ac_cv_header_stdc=no
5183fi
5184rm -f conftest*
5185
5186fi
5187
5188if test $ac_cv_header_stdc = yes; then
5189 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5190 if test "$cross_compiling" = yes; then :
5191 :
5192else
5193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5194/* end confdefs.h. */
5195#include <ctype.h>
5196#include <stdlib.h>
5197#if ((' ' & 0x0FF) == 0x020)
5198# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5199# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5200#else
5201# define ISLOWER(c) \
5202 (('a' <= (c) && (c) <= 'i') \
5203 || ('j' <= (c) && (c) <= 'r') \
5204 || ('s' <= (c) && (c) <= 'z'))
5205# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5206#endif
5207
5208#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5209int
5210main ()
5211{
5212 int i;
5213 for (i = 0; i < 256; i++)
5214 if (XOR (islower (i), ISLOWER (i))
5215 || toupper (i) != TOUPPER (i))
5216 return 2;
5217 return 0;
5218}
5219_ACEOF
5220if ac_fn_c_try_run "$LINENO"; then :
5221
5222else
5223 ac_cv_header_stdc=no
5224fi
5225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5226 conftest.$ac_objext conftest.beam conftest.$ac_ext
5227fi
5228
5229fi
5230fi
5231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5232$as_echo "$ac_cv_header_stdc" >&6; }
5233if test $ac_cv_header_stdc = yes; then
5234
5235$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5236
5237fi
5238
5239# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5240for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5241 inttypes.h stdint.h unistd.h
5242do :
5243 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5244ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5245"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005246if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005247 cat >>confdefs.h <<_ACEOF
5248#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5249_ACEOF
5250
5251fi
5252
5253done
5254
5255
5256
5257 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 +02005258if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005259 MINIX=yes
5260else
5261 MINIX=
5262fi
5263
5264
5265 if test "$MINIX" = yes; then
5266
5267$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5268
5269
5270$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5271
5272
5273$as_echo "#define _MINIX 1" >>confdefs.h
5274
5275 fi
5276
5277
5278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5279$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005280if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005281 $as_echo_n "(cached) " >&6
5282else
5283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5284/* end confdefs.h. */
5285
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005286# define __EXTENSIONS__ 1
5287 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005288int
5289main ()
5290{
5291
5292 ;
5293 return 0;
5294}
5295_ACEOF
5296if ac_fn_c_try_compile "$LINENO"; then :
5297 ac_cv_safe_to_define___extensions__=yes
5298else
5299 ac_cv_safe_to_define___extensions__=no
5300fi
5301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5302fi
5303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5304$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5305 test $ac_cv_safe_to_define___extensions__ = yes &&
5306 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5307
5308 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5309
5310 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5311
5312 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5313
5314 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5315
5316
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318# Check for unsupported systems
5319case $ac_sys_system/$ac_sys_release in
5320atheos*|Linux*/1*)
5321 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5322 echo See README for details.
5323 exit 1;;
5324esac
5325
5326
Matthias Kloseb9621712010-04-24 17:59:49 +00005327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5328$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329
5330# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005331if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332 withval=$with_suffix;
5333 case $withval in
5334 no) EXEEXT=;;
5335 yes) EXEEXT=.exe;;
5336 *) EXEEXT=$withval;;
5337 esac
5338fi
5339
Matthias Kloseb9621712010-04-24 17:59:49 +00005340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5341$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005342
5343# Test whether we're running on a non-case-sensitive system, in which
5344# case we give a warning if no ext is given
5345
Matthias Kloseb9621712010-04-24 17:59:49 +00005346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5347$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005348if test ! -d CaseSensitiveTestDir; then
5349mkdir CaseSensitiveTestDir
5350fi
5351
5352if test -d casesensitivetestdir
5353then
Matthias Kloseb9621712010-04-24 17:59:49 +00005354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5355$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005356 BUILDEXEEXT=.exe
5357else
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5359$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360 BUILDEXEEXT=$EXEEXT
5361fi
5362rmdir CaseSensitiveTestDir
5363
5364case $MACHDEP in
5365bsdos*)
5366 case $CC in
5367 gcc) CC="$CC -D_HAVE_BSDI";;
5368 esac;;
5369esac
5370
5371case $ac_sys_system in
5372hp*|HP*)
5373 case $CC in
5374 cc|*/cc) CC="$CC -Ae";;
5375 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376esac
5377
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005378MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5379
5380
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005381
5382
Matthias Kloseb9621712010-04-24 17:59:49 +00005383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5384$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385if test -z "$LIBRARY"
5386then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005387 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5390$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391
5392# LDLIBRARY is the name of the library to link against (as opposed to the
5393# name of the library into which to insert object files). BLDLIBRARY is also
5394# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5395# is blank as the main program is not linked directly against LDLIBRARY.
5396# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5397# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5398# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5399# DLLLIBRARY is the shared (i.e., DLL) library.
5400#
5401# RUNSHARED is used to run shared python without installed libraries
5402#
5403# INSTSONAME is the name of the shared library that will be use to install
5404# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005405#
5406# LDVERSION is the shared library version number, normally the Python version
5407# with the ABI build flags appended.
5408
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409
5410
5411
5412
5413
5414
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005415
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005416LDLIBRARY="$LIBRARY"
5417BLDLIBRARY='$(LDLIBRARY)'
5418INSTSONAME='$(LDLIBRARY)'
5419DLLLIBRARY=''
5420LDLIBRARYDIR=''
5421RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005422LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423
5424# LINKCC is the command that links the python executable -- default is $(CC).
5425# If CXX is set, and if it is needed to link a main function that was
5426# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5427# python might then depend on the C++ runtime
5428# This is altered for AIX in order to build the export list before
5429# linking.
5430
Matthias Kloseb9621712010-04-24 17:59:49 +00005431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5432$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005433if test -z "$LINKCC"
5434then
5435 LINKCC='$(PURIFY) $(MAINCC)'
5436 case $ac_sys_system in
5437 AIX*)
5438 exp_extra="\"\""
5439 if test $ac_sys_release -ge 5 -o \
5440 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5441 exp_extra="."
5442 fi
5443 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444 QNX*)
5445 # qcc must be used because the other compilers do not
5446 # support -N.
5447 LINKCC=qcc;;
5448 esac
5449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5451$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005452
5453# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5454# make sure we default having it set to "no": this is used by
5455# distutils.unixccompiler to know if it should add --enable-new-dtags
5456# to linker command lines, and failing to detect GNU ld simply results
5457# in the same bahaviour as before.
5458
Matthias Kloseb9621712010-04-24 17:59:49 +00005459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5460$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461ac_prog=ld
5462if test "$GCC" = yes; then
5463 ac_prog=`$CC -print-prog-name=ld`
5464fi
5465case `"$ac_prog" -V 2>&1 < /dev/null` in
5466 *GNU*)
5467 GNULD=yes;;
5468 *)
5469 GNULD=no;;
5470esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5472$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5475$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005476if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005477 $as_echo_n "(cached) " >&6
5478else
5479 ac_cv_c_inline=no
5480for ac_kw in inline __inline__ __inline; do
5481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5482/* end confdefs.h. */
5483#ifndef __cplusplus
5484typedef int foo_t;
5485static $ac_kw foo_t static_foo () {return 0; }
5486$ac_kw foo_t foo () {return 0; }
5487#endif
5488
5489_ACEOF
5490if ac_fn_c_try_compile "$LINENO"; then :
5491 ac_cv_c_inline=$ac_kw
5492fi
5493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5494 test "$ac_cv_c_inline" != no && break
5495done
5496
5497fi
5498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5499$as_echo "$ac_cv_c_inline" >&6; }
5500
5501case $ac_cv_c_inline in
5502 inline | yes) ;;
5503 *)
5504 case $ac_cv_c_inline in
5505 no) ac_val=;;
5506 *) ac_val=$ac_cv_c_inline;;
5507 esac
5508 cat >>confdefs.h <<_ACEOF
5509#ifndef __cplusplus
5510#define inline $ac_val
5511#endif
5512_ACEOF
5513 ;;
5514esac
5515
5516if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005517
5518$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005519
5520
5521fi
5522
5523
Matthias Kloseb9621712010-04-24 17:59:49 +00005524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5525$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005527if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528 enableval=$enable_shared;
5529fi
5530
5531
5532if test -z "$enable_shared"
5533then
5534 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005535 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536 enable_shared="yes";;
5537 *)
5538 enable_shared="no";;
5539 esac
5540fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5542$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543
Matthias Kloseb9621712010-04-24 17:59:49 +00005544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5545$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005547if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005548 enableval=$enable_profiling;
5549fi
5550
5551if test "x$enable_profiling" = xyes; then
5552 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005553 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555/* end confdefs.h. */
5556int main() { return 0; }
5557_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005558if ac_fn_c_try_link "$LINENO"; then :
5559
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005561 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005563rm -f core conftest.err conftest.$ac_objext \
5564 conftest$ac_exeext conftest.$ac_ext
5565 CC="$ac_save_cc"
5566else
5567 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005568fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5570$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005571
doko@ubuntu.comba015832012-06-30 16:52:05 +02005572if test "x$enable_profiling" = xyes; then
5573 BASECFLAGS="-pg $BASECFLAGS"
5574 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575fi
5576
Matthias Kloseb9621712010-04-24 17:59:49 +00005577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5578$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579
5580# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5581# library that we build, but we do not want to link against it (we
5582# will find it with a -framework option). For this reason there is an
5583# extra variable BLDLIBRARY against which Python and the extension
5584# modules are linked, BLDLIBRARY. This is normally the same as
5585# LDLIBRARY, but empty for MacOSX framework builds.
5586if test "$enable_framework"
5587then
5588 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5589 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5590 BLDLIBRARY=''
5591else
5592 BLDLIBRARY='$(LDLIBRARY)'
5593fi
5594
5595# Other platforms follow
5596if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005597 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598
Matthias Kloseb9621712010-04-24 17:59:49 +00005599$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005600
5601 case $ac_sys_system in
5602 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005603 LDLIBRARY='libpython$(LDVERSION).dll.a'
5604 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605 ;;
5606 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005607 LDLIBRARY='libpython$(LDVERSION).so'
5608 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5610 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005611 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005612 then
5613 PY3LIBRARY=libpython3.so
5614 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005615 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005616 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005617 LDLIBRARY='libpython$(LDVERSION).so'
5618 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5620 case $ac_sys_system in
5621 FreeBSD*)
5622 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5623 ;;
5624 esac
5625 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005626 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005627 then
5628 PY3LIBRARY=libpython3.so
5629 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 ;;
5631 hp*|HP*)
5632 case `uname -m` in
5633 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005634 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 ;;
5636 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005637 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 ;;
5639 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005640 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5642 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005644 LDLIBRARY='libpython$(LDVERSION).dylib'
5645 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5647 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005648 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005649 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005650 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5651 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652
5653 esac
5654else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005655 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656 case $ac_sys_system in
5657 CYGWIN*)
5658 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005659 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 ;;
5661 esac
5662fi
5663
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005664if test "$cross_compiling" = yes; then
5665 RUNSHARED=
5666fi
5667
Matthias Kloseb9621712010-04-24 17:59:49 +00005668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5669$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670
5671if test -n "$ac_tool_prefix"; then
5672 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5673set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5675$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005676if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005677 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678else
5679 if test -n "$RANLIB"; then
5680 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5681else
5682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5683for as_dir in $PATH
5684do
5685 IFS=$as_save_IFS
5686 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691 break 2
5692 fi
5693done
Matthias Kloseb9621712010-04-24 17:59:49 +00005694 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695IFS=$as_save_IFS
5696
5697fi
5698fi
5699RANLIB=$ac_cv_prog_RANLIB
5700if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5702$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703else
Matthias Kloseb9621712010-04-24 17:59:49 +00005704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5705$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706fi
5707
5708
5709fi
5710if test -z "$ac_cv_prog_RANLIB"; then
5711 ac_ct_RANLIB=$RANLIB
5712 # Extract the first word of "ranlib", so it can be a program name with args.
5713set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5715$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005716if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718else
5719 if test -n "$ac_ct_RANLIB"; then
5720 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5721else
5722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5723for as_dir in $PATH
5724do
5725 IFS=$as_save_IFS
5726 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731 break 2
5732 fi
5733done
Matthias Kloseb9621712010-04-24 17:59:49 +00005734 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735IFS=$as_save_IFS
5736
5737fi
5738fi
5739ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5740if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5742$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743else
Matthias Kloseb9621712010-04-24 17:59:49 +00005744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5745$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746fi
5747
5748 if test "x$ac_ct_RANLIB" = x; then
5749 RANLIB=":"
5750 else
5751 case $cross_compiling:$ac_tool_warned in
5752yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005753{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5754$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755ac_tool_warned=yes ;;
5756esac
5757 RANLIB=$ac_ct_RANLIB
5758 fi
5759else
5760 RANLIB="$ac_cv_prog_RANLIB"
5761fi
5762
5763
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005764if test -n "$ac_tool_prefix"; then
5765 for ac_prog in ar aal
5766 do
5767 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5768set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5770$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005771if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005772 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773else
5774 if test -n "$AR"; then
5775 ac_cv_prog_AR="$AR" # Let the user override the test.
5776else
5777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780 IFS=$as_save_IFS
5781 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005782 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005784 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786 break 2
5787 fi
5788done
Matthias Kloseb9621712010-04-24 17:59:49 +00005789 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790IFS=$as_save_IFS
5791
5792fi
5793fi
5794AR=$ac_cv_prog_AR
5795if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5797$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798else
Matthias Kloseb9621712010-04-24 17:59:49 +00005799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5800$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801fi
5802
5803
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005804 test -n "$AR" && break
5805 done
5806fi
5807if test -z "$AR"; then
5808 ac_ct_AR=$AR
5809 for ac_prog in ar aal
5810do
5811 # Extract the first word of "$ac_prog", so it can be a program name with args.
5812set dummy $ac_prog; ac_word=$2
5813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5814$as_echo_n "checking for $ac_word... " >&6; }
5815if ${ac_cv_prog_ac_ct_AR+:} false; then :
5816 $as_echo_n "(cached) " >&6
5817else
5818 if test -n "$ac_ct_AR"; then
5819 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5820else
5821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5822for as_dir in $PATH
5823do
5824 IFS=$as_save_IFS
5825 test -z "$as_dir" && as_dir=.
5826 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005828 ac_cv_prog_ac_ct_AR="$ac_prog"
5829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5830 break 2
5831 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005833 done
5834IFS=$as_save_IFS
5835
5836fi
5837fi
5838ac_ct_AR=$ac_cv_prog_ac_ct_AR
5839if test -n "$ac_ct_AR"; then
5840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5841$as_echo "$ac_ct_AR" >&6; }
5842else
5843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5844$as_echo "no" >&6; }
5845fi
5846
5847
5848 test -n "$ac_ct_AR" && break
5849done
5850
5851 if test "x$ac_ct_AR" = x; then
5852 AR="ar"
5853 else
5854 case $cross_compiling:$ac_tool_warned in
5855yes:)
5856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5858ac_tool_warned=yes ;;
5859esac
5860 AR=$ac_ct_AR
5861 fi
5862fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863
5864
5865# tweak ARFLAGS only if the user didn't set it on the command line
5866
5867if test -z "$ARFLAGS"
5868then
5869 ARFLAGS="rc"
5870fi
5871
doko@ubuntu.com58844492012-06-30 18:25:32 +02005872if test -n "$ac_tool_prefix"; then
5873 for ac_prog in readelf
5874 do
5875 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5876set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5878$as_echo_n "checking for $ac_word... " >&6; }
5879if ${ac_cv_prog_READELF+:} false; then :
5880 $as_echo_n "(cached) " >&6
5881else
5882 if test -n "$READELF"; then
5883 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5884else
5885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5886for as_dir in $PATH
5887do
5888 IFS=$as_save_IFS
5889 test -z "$as_dir" && as_dir=.
5890 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005892 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5894 break 2
5895 fi
5896done
5897 done
5898IFS=$as_save_IFS
5899
5900fi
5901fi
5902READELF=$ac_cv_prog_READELF
5903if test -n "$READELF"; then
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5905$as_echo "$READELF" >&6; }
5906else
5907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5908$as_echo "no" >&6; }
5909fi
5910
5911
5912 test -n "$READELF" && break
5913 done
5914fi
5915if test -z "$READELF"; then
5916 ac_ct_READELF=$READELF
5917 for ac_prog in readelf
5918do
5919 # Extract the first word of "$ac_prog", so it can be a program name with args.
5920set dummy $ac_prog; ac_word=$2
5921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5922$as_echo_n "checking for $ac_word... " >&6; }
5923if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5924 $as_echo_n "(cached) " >&6
5925else
5926 if test -n "$ac_ct_READELF"; then
5927 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5928else
5929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5930for as_dir in $PATH
5931do
5932 IFS=$as_save_IFS
5933 test -z "$as_dir" && as_dir=.
5934 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005936 ac_cv_prog_ac_ct_READELF="$ac_prog"
5937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5938 break 2
5939 fi
5940done
5941 done
5942IFS=$as_save_IFS
5943
5944fi
5945fi
5946ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5947if test -n "$ac_ct_READELF"; then
5948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5949$as_echo "$ac_ct_READELF" >&6; }
5950else
5951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5952$as_echo "no" >&6; }
5953fi
5954
5955
5956 test -n "$ac_ct_READELF" && break
5957done
5958
5959 if test "x$ac_ct_READELF" = x; then
5960 READELF=":"
5961 else
5962 case $cross_compiling:$ac_tool_warned in
5963yes:)
5964{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5965$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5966ac_tool_warned=yes ;;
5967esac
5968 READELF=$ac_ct_READELF
5969 fi
5970fi
5971
5972if test "$cross_compiling" = yes; then
5973 case "$READELF" in
5974 readelf|:)
5975 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5976 ;;
5977 esac
5978fi
5979
5980
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981
Matthias Klosec4c48422012-10-21 23:05:35 +02005982for ac_prog in python$PACKAGE_VERSION python3 python
5983do
5984 # Extract the first word of "$ac_prog", so it can be a program name with args.
5985set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005988if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005989 $as_echo_n "(cached) " >&6
5990else
Matthias Klosec4c48422012-10-21 23:05:35 +02005991 if test -n "$PYTHON"; then
5992 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005993else
5994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997 IFS=$as_save_IFS
5998 test -z "$as_dir" && as_dir=.
5999 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006001 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6003 break 2
6004 fi
6005done
6006 done
6007IFS=$as_save_IFS
6008
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006009fi
6010fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006011PYTHON=$ac_cv_prog_PYTHON
6012if test -n "$PYTHON"; then
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6014$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006015else
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
6018fi
6019
6020
Matthias Klosec4c48422012-10-21 23:05:35 +02006021 test -n "$PYTHON" && break
6022done
6023test -n "$PYTHON" || PYTHON="not-found"
6024
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006025if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006026 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6027else
6028 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006029fi
6030
6031
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032case $MACHDEP in
6033bsdos*|hp*|HP*)
6034 # install -d does not work on BSDI or HP-UX
6035 if test -z "$INSTALL"
6036 then
6037 INSTALL="${srcdir}/install-sh -c"
6038 fi
6039esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040# Find a good install program. We prefer a C program (faster),
6041# so one script is as good as another. But avoid the broken or
6042# incompatible versions:
6043# SysV /etc/install, /usr/sbin/install
6044# SunOS /usr/etc/install
6045# IRIX /sbin/install
6046# AIX /bin/install
6047# AmigaOS /C/install, which installs bootblocks on floppy discs
6048# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6049# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6050# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6051# OS/2's system install, which has a completely different semantic
6052# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006053# Reject install programs that cannot install multiple files.
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6055$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006057if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006058 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059else
6060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061for as_dir in $PATH
6062do
6063 IFS=$as_save_IFS
6064 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 # Account for people who put trailing slashes in PATH elements.
6066case $as_dir/ in #((
6067 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070 /usr/ucb/* ) ;;
6071 *)
6072 # OSF1 and SCO ODT 3.0 have their own names for install.
6073 # Don't use installbsd from OSF since it installs stuff as root
6074 # by default.
6075 for ac_prog in ginstall scoinst install; do
6076 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006077 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078 if test $ac_prog = install &&
6079 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6080 # AIX install. It has an incompatible calling convention.
6081 :
6082 elif test $ac_prog = install &&
6083 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6084 # program-specific install script used by HP pwplus--don't use.
6085 :
6086 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 rm -rf conftest.one conftest.two conftest.dir
6088 echo one > conftest.one
6089 echo two > conftest.two
6090 mkdir conftest.dir
6091 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6092 test -s conftest.one && test -s conftest.two &&
6093 test -s conftest.dir/conftest.one &&
6094 test -s conftest.dir/conftest.two
6095 then
6096 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6097 break 3
6098 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099 fi
6100 fi
6101 done
6102 done
6103 ;;
6104esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006105
6106 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006107IFS=$as_save_IFS
6108
Matthias Kloseb9621712010-04-24 17:59:49 +00006109rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110
6111fi
6112 if test "${ac_cv_path_install+set}" = set; then
6113 INSTALL=$ac_cv_path_install
6114 else
6115 # As a last resort, use the slow shell script. Don't cache a
6116 # value for INSTALL within a source directory, because that will
6117 # break other packages using the cache if that directory is
6118 # removed, or if the value is a relative name.
6119 INSTALL=$ac_install_sh
6120 fi
6121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6123$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124
6125# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6126# It thinks the first close brace ends the variable substitution.
6127test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6128
6129test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6130
6131test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6132
Matthias Klose93a0ef12012-03-15 18:08:34 +01006133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6134$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6135if test -z "$MKDIR_P"; then
6136 if ${ac_cv_path_mkdir+:} false; then :
6137 $as_echo_n "(cached) " >&6
6138else
6139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6141do
6142 IFS=$as_save_IFS
6143 test -z "$as_dir" && as_dir=.
6144 for ac_prog in mkdir gmkdir; do
6145 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006146 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006147 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6148 'mkdir (GNU coreutils) '* | \
6149 'mkdir (coreutils) '* | \
6150 'mkdir (fileutils) '4.1*)
6151 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6152 break 3;;
6153 esac
6154 done
6155 done
6156 done
6157IFS=$as_save_IFS
6158
6159fi
6160
6161 test -d ./--version && rmdir ./--version
6162 if test "${ac_cv_path_mkdir+set}" = set; then
6163 MKDIR_P="$ac_cv_path_mkdir -p"
6164 else
6165 # As a last resort, use the slow shell script. Don't cache a
6166 # value for MKDIR_P within a source directory, because that will
6167 # break other packages using the cache if that directory is
6168 # removed, or if the value is a relative name.
6169 MKDIR_P="$ac_install_sh -d"
6170 fi
6171fi
6172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6173$as_echo "$MKDIR_P" >&6; }
6174
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175
6176# Not every filesystem supports hard links
6177
6178if test -z "$LN" ; then
6179 case $ac_sys_system in
6180 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181 *) LN=ln;;
6182 esac
6183fi
6184
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006185# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006186
6187ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006188
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006189# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6191$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192
6193# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006194if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195 withval=$with_pydebug;
6196if test "$withval" != no
6197then
6198
Matthias Kloseb9621712010-04-24 17:59:49 +00006199$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6202$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006204 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006205else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6206$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207fi
6208else
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6210$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211fi
6212
6213
6214# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6215# merged with this chunk of code?
6216
6217# Optimizer/debugger flags
6218# ------------------------
6219# (The following bit of code is complicated enough - please keep things
6220# indented properly. Just pretend you're editing Python code. ;-)
6221
6222# There are two parallel sets of case statements below, one that checks to
6223# see if OPT was set and one that does BASECFLAGS setting based upon
6224# compiler and platform. BASECFLAGS tweaks need to be made even if the
6225# user set OPT.
6226
6227# tweak OPT based on compiler and platform, only if the user didn't set
6228# it on the command line
6229
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006230if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231then
6232 case $GCC in
6233 yes)
6234 if test "$CC" != 'g++' ; then
6235 STRICT_PROTO="-Wstrict-prototypes"
6236 fi
6237 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6238 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6239 WRAP="-fwrapv"
6240 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006241
6242 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006243 case $CC in
6244 *clang*) WRAP="-fwrapv"
6245 ;;
6246 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006247
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006248 case $ac_cv_prog_cc_g in
6249 yes)
6250 if test "$Py_DEBUG" = 'true' ; then
6251 # Optimization messes up debuggers, so turn it off for
6252 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006253 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006254 else
6255 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6256 fi
6257 ;;
6258 *)
6259 OPT="-O3 -Wall $STRICT_PROTO"
6260 ;;
6261 esac
6262 case $ac_sys_system in
6263 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6264 ;;
6265 esac
6266 ;;
6267
6268 *)
6269 OPT="-O"
6270 ;;
6271 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006272fi
6273
6274
6275
6276# The -arch flags for universal builds on OSX
6277UNIVERSAL_ARCH_FLAGS=
6278
6279
6280# tweak BASECFLAGS based on compiler and platform
6281case $GCC in
6282yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006283 # Python doesn't violate C99 aliasing rules, but older versions of
6284 # GCC produce warnings for legal Python code. Enable
6285 # -fno-strict-aliasing on versions of GCC that support but produce
6286 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6288$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289 ac_save_cc="$CC"
6290 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006291 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006292 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006293 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006294else
Matthias Kloseb9621712010-04-24 17:59:49 +00006295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006297
Matthias Kloseb159a552010-04-25 21:00:44 +00006298
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006299int
6300main ()
6301{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006302
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006303 ;
6304 return 0;
6305}
Matthias Kloseb159a552010-04-25 21:00:44 +00006306
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006308if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006309
6310 CC="$ac_save_cc -fstrict-aliasing"
6311 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006313/* end confdefs.h. */
6314
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006315 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006316int
6317main ()
6318{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006319double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006320 ;
6321 return 0;
6322}
Matthias Kloseb159a552010-04-25 21:00:44 +00006323
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006325if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006326
6327 ac_cv_no_strict_aliasing=no
6328
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329else
Matthias Kloseb159a552010-04-25 21:00:44 +00006330
6331 ac_cv_no_strict_aliasing=yes
6332
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006333fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006335
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006336else
Matthias Kloseb159a552010-04-25 21:00:44 +00006337
6338 ac_cv_no_strict_aliasing=no
6339
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006342fi
6343
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006344 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6347$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006348 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006349 then
6350 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6351 fi
6352
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6354$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6355 ac_save_cc="$CC"
6356 CC="$CC -Wunused-result -Werror"
6357 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006358 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006359 $as_echo_n "(cached) " >&6
6360else
6361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6362/* end confdefs.h. */
6363
6364
6365int
6366main ()
6367{
6368
6369 ;
6370 return 0;
6371}
6372
6373_ACEOF
6374if ac_fn_c_try_compile "$LINENO"; then :
6375
6376 ac_cv_disable_unused_result_warning=yes
6377
6378else
6379
6380 ac_cv_disable_unused_result_warning=no
6381
6382fi
6383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6384fi
6385
6386 CFLAGS="$save_CFLAGS"
6387 CC="$ac_save_cc"
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6389$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6390
6391 if test $ac_cv_disable_unused_result_warning = yes
6392 then
6393 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6394 fi
6395
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6397$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6398 ac_save_cc="$CC"
6399 CC="$CC -Werror=declaration-after-statement"
6400 save_CFLAGS="$CFLAGS"
6401 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6402 $as_echo_n "(cached) " >&6
6403else
6404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6405/* end confdefs.h. */
6406
6407
6408int
6409main ()
6410{
6411
6412 ;
6413 return 0;
6414}
6415
6416_ACEOF
6417if ac_fn_c_try_compile "$LINENO"; then :
6418
6419 ac_cv_declaration_after_statement_warning=yes
6420
6421else
6422
6423 ac_cv_declaration_after_statement_warning=no
6424
6425fi
6426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6427fi
6428
6429 CFLAGS="$save_CFLAGS"
6430 CC="$ac_save_cc"
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6432$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6433
6434 if test $ac_cv_declaration_after_statement_warning = yes
6435 then
6436 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6437 fi
6438
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006439 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6440 # support. Without this, treatment of subnormals doesn't follow
6441 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006442 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006443 alpha*)
6444 BASECFLAGS="$BASECFLAGS -mieee"
6445 ;;
6446 esac
6447
6448 case $ac_sys_system in
6449 SCO_SV*)
6450 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6451 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006452
6453 # is there any other compiler on Darwin besides gcc?
6454 Darwin*)
6455 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6456 # used to be here, but non-Apple gcc doesn't accept them.
6457 if test "${CC}" = gcc
6458 then
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006460$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006461 case "${UNIVERSALSDK}" in
6462 */MacOSX10.4u.sdk)
6463 # Build using 10.4 SDK, force usage of gcc when the
6464 # compiler is gcc, otherwise the user will get very
6465 # confusing error messages when building on OSX 10.6
6466 CC=gcc-4.0
6467 CPP=cpp-4.0
6468 ;;
6469 esac
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006471$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006472 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006473
Ned Deily87adb6e2013-10-18 21:09:56 -07006474 if test "${enable_universalsdk}"
6475 then
6476 case "$UNIVERSAL_ARCHS" in
6477 32-bit)
6478 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6479 LIPO_32BIT_FLAGS=""
6480 ARCH_RUN_32BIT=""
6481 ;;
6482 64-bit)
6483 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6484 LIPO_32BIT_FLAGS=""
6485 ARCH_RUN_32BIT="true"
6486 ;;
6487 all)
6488 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6489 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6490 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6491 ;;
6492 intel)
6493 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6494 LIPO_32BIT_FLAGS="-extract i386"
6495 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6496 ;;
6497 intel-32)
6498 UNIVERSAL_ARCH_FLAGS="-arch i386"
6499 LIPO_32BIT_FLAGS=""
6500 ARCH_RUN_32BIT=""
6501 ;;
6502 3-way)
6503 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6504 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6505 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6506 ;;
6507 *)
6508 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6509 ;;
6510 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511
Ned Deily87adb6e2013-10-18 21:09:56 -07006512 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6513 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6514 if test "${UNIVERSALSDK}" != "/"
6515 then
6516 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6517 fi
6518 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006519
Ned Deily87adb6e2013-10-18 21:09:56 -07006520 # Calculate an appropriate deployment target for this build:
6521 # The deployment target value is used explicitly to enable certain
6522 # features are enabled (such as builtin libedit support for readline)
6523 # through the use of Apple's Availabiliy Macros and is used as a
6524 # component of the string returned by distutils.get_platform().
6525 #
6526 # Use the value from:
6527 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6528 # 2. the operating system version of the build machine if >= 10.6
6529 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6530 # below to pick either 10.3, 10.4, or 10.5 as the target.
6531 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532
Ned Deily87adb6e2013-10-18 21:09:56 -07006533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6534$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
6535 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6536 if test ${cur_target} '>' 10.2 && \
6537 test ${cur_target} '<' 10.6
6538 then
6539 cur_target=10.3
6540 if test ${enable_universalsdk}
6541 then
6542 case "$UNIVERSAL_ARCHS" in
6543 all|3-way|intel|64-bit)
6544 # These configurations were first supported in 10.5
6545 cur_target='10.5'
6546 ;;
6547 esac
6548 else
6549 if test `/usr/bin/arch` = "i386"
6550 then
6551 # 10.4 was the first release to support Intel archs
6552 cur_target="10.4"
6553 fi
6554 fi
6555 fi
6556 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006557
Ned Deily87adb6e2013-10-18 21:09:56 -07006558 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6559 # environment with a value that is the same as what we'll use
6560 # in the Makefile to ensure that we'll get the same compiler
6561 # environment during configure and build time.
6562 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6563 export MACOSX_DEPLOYMENT_TARGET
6564 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6566$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006567
Ned Deily87adb6e2013-10-18 21:09:56 -07006568 # end of Darwin* tests
6569 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006570 esac
6571 ;;
6572
6573*)
6574 case $ac_sys_system in
6575 OpenUNIX*|UnixWare*)
6576 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6577 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006578 SCO_SV*)
6579 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6580 ;;
6581 esac
6582 ;;
6583esac
6584
6585if test "$Py_DEBUG" = 'true'; then
6586 :
6587else
6588 OPT="-DNDEBUG $OPT"
6589fi
6590
6591if test "$ac_arch_flags"
6592then
6593 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6594fi
6595
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006596# On some compilers, pthreads are available without further options
6597# (e.g. MacOS X). On some of these systems, the compiler will not
6598# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6599# So we have to see first whether pthreads are available without
6600# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6602$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006603if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006604 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605else
Matthias Kloseb9621712010-04-24 17:59:49 +00006606 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006607 ac_cv_pthread_is_default=no
6608else
Matthias Kloseb9621712010-04-24 17:59:49 +00006609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610/* end confdefs.h. */
6611
Stefan Krah7dba5942012-11-22 22:49:11 +01006612#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006613#include <pthread.h>
6614
6615void* routine(void* p){return NULL;}
6616
6617int main(){
6618 pthread_t p;
6619 if(pthread_create(&p,NULL,routine,NULL)!=0)
6620 return 1;
6621 (void)pthread_detach(p);
6622 return 0;
6623}
6624
6625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006626if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006627
6628 ac_cv_pthread_is_default=yes
6629 ac_cv_kthread=no
6630 ac_cv_pthread=no
6631
6632else
Matthias Kloseb9621712010-04-24 17:59:49 +00006633 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006637fi
6638
6639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640fi
6641
Matthias Kloseb9621712010-04-24 17:59:49 +00006642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6643$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644
6645
6646if test $ac_cv_pthread_is_default = yes
6647then
6648 ac_cv_kpthread=no
6649else
6650# -Kpthread, if available, provides the right #defines
6651# and linker options to make pthread_create available
6652# Some compilers won't report that they do not support -Kpthread,
6653# so we need to run a program to see whether it really made the
6654# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6656$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006657if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006658 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006659else
6660 ac_save_cc="$CC"
6661CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006662if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006663 ac_cv_kpthread=no
6664else
Matthias Kloseb9621712010-04-24 17:59:49 +00006665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006666/* end confdefs.h. */
6667
Stefan Krah7dba5942012-11-22 22:49:11 +01006668#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006669#include <pthread.h>
6670
6671void* routine(void* p){return NULL;}
6672
6673int main(){
6674 pthread_t p;
6675 if(pthread_create(&p,NULL,routine,NULL)!=0)
6676 return 1;
6677 (void)pthread_detach(p);
6678 return 0;
6679}
6680
6681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006682if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683 ac_cv_kpthread=yes
6684else
Matthias Kloseb9621712010-04-24 17:59:49 +00006685 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006689fi
6690
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691CC="$ac_save_cc"
6692fi
6693
Matthias Kloseb9621712010-04-24 17:59:49 +00006694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6695$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696fi
6697
6698if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6699then
6700# -Kthread, if available, provides the right #defines
6701# and linker options to make pthread_create available
6702# Some compilers won't report that they do not support -Kthread,
6703# so we need to run a program to see whether it really made the
6704# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6706$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006707if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006708 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709else
6710 ac_save_cc="$CC"
6711CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006712if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713 ac_cv_kthread=no
6714else
Matthias Kloseb9621712010-04-24 17:59:49 +00006715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716/* end confdefs.h. */
6717
Stefan Krah7dba5942012-11-22 22:49:11 +01006718#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006719#include <pthread.h>
6720
6721void* routine(void* p){return NULL;}
6722
6723int main(){
6724 pthread_t p;
6725 if(pthread_create(&p,NULL,routine,NULL)!=0)
6726 return 1;
6727 (void)pthread_detach(p);
6728 return 0;
6729}
6730
6731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006732if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733 ac_cv_kthread=yes
6734else
Matthias Kloseb9621712010-04-24 17:59:49 +00006735 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6738 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739fi
6740
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741CC="$ac_save_cc"
6742fi
6743
Matthias Kloseb9621712010-04-24 17:59:49 +00006744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6745$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746fi
6747
6748if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6749then
6750# -pthread, if available, provides the right #defines
6751# and linker options to make pthread_create available
6752# Some compilers won't report that they do not support -pthread,
6753# so we need to run a program to see whether it really made the
6754# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6756$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006757if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006758 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006759else
6760 ac_save_cc="$CC"
6761CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006762if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763 ac_cv_pthread=no
6764else
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006766/* end confdefs.h. */
6767
Stefan Krah7dba5942012-11-22 22:49:11 +01006768#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769#include <pthread.h>
6770
6771void* routine(void* p){return NULL;}
6772
6773int main(){
6774 pthread_t p;
6775 if(pthread_create(&p,NULL,routine,NULL)!=0)
6776 return 1;
6777 (void)pthread_detach(p);
6778 return 0;
6779}
6780
6781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006782if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783 ac_cv_pthread=yes
6784else
Matthias Kloseb9621712010-04-24 17:59:49 +00006785 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6788 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006789fi
6790
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006791CC="$ac_save_cc"
6792fi
6793
Matthias Kloseb9621712010-04-24 17:59:49 +00006794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6795$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796fi
6797
6798# If we have set a CC compiler flag for thread support then
6799# check if it works for CXX, too.
6800ac_cv_cxx_thread=no
6801if test ! -z "$CXX"
6802then
Matthias Kloseb9621712010-04-24 17:59:49 +00006803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6804$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006805ac_save_cxx="$CXX"
6806
6807if test "$ac_cv_kpthread" = "yes"
6808then
6809 CXX="$CXX -Kpthread"
6810 ac_cv_cxx_thread=yes
6811elif test "$ac_cv_kthread" = "yes"
6812then
6813 CXX="$CXX -Kthread"
6814 ac_cv_cxx_thread=yes
6815elif test "$ac_cv_pthread" = "yes"
6816then
6817 CXX="$CXX -pthread"
6818 ac_cv_cxx_thread=yes
6819fi
6820
6821if test $ac_cv_cxx_thread = yes
6822then
6823 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6824 $CXX -c conftest.$ac_ext 2>&5
6825 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6826 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6827 then
6828 ac_cv_cxx_thread=yes
6829 else
6830 ac_cv_cxx_thread=no
6831 fi
6832 rm -fr conftest*
6833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6835$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836fi
6837CXX="$ac_save_cxx"
6838
6839
6840# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6842$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006843if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006844 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845else
Matthias Kloseb9621712010-04-24 17:59:49 +00006846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006847/* end confdefs.h. */
6848#include <stdlib.h>
6849#include <stdarg.h>
6850#include <string.h>
6851#include <float.h>
6852
6853int
6854main ()
6855{
6856
6857 ;
6858 return 0;
6859}
6860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006861if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862 ac_cv_header_stdc=yes
6863else
Matthias Kloseb9621712010-04-24 17:59:49 +00006864 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006865fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6867
6868if test $ac_cv_header_stdc = yes; then
6869 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871/* end confdefs.h. */
6872#include <string.h>
6873
6874_ACEOF
6875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006876 $EGREP "memchr" >/dev/null 2>&1; then :
6877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878else
6879 ac_cv_header_stdc=no
6880fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006881rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882
6883fi
6884
6885if test $ac_cv_header_stdc = yes; then
6886 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888/* end confdefs.h. */
6889#include <stdlib.h>
6890
6891_ACEOF
6892if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006893 $EGREP "free" >/dev/null 2>&1; then :
6894
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895else
6896 ac_cv_header_stdc=no
6897fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006898rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899
6900fi
6901
6902if test $ac_cv_header_stdc = yes; then
6903 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006904 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905 :
6906else
Matthias Kloseb9621712010-04-24 17:59:49 +00006907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908/* end confdefs.h. */
6909#include <ctype.h>
6910#include <stdlib.h>
6911#if ((' ' & 0x0FF) == 0x020)
6912# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6913# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6914#else
6915# define ISLOWER(c) \
6916 (('a' <= (c) && (c) <= 'i') \
6917 || ('j' <= (c) && (c) <= 'r') \
6918 || ('s' <= (c) && (c) <= 'z'))
6919# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6920#endif
6921
6922#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6923int
6924main ()
6925{
6926 int i;
6927 for (i = 0; i < 256; i++)
6928 if (XOR (islower (i), ISLOWER (i))
6929 || toupper (i) != TOUPPER (i))
6930 return 2;
6931 return 0;
6932}
6933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006934if ac_fn_c_try_run "$LINENO"; then :
6935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936else
Matthias Kloseb9621712010-04-24 17:59:49 +00006937 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6940 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006941fi
6942
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006943fi
6944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6946$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006947if test $ac_cv_header_stdc = yes; then
6948
Matthias Kloseb9621712010-04-24 17:59:49 +00006949$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006950
6951fi
6952
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006953ac_save_cppflags="$CPPFLAGS"
6954CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006955for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006956fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006957ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006958sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006959unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006960poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006961sys/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 +01006962sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006963sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006964sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006965sys/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 -07006966libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01006967bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
6968sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006969do :
6970 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6971ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006972if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006973 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006974#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006975_ACEOF
6976
6977fi
6978
Guido van Rossum627b2d71993-12-24 10:39:16 +00006979done
6980
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006981CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006982ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006983for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006984 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6986$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006987if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006989else
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006991/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006992#include <sys/types.h>
6993#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006994
Martin v. Löwis11437992002-04-12 09:54:03 +00006995int
6996main ()
6997{
6998if ((DIR *) 0)
6999return 0;
7000 ;
7001 return 0;
7002}
7003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007004if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007005 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007006else
Matthias Kloseb9621712010-04-24 17:59:49 +00007007 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007011eval ac_res=\$$as_ac_Header
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7013$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007014if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007016#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007017_ACEOF
7018
7019ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007020fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007022done
7023# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7024if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7026$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007027if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007028 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029else
Martin v. Löwis11437992002-04-12 09:54:03 +00007030 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007034/* Override any GCC internal prototype to avoid an error.
7035 Use char because int might match the return type of a GCC
7036 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007037#ifdef __cplusplus
7038extern "C"
7039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007040char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007041int
7042main ()
7043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007045 ;
7046 return 0;
7047}
7048_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049for ac_lib in '' dir; do
7050 if test -z "$ac_lib"; then
7051 ac_res="none required"
7052 else
7053 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007054 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007059rm -f core conftest.err conftest.$ac_objext \
7060 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007061 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007062 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007064done
Victor Stinnere0be4232011-10-25 13:06:09 +02007065if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007067else
7068 ac_cv_search_opendir=no
7069fi
7070rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007071LIBS=$ac_func_search_save_LIBS
7072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7074$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007075ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007076if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007079fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007080
Michael W. Hudson54241132001-12-07 15:38:26 +00007081else
Matthias Kloseb9621712010-04-24 17:59:49 +00007082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7083$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007084if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007085 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007086else
7087 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007091/* Override any GCC internal prototype to avoid an error.
7092 Use char because int might match the return type of a GCC
7093 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007094#ifdef __cplusplus
7095extern "C"
7096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007097char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007098int
7099main ()
7100{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007102 ;
7103 return 0;
7104}
7105_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007106for ac_lib in '' x; do
7107 if test -z "$ac_lib"; then
7108 ac_res="none required"
7109 else
7110 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007111 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007114 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007116rm -f core conftest.err conftest.$ac_objext \
7117 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007118 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007119 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007121done
Victor Stinnere0be4232011-10-25 13:06:09 +02007122if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007124else
7125 ac_cv_search_opendir=no
7126fi
7127rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007128LIBS=$ac_func_search_save_LIBS
7129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7131$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007132ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007133if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007134 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007136fi
7137
7138fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007139
Matthias Kloseb9621712010-04-24 17:59:49 +00007140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7141$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007142if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007143 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007144else
Matthias Kloseb9621712010-04-24 17:59:49 +00007145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007146/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007147#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007148int
7149main ()
7150{
7151return makedev(0, 0);
7152 ;
7153 return 0;
7154}
7155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007156if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007157 ac_cv_header_sys_types_h_makedev=yes
7158else
Matthias Kloseb9621712010-04-24 17:59:49 +00007159 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007161rm -f core conftest.err conftest.$ac_objext \
7162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007163
7164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7166$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007167
7168if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007169ac_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 +02007170if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007171
Matthias Kloseb9621712010-04-24 17:59:49 +00007172$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007173
7174fi
7175
7176
7177
7178 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007179 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 +02007180if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007181
Matthias Kloseb9621712010-04-24 17:59:49 +00007182$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007183
7184fi
7185
7186
7187 fi
7188fi
7189
Michael W. Hudson54241132001-12-07 15:38:26 +00007190
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007191# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7192for ac_header in net/if.h
7193do :
7194 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7195#ifdef STDC_HEADERS
7196# include <stdlib.h>
7197# include <stddef.h>
7198#else
7199# ifdef HAVE_STDLIB_H
7200# include <stdlib.h>
7201# endif
7202#endif
7203#ifdef HAVE_SYS_SOCKET_H
7204# include <sys/socket.h>
7205#endif
7206
7207"
Victor Stinnere0be4232011-10-25 13:06:09 +02007208if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007209 cat >>confdefs.h <<_ACEOF
7210#define HAVE_NET_IF_H 1
7211_ACEOF
7212
7213fi
7214
7215done
7216
7217
7218
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007219# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007220for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007221do :
7222 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007223#ifdef HAVE_CURSES_H
7224#include <curses.h>
7225#endif
7226
Matthias Kloseb9621712010-04-24 17:59:49 +00007227"
Victor Stinnere0be4232011-10-25 13:06:09 +02007228if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007229 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007230#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007231_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007232
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007233fi
7234
7235done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007236
7237
Martin v. Löwis11017b12006-01-14 18:12:57 +00007238# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007239for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007240do :
7241 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 +00007242#ifdef HAVE_ASM_TYPES_H
7243#include <asm/types.h>
7244#endif
7245#ifdef HAVE_SYS_SOCKET_H
7246#include <sys/socket.h>
7247#endif
7248
Matthias Kloseb9621712010-04-24 17:59:49 +00007249"
Victor Stinnere0be4232011-10-25 13:06:09 +02007250if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007251 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007252#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007253_ACEOF
7254
7255fi
7256
7257done
7258
7259
Charles-François Natali47413c12011-10-06 19:47:44 +02007260# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007261for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007262do :
7263 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7264ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7265#ifdef HAVE_SYS_SOCKET_H
7266#include <sys/socket.h>
7267#endif
7268
7269"
7270if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7271 cat >>confdefs.h <<_ACEOF
7272#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7273_ACEOF
7274
7275fi
7276
7277done
7278
7279
Guido van Rossum627b2d71993-12-24 10:39:16 +00007280# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007281was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7283$as_echo_n "checking for clock_t in time.h... " >&6; }
7284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007285/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007286#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007287
7288_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007289if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007290 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007291 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007292else
Martin v. Löwis11437992002-04-12 09:54:03 +00007293
7294
Matthias Kloseb9621712010-04-24 17:59:49 +00007295$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007296
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007297
Guido van Rossum627b2d71993-12-24 10:39:16 +00007298fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007299rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007300
Matthias Kloseb9621712010-04-24 17:59:49 +00007301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7302$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007303
Matthias Kloseb9621712010-04-24 17:59:49 +00007304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7305$as_echo_n "checking for makedev... " >&6; }
7306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007307/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007308
Jesus Cea740f53a2010-04-28 11:35:30 +00007309#if defined(MAJOR_IN_MKDEV)
7310#include <sys/mkdev.h>
7311#elif defined(MAJOR_IN_SYSMACROS)
7312#include <sys/sysmacros.h>
7313#else
7314#include <sys/types.h>
7315#endif
7316
Neal Norwitz11690112002-07-30 01:08:28 +00007317int
7318main ()
7319{
Jesus Cea740f53a2010-04-28 11:35:30 +00007320
7321 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007322 ;
7323 return 0;
7324}
Matthias Kloseb159a552010-04-25 21:00:44 +00007325
Neal Norwitz11690112002-07-30 01:08:28 +00007326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007327if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007328 ac_cv_has_makedev=yes
7329else
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007332rm -f core conftest.err conftest.$ac_objext \
7333 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7335$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007336if test "$ac_cv_has_makedev" = "yes"; then
7337
Matthias Kloseb9621712010-04-24 17:59:49 +00007338$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007339
7340fi
7341
Christian Heimes985ecdc2013-11-20 11:46:18 +01007342# byte swapping
7343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7344$as_echo_n "checking for le64toh... " >&6; }
7345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7346/* end confdefs.h. */
7347
7348#ifdef HAVE_ENDIAN_H
7349#include <endian.h>
7350#elif defined(HAVE_SYS_ENDIAN_H)
7351#include <sys/endian.h>
7352#endif
7353
7354int
7355main ()
7356{
7357
7358 le64toh(1)
7359 ;
7360 return 0;
7361}
7362
7363_ACEOF
7364if ac_fn_c_try_link "$LINENO"; then :
7365 ac_cv_has_le64toh=yes
7366else
7367 ac_cv_has_le64toh=no
7368fi
7369rm -f core conftest.err conftest.$ac_objext \
7370 conftest$ac_exeext conftest.$ac_ext
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7372$as_echo "$ac_cv_has_le64toh" >&6; }
7373if test "$ac_cv_has_le64toh" = "yes"; then
7374
7375$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7376
7377fi
7378
Martin v. Löwis399a6892002-10-04 10:22:02 +00007379# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7380# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7381# defined, but the compiler does not support pragma redefine_extname,
7382# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7383# structures (such as rlimit64) without declaring them. As a
7384# work-around, disable LFS on such configurations
7385
7386use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7388$as_echo_n "checking Solaris LFS bug... " >&6; }
7389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007390/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007391
7392#define _LARGEFILE_SOURCE 1
7393#define _FILE_OFFSET_BITS 64
7394#include <sys/resource.h>
7395
Martin v. Löwis399a6892002-10-04 10:22:02 +00007396int
7397main ()
7398{
7399struct rlimit foo;
7400 ;
7401 return 0;
7402}
7403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007405 sol_lfs_bug=no
7406else
Matthias Kloseb9621712010-04-24 17:59:49 +00007407 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7411$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007412if test "$sol_lfs_bug" = "yes"; then
7413 use_lfs=no
7414fi
7415
7416if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007417# Two defines needed to enable largefile support on various platforms
7418# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007419case $ac_sys_system/$ac_sys_release in
7420AIX*)
7421
7422$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7423
7424 ;;
7425esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007426
Matthias Kloseb9621712010-04-24 17:59:49 +00007427$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007428
7429
Matthias Kloseb9621712010-04-24 17:59:49 +00007430$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007431
Martin v. Löwis399a6892002-10-04 10:22:02 +00007432fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007433
Guido van Rossum84e7b241996-08-19 21:59:00 +00007434# Add some code to confdefs.h so that the test for off_t works on SCO
7435cat >> confdefs.h <<\EOF
7436#if defined(SCO_DS)
7437#undef _OFF_T
7438#endif
7439EOF
7440
Guido van Rossumef2255b2000-03-10 22:30:29 +00007441# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007442ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007443if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007444
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007445else
Martin v. Löwis11437992002-04-12 09:54:03 +00007446
7447cat >>confdefs.h <<_ACEOF
7448#define mode_t int
7449_ACEOF
7450
7451fi
7452
Matthias Kloseb9621712010-04-24 17:59:49 +00007453ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007454if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007455
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007456else
Martin v. Löwis11437992002-04-12 09:54:03 +00007457
7458cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007459#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007460_ACEOF
7461
7462fi
7463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007465if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007466
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007467else
Martin v. Löwis11437992002-04-12 09:54:03 +00007468
7469cat >>confdefs.h <<_ACEOF
7470#define pid_t int
7471_ACEOF
7472
7473fi
7474
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007475
Martin v. Löwis11437992002-04-12 09:54:03 +00007476cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007477#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007478_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007479
Matthias Kloseb9621712010-04-24 17:59:49 +00007480ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007481if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007482
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007483else
Martin v. Löwis11437992002-04-12 09:54:03 +00007484
7485cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007486#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007487_ACEOF
7488
7489fi
7490
Matthias Kloseb9621712010-04-24 17:59:49 +00007491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7492$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007493if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007495else
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007497/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007498#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007499
7500_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007502 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007503 ac_cv_type_uid_t=yes
7504else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007505 ac_cv_type_uid_t=no
7506fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007507rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007508
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7511$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007512if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007513
Matthias Kloseb9621712010-04-24 17:59:49 +00007514$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007515
7516
Matthias Kloseb9621712010-04-24 17:59:49 +00007517$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007518
7519fi
7520
Mark Dickinson983bc162012-12-02 12:11:38 +00007521
7522# There are two separate checks for each of the exact-width integer types we
7523# need. First we check whether the type is available using the usual
7524# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7525# and <stdint.h> where available). We then also use the special type checks of
7526# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7527# directly, #define's uint32_t to be a suitable type.
7528
7529ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7530if test "x$ac_cv_type_uint32_t" = xyes; then :
7531
7532$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7533
7534fi
7535
Matthias Kloseb9621712010-04-24 17:59:49 +00007536ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7537case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007538 no|yes) ;; #(
7539 *)
7540
Matthias Kloseb9621712010-04-24 17:59:49 +00007541$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007542
7543
7544cat >>confdefs.h <<_ACEOF
7545#define uint32_t $ac_cv_c_uint32_t
7546_ACEOF
7547;;
7548 esac
7549
Mark Dickinson983bc162012-12-02 12:11:38 +00007550
7551ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7552if test "x$ac_cv_type_uint64_t" = xyes; then :
7553
7554$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7555
7556fi
7557
Matthias Kloseb9621712010-04-24 17:59:49 +00007558ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7559case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007560 no|yes) ;; #(
7561 *)
7562
Matthias Kloseb9621712010-04-24 17:59:49 +00007563$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007564
7565
7566cat >>confdefs.h <<_ACEOF
7567#define uint64_t $ac_cv_c_uint64_t
7568_ACEOF
7569;;
7570 esac
7571
Mark Dickinson983bc162012-12-02 12:11:38 +00007572
7573ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7574if test "x$ac_cv_type_int32_t" = xyes; then :
7575
7576$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7577
7578fi
7579
Matthias Kloseb9621712010-04-24 17:59:49 +00007580ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7581case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007582 no|yes) ;; #(
7583 *)
7584
7585cat >>confdefs.h <<_ACEOF
7586#define int32_t $ac_cv_c_int32_t
7587_ACEOF
7588;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007589esac
7590
Mark Dickinson983bc162012-12-02 12:11:38 +00007591
7592ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7593if test "x$ac_cv_type_int64_t" = xyes; then :
7594
7595$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7596
7597fi
7598
Matthias Kloseb9621712010-04-24 17:59:49 +00007599ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7600case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007601 no|yes) ;; #(
7602 *)
7603
7604cat >>confdefs.h <<_ACEOF
7605#define int64_t $ac_cv_c_int64_t
7606_ACEOF
7607;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007608esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007609
Mark Dickinson983bc162012-12-02 12:11:38 +00007610
Matthias Kloseb9621712010-04-24 17:59:49 +00007611ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007612if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613
Matthias Kloseb9621712010-04-24 17:59:49 +00007614$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007615
7616fi
7617
Stefan Krah1919b7e2012-03-21 18:25:23 +01007618ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7619if test "x$ac_cv_type___uint128_t" = xyes; then :
7620
7621$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7622
7623fi
7624
Jack Jansendd19cf82001-12-06 22:36:17 +00007625
Michael W. Hudson54241132001-12-07 15:38:26 +00007626# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007627# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628# The cast to long int works around a bug in the HP C Compiler
7629# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7630# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7631# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7633$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007634if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007636else
Matthias Kloseb9621712010-04-24 17:59:49 +00007637 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 +00007638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639else
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 if test "$ac_cv_type_int" = yes; then
7641 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007643as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007644See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645 else
7646 ac_cv_sizeof_int=0
7647 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007649
Martin v. Löwis11437992002-04-12 09:54:03 +00007650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7652$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653
7654
7655
Martin v. Löwis11437992002-04-12 09:54:03 +00007656cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007657#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007658_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007659
7660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007661# The cast to long int works around a bug in the HP C Compiler
7662# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7663# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7664# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7666$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007667if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007668 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007669else
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 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 +00007671
Martin v. Löwis11437992002-04-12 09:54:03 +00007672else
Matthias Kloseb9621712010-04-24 17:59:49 +00007673 if test "$ac_cv_type_long" = yes; then
7674 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007676as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007677See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678 else
7679 ac_cv_sizeof_long=0
7680 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007682
Martin v. Löwis11437992002-04-12 09:54:03 +00007683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7685$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686
7687
7688
Martin v. Löwis11437992002-04-12 09:54:03 +00007689cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007690#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007691_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007692
7693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007694# The cast to long int works around a bug in the HP C Compiler
7695# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7696# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7697# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7699$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007700if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007702else
Matthias Kloseb9621712010-04-24 17:59:49 +00007703 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 +00007704
Martin v. Löwis11437992002-04-12 09:54:03 +00007705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 if test "$ac_cv_type_void_p" = yes; then
7707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007709as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007710See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711 else
7712 ac_cv_sizeof_void_p=0
7713 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715
Martin v. Löwis11437992002-04-12 09:54:03 +00007716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7718$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719
7720
7721
Martin v. Löwis11437992002-04-12 09:54:03 +00007722cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007723#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007724_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007725
7726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727# The cast to long int works around a bug in the HP C Compiler
7728# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7729# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7730# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7732$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007733if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007735else
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 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 +00007737
Martin v. Löwis11437992002-04-12 09:54:03 +00007738else
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 if test "$ac_cv_type_short" = yes; then
7740 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007742as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007743See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744 else
7745 ac_cv_sizeof_short=0
7746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007748
Martin v. Löwis11437992002-04-12 09:54:03 +00007749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7751$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752
7753
7754
Martin v. Löwis11437992002-04-12 09:54:03 +00007755cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007756#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007757_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007758
7759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760# The cast to long int works around a bug in the HP C Compiler
7761# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7762# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7763# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7765$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007766if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007768else
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 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 +00007770
Martin v. Löwis11437992002-04-12 09:54:03 +00007771else
Matthias Kloseb9621712010-04-24 17:59:49 +00007772 if test "$ac_cv_type_float" = yes; then
7773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007775as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007776See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777 else
7778 ac_cv_sizeof_float=0
7779 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781
Martin v. Löwis11437992002-04-12 09:54:03 +00007782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7784$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785
7786
7787
Martin v. Löwis11437992002-04-12 09:54:03 +00007788cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007789#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007790_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007791
7792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793# The cast to long int works around a bug in the HP C Compiler
7794# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7795# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7796# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7798$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007799if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007801else
Matthias Kloseb9621712010-04-24 17:59:49 +00007802 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 +00007803
Martin v. Löwis11437992002-04-12 09:54:03 +00007804else
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 if test "$ac_cv_type_double" = yes; then
7806 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007808as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007809See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810 else
7811 ac_cv_sizeof_double=0
7812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007814
Martin v. Löwis11437992002-04-12 09:54:03 +00007815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7817$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818
7819
7820
Martin v. Löwis11437992002-04-12 09:54:03 +00007821cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007822#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007823_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007824
7825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007826# The cast to long int works around a bug in the HP C Compiler
7827# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7828# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7829# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7831$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007832if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007834else
Matthias Kloseb9621712010-04-24 17:59:49 +00007835 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 +00007836
Martin v. Löwis11437992002-04-12 09:54:03 +00007837else
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 if test "$ac_cv_type_fpos_t" = yes; then
7839 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007841as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007842See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843 else
7844 ac_cv_sizeof_fpos_t=0
7845 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007847
Martin v. Löwis11437992002-04-12 09:54:03 +00007848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7850$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851
7852
7853
Martin v. Löwis11437992002-04-12 09:54:03 +00007854cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007855#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007856_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007857
Michael W. Hudson54241132001-12-07 15:38:26 +00007858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859# The cast to long int works around a bug in the HP C Compiler
7860# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7861# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7862# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7864$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007865if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007867else
Matthias Kloseb9621712010-04-24 17:59:49 +00007868 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 +00007869
Martin v. Löwis18e16552006-02-15 17:27:45 +00007870else
Matthias Kloseb9621712010-04-24 17:59:49 +00007871 if test "$ac_cv_type_size_t" = yes; then
7872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007874as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007875See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876 else
7877 ac_cv_sizeof_size_t=0
7878 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880
Martin v. Löwis18e16552006-02-15 17:27:45 +00007881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7883$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884
7885
7886
Martin v. Löwis18e16552006-02-15 17:27:45 +00007887cat >>confdefs.h <<_ACEOF
7888#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7889_ACEOF
7890
7891
Christian Heimes400adb02008-02-01 08:12:03 +00007892# The cast to long int works around a bug in the HP C Compiler
7893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7895# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7897$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007898if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007899 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007900else
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 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 +00007902
Christian Heimes400adb02008-02-01 08:12:03 +00007903else
Matthias Kloseb9621712010-04-24 17:59:49 +00007904 if test "$ac_cv_type_pid_t" = yes; then
7905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007907as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007908See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007909 else
7910 ac_cv_sizeof_pid_t=0
7911 fi
7912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007913
Christian Heimes400adb02008-02-01 08:12:03 +00007914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7916$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007917
7918
7919
7920cat >>confdefs.h <<_ACEOF
7921#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7922_ACEOF
7923
7924
Michael W. Hudson54241132001-12-07 15:38:26 +00007925
Matthias Kloseb9621712010-04-24 17:59:49 +00007926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7927$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007928have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007930/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007931
Martin v. Löwis11437992002-04-12 09:54:03 +00007932int
7933main ()
7934{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007935long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007936 ;
7937 return 0;
7938}
7939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007941
7942
Matthias Kloseb9621712010-04-24 17:59:49 +00007943$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007944
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007945 have_long_long=yes
7946
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7950$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007951if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952# The cast to long int works around a bug in the HP C Compiler
7953# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7954# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7955# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7957$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007958if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007960else
Matthias Kloseb9621712010-04-24 17:59:49 +00007961 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 +00007962
Martin v. Löwis11437992002-04-12 09:54:03 +00007963else
Matthias Kloseb9621712010-04-24 17:59:49 +00007964 if test "$ac_cv_type_long_long" = yes; then
7965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007967as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007968See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969 else
7970 ac_cv_sizeof_long_long=0
7971 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007973
Martin v. Löwis11437992002-04-12 09:54:03 +00007974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7976$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977
7978
7979
Martin v. Löwis11437992002-04-12 09:54:03 +00007980cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007981#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007982_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007983
Michael W. Hudson54241132001-12-07 15:38:26 +00007984
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007985fi
7986
Matthias Kloseb9621712010-04-24 17:59:49 +00007987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7988$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007989have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007991/* end confdefs.h. */
7992
7993int
7994main ()
7995{
7996long double x; x = (long double)0;
7997 ;
7998 return 0;
7999}
8000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008001if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008002
8003
Matthias Kloseb9621712010-04-24 17:59:49 +00008004$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008005
8006 have_long_double=yes
8007
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008008fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8011$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008012if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008013# The cast to long int works around a bug in the HP C Compiler
8014# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8015# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8016# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8018$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008019if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008021else
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 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 +00008023
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008024else
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 if test "$ac_cv_type_long_double" = yes; then
8026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008028as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008029See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008030 else
8031 ac_cv_sizeof_long_double=0
8032 fi
8033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008034
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8037$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008038
8039
8040
8041cat >>confdefs.h <<_ACEOF
8042#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8043_ACEOF
8044
8045
8046fi
8047
8048
Matthias Kloseb9621712010-04-24 17:59:49 +00008049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8050$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008051have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008053/* end confdefs.h. */
8054
8055int
8056main ()
8057{
8058_Bool x; x = (_Bool)0;
8059 ;
8060 return 0;
8061}
8062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008063if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008064
8065
Matthias Kloseb9621712010-04-24 17:59:49 +00008066$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008067
8068 have_c99_bool=yes
8069
Thomas Woutersb2137042007-02-01 18:02:27 +00008070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8073$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008074if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075# The cast to long int works around a bug in the HP C Compiler
8076# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8077# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8078# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8080$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008081if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008083else
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 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 +00008085
Thomas Woutersb2137042007-02-01 18:02:27 +00008086else
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 if test "$ac_cv_type__Bool" = yes; then
8088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008090as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008091See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092 else
8093 ac_cv_sizeof__Bool=0
8094 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008096
Thomas Woutersb2137042007-02-01 18:02:27 +00008097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8099$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008100
8101
8102
Thomas Woutersb2137042007-02-01 18:02:27 +00008103cat >>confdefs.h <<_ACEOF
8104#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8105_ACEOF
8106
8107
8108fi
8109
Matthias Kloseb9621712010-04-24 17:59:49 +00008110ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008111 #include <stdint.h>
8112 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008113 #ifdef HAVE_INTTYPES_H
8114 #include <inttypes.h>
8115 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008116"
Victor Stinnere0be4232011-10-25 13:06:09 +02008117if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008118
8119cat >>confdefs.h <<_ACEOF
8120#define HAVE_UINTPTR_T 1
8121_ACEOF
8122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123# The cast to long int works around a bug in the HP C Compiler
8124# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8125# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8126# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8128$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008129if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008131else
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 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 +00008133
Martin v. Löwis11437992002-04-12 09:54:03 +00008134else
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 if test "$ac_cv_type_uintptr_t" = yes; then
8136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008138as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008139See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140 else
8141 ac_cv_sizeof_uintptr_t=0
8142 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008144
Martin v. Löwis11437992002-04-12 09:54:03 +00008145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8147$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148
8149
8150
Martin v. Löwis11437992002-04-12 09:54:03 +00008151cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008152#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008153_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008154
Michael W. Hudson54241132001-12-07 15:38:26 +00008155
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008156fi
8157
Thomas Wouters89f507f2006-12-13 04:49:30 +00008158
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008159# The cast to long int works around a bug in the HP C Compiler
8160# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8161# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8162# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8164$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008165if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008166 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008167else
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008169#ifdef HAVE_SYS_TYPES_H
8170#include <sys/types.h>
8171#endif
8172
Matthias Kloseb9621712010-04-24 17:59:49 +00008173"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008174
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008175else
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 if test "$ac_cv_type_off_t" = yes; then
8177 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008179as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008180See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008181 else
8182 ac_cv_sizeof_off_t=0
8183 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008185
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8188$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008189
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008190
8191
Martin v. Löwis11437992002-04-12 09:54:03 +00008192cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008193#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008194_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008195
Michael W. Hudson54241132001-12-07 15:38:26 +00008196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8199$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008200if test "$have_long_long" = yes
8201then
8202if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008203 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008204
Matthias Kloseb9621712010-04-24 17:59:49 +00008205$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008206
Matthias Kloseb9621712010-04-24 17:59:49 +00008207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8208$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008209else
Matthias Kloseb9621712010-04-24 17:59:49 +00008210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8211$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008212fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008213else
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8215$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008216fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008217
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008218# The cast to long int works around a bug in the HP C Compiler
8219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8221# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8223$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008224if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008228#ifdef HAVE_SYS_TYPES_H
8229#include <sys/types.h>
8230#endif
8231#ifdef HAVE_TIME_H
8232#include <time.h>
8233#endif
8234
Matthias Kloseb9621712010-04-24 17:59:49 +00008235"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008236
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008237else
Matthias Kloseb9621712010-04-24 17:59:49 +00008238 if test "$ac_cv_type_time_t" = yes; then
8239 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8240$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008241as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008242See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008243 else
8244 ac_cv_sizeof_time_t=0
8245 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008247
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8250$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008251
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008252
8253
Martin v. Löwis11437992002-04-12 09:54:03 +00008254cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008255#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008256_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008257
Michael W. Hudson54241132001-12-07 15:38:26 +00008258
8259
Trent Mick635f6fb2000-08-23 21:33:05 +00008260# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008261ac_save_cc="$CC"
8262if test "$ac_cv_kpthread" = "yes"
8263then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008264elif test "$ac_cv_kthread" = "yes"
8265then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008266elif test "$ac_cv_pthread" = "yes"
8267then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008268fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008269
Matthias Kloseb9621712010-04-24 17:59:49 +00008270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8271$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008272have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008274/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008275
8276 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008277int
8278main ()
8279{
Guido van Rossum12580492000-09-24 16:47:19 +00008280pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008281 ;
8282 return 0;
8283}
Matthias Kloseb159a552010-04-25 21:00:44 +00008284
Martin v. Löwis11437992002-04-12 09:54:03 +00008285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008286if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008287 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8291$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008292if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008294# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8295# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8296# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8298$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008299if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008301else
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008303#ifdef HAVE_PTHREAD_H
8304#include <pthread.h>
8305#endif
8306
Matthias Kloseb9621712010-04-24 17:59:49 +00008307"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008308
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008309else
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 if test "$ac_cv_type_pthread_t" = yes; then
8311 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8312$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008313as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008314See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008315 else
8316 ac_cv_sizeof_pthread_t=0
8317 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008319
Trent Mick635f6fb2000-08-23 21:33:05 +00008320fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8322$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008323
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008324
8325
Martin v. Löwis11437992002-04-12 09:54:03 +00008326cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008327#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008328_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008329
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008330
Trent Mick635f6fb2000-08-23 21:33:05 +00008331fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008332CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008333
Michael W. Hudson54241132001-12-07 15:38:26 +00008334
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008335case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008336 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008337 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8338 ;;
8339 Darwin/*)
8340 OTHER_LIBTOOL_OPT=""
8341 ;;
8342esac
8343
8344
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008345
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008346case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008347 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008348 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8349 if test "${enable_universalsdk}"; then
8350 :
8351 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008352 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008353 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008354 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008355 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008356 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008357 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008358 if test ${gcc_version} '<' 4.0
8359 then
8360 LIBTOOL_CRUFT="-lcc_dynamic"
8361 else
8362 LIBTOOL_CRUFT=""
8363 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008365 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008366else
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008368/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008369
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008370 #include <unistd.h>
8371 int main(int argc, char*argv[])
8372 {
8373 if (sizeof(long) == 4) {
8374 return 0;
8375 } else {
8376 return 1;
8377 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008378 }
8379
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008381if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008382 ac_osx_32bit=yes
8383else
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008385fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8387 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008388fi
8389
8390
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008391 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008392 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008393 i386)
8394 MACOSX_DEFAULT_ARCH="i386"
8395 ;;
8396 ppc)
8397 MACOSX_DEFAULT_ARCH="ppc"
8398 ;;
8399 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008400 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008401 ;;
8402 esac
8403 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008404 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008405 i386)
8406 MACOSX_DEFAULT_ARCH="x86_64"
8407 ;;
8408 ppc)
8409 MACOSX_DEFAULT_ARCH="ppc64"
8410 ;;
8411 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008412 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008413 ;;
8414 esac
8415
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008416 fi
8417
8418 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008419 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008420 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008421esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8423$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008424if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008425then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008426 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008427 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008428 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008429
Matthias Kloseb9621712010-04-24 17:59:49 +00008430$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008431
Matthias Kloseb9621712010-04-24 17:59:49 +00008432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8433$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008434 if test $enable_shared = "yes"
8435 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008436 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 +00008437 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008438else
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008441fi
8442
Matthias Kloseb9621712010-04-24 17:59:49 +00008443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8444$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008445case $ac_sys_system/$ac_sys_release in
8446 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008447
Matthias Kloseb9621712010-04-24 17:59:49 +00008448$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8451$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008452 ;;
8453 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8455$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008456 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008457esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008458
Guido van Rossum0a516c91994-09-12 10:58:40 +00008459# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008460
Michael W. Hudson54241132001-12-07 15:38:26 +00008461
8462
8463
8464
Benjamin Peterson99f03762010-04-11 22:15:28 +00008465
Thomas Wouters477c8d52006-05-27 19:21:47 +00008466
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008467# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8468# -- usually .so, .sl on HP-UX, .dll on Cygwin
8469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8470$as_echo_n "checking the extension of shared libraries... " >&6; }
8471if test -z "$SHLIB_SUFFIX"; then
8472 case $ac_sys_system in
8473 hp*|HP*)
8474 case `uname -m` in
8475 ia64) SHLIB_SUFFIX=.so;;
8476 *) SHLIB_SUFFIX=.sl;;
8477 esac
8478 ;;
8479 CYGWIN*) SHLIB_SUFFIX=.dll;;
8480 *) SHLIB_SUFFIX=.so;;
8481 esac
8482fi
8483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8484$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008485
Guido van Rossum0a516c91994-09-12 10:58:40 +00008486# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008487# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008488# (Shared libraries in this instance are shared modules to be loaded into
8489# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8491$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008492if test -z "$LDSHARED"
8493then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008494 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008495 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008496 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008497 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008498 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008499 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008500 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008501 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008502 if test "$GCC" = "yes" ; then
8503 LDSHARED='$(CC) -shared'
8504 LDCXXSHARED='$(CXX) -shared'
8505 else
8506 LDSHARED='$(CC) -G'
8507 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008508 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008509 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008510 if test "$GCC" = "yes" ; then
8511 LDSHARED='$(CC) -shared'
8512 LDCXXSHARED='$(CXX) -shared'
8513 else
8514 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008515 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008516 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008517 LDSHARED='$(CC) -bundle'
8518 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008519 if test "$enable_framework" ; then
8520 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008521 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8522 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008523 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008524 else
8525 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008526 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008527 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008528 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008529 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008530 LDSHARED='$(CC) -bundle'
8531 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008532 if test "$enable_framework" ; then
8533 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008534 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8535 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008536 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008537 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008538 # No framework, use the Python app as bundle-loader
8539 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008540 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008541 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008542 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008543 Darwin/*)
8544 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8545 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008546
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008547 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008548 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008549 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8550 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008551 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008552 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008553 LDSHARED='$(CC) -bundle'
8554 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008555 if test "$enable_framework" ; then
8556 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008557 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8558 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008559 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008560 else
8561 # No framework, use the Python app as bundle-loader
8562 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8563 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008564 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008565 fi
8566 fi
8567 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008568 Linux*|GNU*|QNX*)
8569 LDSHARED='$(CC) -shared'
8570 LDCXXSHARED='$(CXX) -shared';;
8571 BSD/OS*/4*)
8572 LDSHARED="gcc -shared"
8573 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008574 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008575 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008576 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008577 LDSHARED='$(CC) -shared'
8578 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008579 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008580 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008581 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008582 OpenBSD*)
8583 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8584 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008585 LDSHARED='$(CC) -shared $(CCSHARED)'
8586 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008587 else
8588 case `uname -r` in
8589 [01].* | 2.[0-7] | 2.[0-7].*)
8590 LDSHARED="ld -Bshareable ${LDFLAGS}"
8591 ;;
8592 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008593 LDSHARED='$(CC) -shared $(CCSHARED)'
8594 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008595 ;;
8596 esac
8597 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008598 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008599 LDSHARED='$(CC) -shared'
8600 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008601 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008602 if test "$GCC" = "yes" ; then
8603 LDSHARED='$(CC) -shared'
8604 LDCXXSHARED='$(CXX) -shared'
8605 else
8606 LDSHARED='$(CC) -G'
8607 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008608 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008609 SCO_SV*)
8610 LDSHARED='$(CC) -Wl,-G,-Bexport'
8611 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8612 CYGWIN*)
8613 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8614 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008615 *) LDSHARED="ld";;
8616 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8619$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008620LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008621BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008622# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008623# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8625$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008626if test -z "$CCSHARED"
8627then
Guido van Rossum07397971997-04-29 21:49:50 +00008628 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008629 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008630 then CCSHARED="-fPIC";
8631 elif test `uname -p` = sparc;
8632 then CCSHARED="-xcode=pic32";
8633 else CCSHARED="-Kpic";
8634 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008635 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008636 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008637 else CCSHARED="+z";
8638 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008639 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008640 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008641 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008642 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008643 if test "$GCC" = "yes"
8644 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008645 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008646 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008647 SCO_SV*)
8648 if test "$GCC" = "yes"
8649 then CCSHARED="-fPIC"
8650 else CCSHARED="-Kpic -belf"
8651 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008652 IRIX*/6*) case $CC in
8653 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008654 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008655 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008656 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8659$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008660# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008661# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8663$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008664if test -z "$LINKFORSHARED"
8665then
Guido van Rossum07397971997-04-29 21:49:50 +00008666 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008667 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008668 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008669 LINKFORSHARED="-Wl,-E -Wl,+s";;
8670# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008671 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008672 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008673 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008675 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008676
8677 # Issue #18075: the default maximum stack size (8MBytes) is too
8678 # small for the default recursion limit. Increase the stack size
8679 # to ensure that tests don't crash
8680 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8681
Jack Jansene578a632001-08-15 01:27:14 +00008682 if test "$enable_framework"
8683 then
Jack Jansenda49e192005-01-07 13:08:22 +00008684 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008685 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008686 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008687 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008688 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008689 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008690 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008691 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8692 then
8693 LINKFORSHARED="-Wl,--export-dynamic"
8694 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008695 SunOS/5*) case $CC in
8696 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008697 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008698 then
8699 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008700 fi;;
8701 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008702 CYGWIN*)
8703 if test $enable_shared = "no"
8704 then
8705 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8706 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008707 QNX*)
8708 # -Wl,-E causes the symbols to be added to the dynamic
8709 # symbol table so that they can be found when a module
8710 # is loaded. -N 2048K causes the stack size to be set
8711 # to 2048 kilobytes so that the stack doesn't overflow
8712 # when running test_compile.py.
8713 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008714 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8717$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008718
Michael W. Hudson54241132001-12-07 15:38:26 +00008719
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008720
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8722$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008723if test ! "$LIBRARY" = "$LDLIBRARY"
8724then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008725 case $ac_sys_system in
8726 CYGWIN*)
8727 # Cygwin needs CCSHARED when building extension DLLs
8728 # but not when building the interpreter DLL.
8729 CFLAGSFORSHARED='';;
8730 *)
8731 CFLAGSFORSHARED='$(CCSHARED)'
8732 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8735$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008736
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008737# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8738# library (with --enable-shared).
8739# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008740# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8741# if it is not required, since it creates a dependency of the shared library
8742# to LIBS. This, in turn, means that applications linking the shared libpython
8743# don't need to link LIBS explicitly. The default should be only changed
8744# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008745
Matthias Kloseb9621712010-04-24 17:59:49 +00008746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8747$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008748case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008749 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008750 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008751esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8753$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008754
8755
Guido van Rossum627b2d71993-12-24 10:39:16 +00008756# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8758$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008759if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008760 $as_echo_n "(cached) " >&6
8761else
8762 ac_check_lib_save_LIBS=$LIBS
8763LIBS="-lsendfile $LIBS"
8764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8765/* end confdefs.h. */
8766
8767/* Override any GCC internal prototype to avoid an error.
8768 Use char because int might match the return type of a GCC
8769 builtin and then its argument prototype would still apply. */
8770#ifdef __cplusplus
8771extern "C"
8772#endif
8773char sendfile ();
8774int
8775main ()
8776{
8777return sendfile ();
8778 ;
8779 return 0;
8780}
8781_ACEOF
8782if ac_fn_c_try_link "$LINENO"; then :
8783 ac_cv_lib_sendfile_sendfile=yes
8784else
8785 ac_cv_lib_sendfile_sendfile=no
8786fi
8787rm -f core conftest.err conftest.$ac_objext \
8788 conftest$ac_exeext conftest.$ac_ext
8789LIBS=$ac_check_lib_save_LIBS
8790fi
8791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8792$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008793if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008794 cat >>confdefs.h <<_ACEOF
8795#define HAVE_LIBSENDFILE 1
8796_ACEOF
8797
8798 LIBS="-lsendfile $LIBS"
8799
8800fi
8801
Matthias Kloseb9621712010-04-24 17:59:49 +00008802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8803$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008804if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008806else
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008808LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812/* Override any GCC internal prototype to avoid an error.
8813 Use char because int might match the return type of a GCC
8814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008815#ifdef __cplusplus
8816extern "C"
8817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008818char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008819int
8820main ()
8821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008823 ;
8824 return 0;
8825}
8826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008827if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008829else
Matthias Kloseb9621712010-04-24 17:59:49 +00008830 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008832rm -f core conftest.err conftest.$ac_objext \
8833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008834LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8837$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008838if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 cat >>confdefs.h <<_ACEOF
8840#define HAVE_LIBDL 1
8841_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008842
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008843 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008844
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008845fi
8846 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8848$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008849if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008850 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008851else
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008853LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008857/* Override any GCC internal prototype to avoid an error.
8858 Use char because int might match the return type of a GCC
8859 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008860#ifdef __cplusplus
8861extern "C"
8862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008863char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008864int
8865main ()
8866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008867return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 ;
8869 return 0;
8870}
8871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008872if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008874else
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008877rm -f core conftest.err conftest.$ac_objext \
8878 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008879LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8882$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008883if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 cat >>confdefs.h <<_ACEOF
8885#define HAVE_LIBDLD 1
8886_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008887
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008888 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008889
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008890fi
8891 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008892
Georg Brandlb1441c72009-01-03 22:33:39 +00008893# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008894if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8896$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008897if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008899else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008900 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904/* Override any GCC internal prototype to avoid an error.
8905 Use char because int might match the return type of a GCC
8906 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008907#ifdef __cplusplus
8908extern "C"
8909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008910char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008911int
8912main ()
8913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008915 ;
8916 return 0;
8917}
8918_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919for ac_lib in '' pthread rt posix4; do
8920 if test -z "$ac_lib"; then
8921 ac_res="none required"
8922 else
8923 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008924 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008927 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008929rm -f core conftest.err conftest.$ac_objext \
8930 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008931 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008932 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008934done
Victor Stinnere0be4232011-10-25 13:06:09 +02008935if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937else
8938 ac_cv_search_sem_init=no
8939fi
8940rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008941LIBS=$ac_func_search_save_LIBS
8942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8944$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008946if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008948
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008949fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008950 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008951 # posix4 on Solaris 2.6
8952 # pthread (first!) on Linux
8953fi
8954
Martin v. Löwis19d17342003-06-14 21:03:05 +00008955# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8957$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008958if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008960else
8961 ac_check_lib_save_LIBS=$LIBS
8962LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008964/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966/* Override any GCC internal prototype to avoid an error.
8967 Use char because int might match the return type of a GCC
8968 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008969#ifdef __cplusplus
8970extern "C"
8971#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008972char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008973int
8974main ()
8975{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008977 ;
8978 return 0;
8979}
8980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008981if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008982 ac_cv_lib_intl_textdomain=yes
8983else
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008986rm -f core conftest.err conftest.$ac_objext \
8987 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008988LIBS=$ac_check_lib_save_LIBS
8989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8991$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008992if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008993
Matthias Kloseb9621712010-04-24 17:59:49 +00008994$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008995
Brett Cannonc6d936e2009-06-07 20:09:53 +00008996 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008997fi
8998
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008999
9000# checks for system dependent C++ extensions support
9001case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9003$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009005/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009006
Georg Brandl59e87bd2011-02-15 19:48:59 +00009007 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009008int
9009main ()
9010{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009011loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 ;
9013 return 0;
9014}
Matthias Kloseb159a552010-04-25 21:00:44 +00009015
Martin v. Löwis11437992002-04-12 09:54:03 +00009016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009017if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009018
Matthias Kloseb159a552010-04-25 21:00:44 +00009019
Matthias Kloseb9621712010-04-24 17:59:49 +00009020$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009021
Matthias Kloseb159a552010-04-25 21:00:44 +00009022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009023$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009024
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009025else
Matthias Kloseb159a552010-04-25 21:00:44 +00009026
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009028$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009029
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009031rm -f core conftest.err conftest.$ac_objext \
9032 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009033 *) ;;
9034esac
9035
Christian Heimes985ecdc2013-11-20 11:46:18 +01009036# check for systems that require aligned memory access
9037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9038$as_echo_n "checking aligned memory access is required... " >&6; }
9039if test "$cross_compiling" = yes; then :
9040 aligned_required=yes
9041else
9042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9043/* end confdefs.h. */
9044
9045int main()
9046{
9047 char s[16];
9048 int i, *p1, *p2;
9049 for (i=0; i < 16; i++)
9050 s[i] = i;
9051 p1 = (int*)(s+1);
9052 p2 = (int*)(s+2);
9053 if (*p1 == *p2)
9054 return 1;
9055 return 0;
9056}
9057
9058_ACEOF
9059if ac_fn_c_try_run "$LINENO"; then :
9060 aligned_required=no
9061else
9062 aligned_required=yes
9063fi
9064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9065 conftest.$ac_objext conftest.beam conftest.$ac_ext
9066fi
9067
9068
9069if test "$aligned_required" = yes ; then
9070
9071$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9072
9073fi
9074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9075$as_echo "$aligned_required" >&6; }
9076
9077
9078# str, bytes and memoryview hash algorithm
9079
9080
9081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9082$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9083
9084# Check whether --with-hash_algorithm was given.
9085if test "${with_hash_algorithm+set}" = set; then :
9086 withval=$with_hash_algorithm;
9087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9088$as_echo "$withval" >&6; }
9089case "$withval" in
9090 siphash24)
9091 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9092
9093 ;;
9094 fnv)
9095 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9096
9097 ;;
9098 *)
9099 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9100 ;;
9101esac
9102
9103else
9104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9105$as_echo "default" >&6; }
9106fi
9107
9108
Guido van Rossum70c7f481998-03-26 18:44:10 +00009109# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9111$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009112if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009113 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009114else
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009116LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009120/* Override any GCC internal prototype to avoid an error.
9121 Use char because int might match the return type of a GCC
9122 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009123#ifdef __cplusplus
9124extern "C"
9125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009126char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009127int
9128main ()
9129{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009130return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 ;
9132 return 0;
9133}
9134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009135if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009136 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009137else
Matthias Kloseb9621712010-04-24 17:59:49 +00009138 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009140rm -f core conftest.err conftest.$ac_objext \
9141 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009142LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9145$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009146if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009147 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009148fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009149 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9151$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009152if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009153 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009154else
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009156LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009160/* Override any GCC internal prototype to avoid an error.
9161 Use char because int might match the return type of a GCC
9162 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009163#ifdef __cplusplus
9164extern "C"
9165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009166char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009167int
9168main ()
9169{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009170return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ;
9172 return 0;
9173}
9174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009175if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009177else
Matthias Kloseb9621712010-04-24 17:59:49 +00009178 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009180rm -f core conftest.err conftest.$ac_objext \
9181 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009182LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9185$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009186if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009187 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009188fi
9189 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009190
Matthias Kloseb9621712010-04-24 17:59:49 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9192$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009195if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9198$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009199LIBS="$withval $LIBS"
9200
9201else
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9203$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009204fi
9205
Guido van Rossum7f43da71994-08-01 12:15:30 +00009206
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009207if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009208 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9209set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9211$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009212if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009213 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009214else
9215 case $PKG_CONFIG in
9216 [\\/]* | ?:[\\/]*)
9217 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9218 ;;
9219 *)
9220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9221for as_dir in $PATH
9222do
9223 IFS=$as_save_IFS
9224 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009225 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009226 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009227 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009228 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009229 break 2
9230 fi
9231done
Matthias Kloseb9621712010-04-24 17:59:49 +00009232 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009233IFS=$as_save_IFS
9234
9235 ;;
9236esac
9237fi
9238PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9239if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9241$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009242else
Matthias Kloseb9621712010-04-24 17:59:49 +00009243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9244$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009245fi
9246
9247
9248fi
9249if test -z "$ac_cv_path_PKG_CONFIG"; then
9250 ac_pt_PKG_CONFIG=$PKG_CONFIG
9251 # Extract the first word of "pkg-config", so it can be a program name with args.
9252set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9254$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009255if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009256 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009257else
9258 case $ac_pt_PKG_CONFIG in
9259 [\\/]* | ?:[\\/]*)
9260 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9261 ;;
9262 *)
9263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9264for as_dir in $PATH
9265do
9266 IFS=$as_save_IFS
9267 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009268 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009269 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009270 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009271 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009272 break 2
9273 fi
9274done
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009276IFS=$as_save_IFS
9277
9278 ;;
9279esac
9280fi
9281ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9282if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9284$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009285else
Matthias Kloseb9621712010-04-24 17:59:49 +00009286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9287$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009288fi
9289
9290 if test "x$ac_pt_PKG_CONFIG" = x; then
9291 PKG_CONFIG=""
9292 else
9293 case $cross_compiling:$ac_tool_warned in
9294yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009295{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9296$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009297ac_tool_warned=yes ;;
9298esac
9299 PKG_CONFIG=$ac_pt_PKG_CONFIG
9300 fi
9301else
9302 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9303fi
9304
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009305
9306# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9308$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009309
9310# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009311if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009312 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009313else
9314 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009315fi
9316
9317
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9319$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009320
9321# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9323$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009324
9325# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009326if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009327 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009328else
9329 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009330fi
9331
9332
9333if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009334 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9335else
9336 LIBFFI_INCLUDEDIR=""
9337fi
9338
9339
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9341$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009342
Stefan Krah60187b52012-03-23 19:06:27 +01009343# Check for use of the system libmpdec library
9344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9345$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9346
9347# Check whether --with-system_libmpdec was given.
9348if test "${with_system_libmpdec+set}" = set; then :
9349 withval=$with_system_libmpdec;
9350else
9351 with_system_libmpdec="no"
9352fi
9353
9354
9355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9356$as_echo "$with_system_libmpdec" >&6; }
9357
Benjamin Peterson076ed002010-10-31 17:11:02 +00009358# Check for support for loadable sqlite extensions
9359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9360$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9361# Check whether --enable-loadable-sqlite-extensions was given.
9362if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9363 enableval=$enable_loadable_sqlite_extensions;
9364else
9365 enable_loadable_sqlite_extensions="no"
9366fi
9367
9368
9369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9370$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9371
Ned Deilyd819b932013-09-06 01:07:05 -07009372# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9373
9374
9375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9376$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9377
9378# Check whether --with-tcltk-includes was given.
9379if test "${with_tcltk_includes+set}" = set; then :
9380 withval=$with_tcltk_includes;
9381else
9382 with_tcltk_includes="default"
9383fi
9384
9385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9386$as_echo "$with_tcltk_includes" >&6; }
9387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9388$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9389
9390# Check whether --with-tcltk-libs was given.
9391if test "${with_tcltk_libs+set}" = set; then :
9392 withval=$with_tcltk_libs;
9393else
9394 with_tcltk_libs="default"
9395fi
9396
9397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9398$as_echo "$with_tcltk_libs" >&6; }
9399if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9400then
9401 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9402 then
9403 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9404 fi
9405 TCLTK_INCLUDES=""
9406 TCLTK_LIBS=""
9407else
9408 TCLTK_INCLUDES="$with_tcltk_includes"
9409 TCLTK_LIBS="$with_tcltk_libs"
9410fi
9411
Matthias Klose55708cc2009-04-30 08:06:49 +00009412# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9414$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009415
9416# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009417if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009418 withval=$with_dbmliborder;
9419if test x$with_dbmliborder = xyes
9420then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009421as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009422else
9423 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9424 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9425 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009426 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009427 fi
9428 done
9429fi
9430fi
9431
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9433$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009434
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009435# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009436
9437
Matthias Kloseb9621712010-04-24 17:59:49 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9439$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009440
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009442if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443 withval=$with_signal_module;
9444fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009445
9446
9447if test -z "$with_signal_module"
9448then with_signal_module="yes"
9449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9451$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009452
9453if test "${with_signal_module}" = "yes"; then
9454 USE_SIGNAL_MODULE=""
9455 SIGNAL_OBJS=""
9456else
9457 USE_SIGNAL_MODULE="#"
9458 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9459fi
9460
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009461# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009462
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009463USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009464
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009465
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
9467# Templates for things AC_DEFINEd more than once.
9468# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009469
9470
Martin v. Löwis11437992002-04-12 09:54:03 +00009471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9473$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009476if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009477 withval=$with_threads;
9478fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009479
9480
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009481# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009482
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009484if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485 withval=$with_thread; with_threads=$with_thread
9486fi
9487
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009488
9489if test -z "$with_threads"
9490then with_threads="yes"
9491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9493$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009494
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009495
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009496if test "$with_threads" = "no"
9497then
9498 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009499elif test "$ac_cv_pthread_is_default" = yes
9500then
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009502
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009503 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009504 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009505
9506 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009508elif test "$ac_cv_kpthread" = "yes"
9509then
9510 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009511 if test "$ac_cv_cxx_thread" = "yes"; then
9512 CXX="$CXX -Kpthread"
9513 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009514 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009515
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009516 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009517 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009518elif test "$ac_cv_kthread" = "yes"
9519then
9520 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009521 if test "$ac_cv_cxx_thread" = "yes"; then
9522 CXX="$CXX -Kthread"
9523 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009524 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009525
9526 posix_threads=yes
9527 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009528elif test "$ac_cv_pthread" = "yes"
9529then
9530 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009531 if test "$ac_cv_cxx_thread" = "yes"; then
9532 CXX="$CXX -pthread"
9533 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009534 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009535
9536 posix_threads=yes
9537 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009538else
9539 if test ! -z "$with_threads" -a -d "$with_threads"
9540 then LDFLAGS="$LDFLAGS -L$with_threads"
9541 fi
9542 if test ! -z "$withval" -a -d "$withval"
9543 then LDFLAGS="$LDFLAGS -L$withval"
9544 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009545
9546 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009547 # define _POSIX_THREADS in unistd.h. Some apparently don't
9548 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9550$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009552/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009553
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009554#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009555#ifdef _POSIX_THREADS
9556yes
9557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009558
9559_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009560if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009561 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009562 unistd_defines_pthreads=yes
9563else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009564 unistd_defines_pthreads=no
9565fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009566rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009567
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9569$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009570
Matthias Kloseb9621712010-04-24 17:59:49 +00009571 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009572
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009573 # Just looking for pthread_create in libpthread is not enough:
9574 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9575 # So we really have to include pthread.h, and then link.
9576 _libs=$LIBS
9577 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9579$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009581/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009582
9583#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009584#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009585
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009586void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009587int
9588main ()
9589{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009590
9591pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009592 ;
9593 return 0;
9594}
9595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009596if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009597
Matthias Kloseb9621712010-04-24 17:59:49 +00009598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9599$as_echo "yes" >&6; }
9600 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009601
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009602 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009603 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009604else
Martin v. Löwis11437992002-04-12 09:54:03 +00009605
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009606 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009607 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009608if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009609 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009610
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009611 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009612 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009613else
Guido van Rossumad678af1998-10-02 14:42:15 +00009614
Matthias Kloseb9621712010-04-24 17:59:49 +00009615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9616$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009617if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009618 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009619else
Martin v. Löwis11437992002-04-12 09:54:03 +00009620 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009621LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009625/* Override any GCC internal prototype to avoid an error.
9626 Use char because int might match the return type of a GCC
9627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009628#ifdef __cplusplus
9629extern "C"
9630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009631char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009632int
9633main ()
9634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009635return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ;
9637 return 0;
9638}
9639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009640if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009641 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009642else
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009645rm -f core conftest.err conftest.$ac_objext \
9646 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009647LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9650$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009651if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009653
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009654 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009655 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009656 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009657else
Greg Steinadf63d62000-07-05 10:38:09 +00009658
Matthias Kloseb9621712010-04-24 17:59:49 +00009659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9660$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009661if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009662 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009663else
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009665LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009669/* Override any GCC internal prototype to avoid an error.
9670 Use char because int might match the return type of a GCC
9671 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009672#ifdef __cplusplus
9673extern "C"
9674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009675char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009676int
9677main ()
9678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009679return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ;
9681 return 0;
9682}
9683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009686else
Matthias Kloseb9621712010-04-24 17:59:49 +00009687 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009689rm -f core conftest.err conftest.$ac_objext \
9690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009691LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9694$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009695if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009696 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009697
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009698 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009699 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009700 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009701else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009702
Matthias Kloseb9621712010-04-24 17:59:49 +00009703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9704$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009705if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009707else
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009709LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713/* Override any GCC internal prototype to avoid an error.
9714 Use char because int might match the return type of a GCC
9715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716#ifdef __cplusplus
9717extern "C"
9718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009719char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009720int
9721main ()
9722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 ;
9725 return 0;
9726}
9727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009730else
Matthias Kloseb9621712010-04-24 17:59:49 +00009731 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009733rm -f core conftest.err conftest.$ac_objext \
9734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009735LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9738$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009739if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009741
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009742 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009743 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009744 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009745else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009746
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9748$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009749if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009751else
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009753LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009757/* Override any GCC internal prototype to avoid an error.
9758 Use char because int might match the return type of a GCC
9759 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760#ifdef __cplusplus
9761extern "C"
9762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009763char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009764int
9765main ()
9766{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009767return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ;
9769 return 0;
9770}
9771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009772if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009773 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009774else
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009777rm -f core conftest.err conftest.$ac_objext \
9778 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009779LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9782$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009783if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009785
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009786 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009787 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009788 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009789else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009790
Martin v. Löwis130fb172001-07-19 11:00:41 +00009791 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009792fi
9793
Guido van Rossum627b2d71993-12-24 10:39:16 +00009794
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009795fi
9796
Guido van Rossum0be3e491997-05-22 20:33:33 +00009797fi
9798
Guido van Rossum49545951997-12-02 19:28:29 +00009799fi
9800
Guido van Rossumb93a8621998-05-07 13:27:32 +00009801fi
9802
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009804rm -f core conftest.err conftest.$ac_objext \
9805 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009806
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9808$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009809if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009810 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009811else
Martin v. Löwis11437992002-04-12 09:54:03 +00009812 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009813LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009817/* Override any GCC internal prototype to avoid an error.
9818 Use char because int might match the return type of a GCC
9819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820#ifdef __cplusplus
9821extern "C"
9822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009823char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009824int
9825main ()
9826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 ;
9829 return 0;
9830}
9831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009832if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009834else
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009837rm -f core conftest.err conftest.$ac_objext \
9838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009839LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9842$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009843if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009844 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009845
Martin v. Löwis130fb172001-07-19 11:00:41 +00009846 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009847 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009848 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009849fi
9850
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009851
Neal Norwitza978ab02002-11-02 16:58:05 +00009852 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9854$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009855if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009857else
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009859LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863/* Override any GCC internal prototype to avoid an error.
9864 Use char because int might match the return type of a GCC
9865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009866#ifdef __cplusplus
9867extern "C"
9868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009869char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009870int
9871main ()
9872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ;
9875 return 0;
9876}
9877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009878if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009880else
Matthias Kloseb9621712010-04-24 17:59:49 +00009881 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009883rm -f core conftest.err conftest.$ac_objext \
9884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009885LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9888$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009889if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009891
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009892 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009893 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009894 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009895fi
9896
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009897 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009898fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009899
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009900if test "$posix_threads" = "yes"; then
9901 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009902
Matthias Kloseb9621712010-04-24 17:59:49 +00009903$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009904
9905 fi
9906
9907 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9908 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009909 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009910$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009911
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009912 ;;
9913 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009914$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009915
9916 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009917 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009918$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009919
9920 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009921 esac
9922
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9924$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009925 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009927else
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009929 ac_cv_pthread_system_supported=no
9930else
Matthias Kloseb9621712010-04-24 17:59:49 +00009931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009932/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009933
9934 #include <stdio.h>
9935 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009936 void *foo(void *parm) {
9937 return NULL;
9938 }
9939 main() {
9940 pthread_attr_t attr;
9941 pthread_t id;
9942 if (pthread_attr_init(&attr)) exit(-1);
9943 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9944 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9945 exit(0);
9946 }
9947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009948if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009949 ac_cv_pthread_system_supported=yes
9950else
Matthias Kloseb9621712010-04-24 17:59:49 +00009951 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9954 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009955fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009957
Guido van Rossum627b2d71993-12-24 10:39:16 +00009958fi
9959
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9961$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009962 if test "$ac_cv_pthread_system_supported" = "yes"; then
9963
Matthias Kloseb9621712010-04-24 17:59:49 +00009964$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009965
9966 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009967 for ac_func in pthread_sigmask
9968do :
9969 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009970if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009971 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009972#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009973_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009974 case $ac_sys_system in
9975 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009976
Matthias Kloseb9621712010-04-24 17:59:49 +00009977$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009978
9979 ;;
9980 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009981fi
9982done
9983
Christian Heimesf77b4b22013-08-21 13:26:05 +02009984 for ac_func in pthread_atfork
9985do :
9986 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9987if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9988 cat >>confdefs.h <<_ACEOF
9989#define HAVE_PTHREAD_ATFORK 1
9990_ACEOF
9991
9992fi
9993done
9994
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009995fi
9996
9997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009998# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009999
Matthias Kloseb9621712010-04-24 17:59:49 +000010000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10001$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010002# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010003if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010004 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010005 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10007$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010008 ipv6=no
10009 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010010 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10011$as_echo "yes" >&6; }
10012 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010013
10014 ipv6=yes
10015 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010017else
Martin v. Löwis11437992002-04-12 09:54:03 +000010018
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010020/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010021 /* AF_INET6 available check */
10022#include <sys/types.h>
10023#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010024int
10025main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010026{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010027int domain = AF_INET6;
10028 ;
10029 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010030}
Martin v. Löwis11437992002-04-12 09:54:03 +000010031_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010032if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010033
Matthias Kloseb9621712010-04-24 17:59:49 +000010034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10035$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010036 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010037
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010038else
Matthias Kloseb159a552010-04-25 21:00:44 +000010039
Matthias Kloseb9621712010-04-24 17:59:49 +000010040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10041$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010042 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010043
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010044fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010047if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10049$as_echo_n "checking if RFC2553 API is available... " >&6; }
10050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010052
10053 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010054#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010055int
10056main ()
10057{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010058struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010059 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010060 ;
10061 return 0;
10062}
Matthias Kloseb159a552010-04-25 21:00:44 +000010063
Martin v. Löwis11437992002-04-12 09:54:03 +000010064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010065if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010066
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010068$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010069 ipv6=yes
10070
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010071else
Matthias Kloseb159a552010-04-25 21:00:44 +000010072
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010074$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010075 ipv6=no
10076
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010079fi
10080
10081if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010083
10084fi
10085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010086fi
10087
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010088
10089ipv6type=unknown
10090ipv6lib=none
10091ipv6trylibc=no
10092
10093if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10095$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010096 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10097 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010098 case $i in
10099 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010101/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010102
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010103#include <netinet/in.h>
10104#ifdef IPV6_INRIA_VERSION
10105yes
10106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010107_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010109 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010110 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010111fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010112rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010113
10114 ;;
10115 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010117/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010118
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010119#include <netinet/in.h>
10120#ifdef __KAME__
10121yes
10122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010123_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010125 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010126 ipv6type=$i;
10127 ipv6lib=inet6
10128 ipv6libdir=/usr/local/v6/lib
10129 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010130fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010131rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010132
10133 ;;
10134 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010136/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010137
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010138#include <features.h>
10139#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10140yes
10141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010142_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010144 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010145 ipv6type=$i;
10146 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010147fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010148rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010149
10150 ;;
10151 linux-inet6)
10152 if test -d /usr/inet6; then
10153 ipv6type=$i
10154 ipv6lib=inet6
10155 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010156 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010157 fi
10158 ;;
10159 solaris)
10160 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010161 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010162 ipv6type=$i
10163 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010164 fi
10165 fi
10166 ;;
10167 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010169/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010170
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010171#include <sys/param.h>
10172#ifdef _TOSHIBA_INET6
10173yes
10174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010175_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010177 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010178 ipv6type=$i;
10179 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010180 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010181fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010182rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010183
10184 ;;
10185 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010187/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010188
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010189#include </usr/local/v6/include/sys/v6config.h>
10190#ifdef __V6D__
10191yes
10192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010193_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010194if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010196 ipv6type=$i;
10197 ipv6lib=v6;
10198 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010199 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010200fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010201rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010202
10203 ;;
10204 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010206/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010207
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010208#include <sys/param.h>
10209#ifdef _ZETA_MINAMI_INET6
10210yes
10211#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010212_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010213if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010215 ipv6type=$i;
10216 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010217 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010218fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010219rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010220
10221 ;;
10222 esac
10223 if test "$ipv6type" != "unknown"; then
10224 break
10225 fi
10226 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10228$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229fi
10230
10231if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10232 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10233 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10234 echo "using lib$ipv6lib"
10235 else
10236 if test $ipv6trylibc = "yes"; then
10237 echo "using libc"
10238 else
10239 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10240 echo "You need to fetch lib$ipv6lib.a from appropriate"
10241 echo 'ipv6 kit and compile beforehand.'
10242 exit 1
10243 fi
10244 fi
10245fi
10246
Matthias Kloseb9621712010-04-24 17:59:49 +000010247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10248$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010250/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010251
10252 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010253int
10254main ()
10255{
10256FSIORefNum fRef = 0
10257 ;
10258 return 0;
10259}
Matthias Kloseb159a552010-04-25 21:00:44 +000010260
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010262if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010263
Matthias Kloseb159a552010-04-25 21:00:44 +000010264
Matthias Kloseb9621712010-04-24 17:59:49 +000010265$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010266
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10268$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010269
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010270else
Matthias Kloseb159a552010-04-25 21:00:44 +000010271
Matthias Kloseb9621712010-04-24 17:59:49 +000010272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10273$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010274
10275fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10277
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010278# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10280$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010283if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010284 withval=$with_doc_strings;
10285fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010286
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010287
10288if test -z "$with_doc_strings"
10289then with_doc_strings="yes"
10290fi
10291if test "$with_doc_strings" != "no"
10292then
10293
Matthias Kloseb9621712010-04-24 17:59:49 +000010294$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010295
10296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10298$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010299
Antoine Pitrou042b1282010-08-13 21:15:58 +000010300# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10302$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010305if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010306 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010307if test "$withval" != no
10308then
10309
Matthias Kloseb9621712010-04-24 17:59:49 +000010310$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010311
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10313$as_echo "yes" >&6; }
10314else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010316fi
10317else
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10319$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010320fi
10321
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010322
10323# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10325$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010327# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010328if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329 withval=$with_pymalloc;
10330fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010331
Neil Schemenauera35c6882001-02-27 04:45:05 +000010332
Neil Schemenauer16c22972002-03-22 15:34:49 +000010333if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010334then
10335 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010336fi
10337if test "$with_pymalloc" != "no"
10338then
Martin v. Löwis11437992002-04-12 09:54:03 +000010339
Matthias Kloseb9621712010-04-24 17:59:49 +000010340$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010341
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010342 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10345$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010346
Benjamin Peterson05159c42009-12-03 03:01:27 +000010347# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10349$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010350
10351# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010352if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010353 withval=$with_valgrind;
10354else
10355 with_valgrind=no
10356fi
10357
Matthias Kloseb9621712010-04-24 17:59:49 +000010358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10359$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010360if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 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 +020010362if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010363
Matthias Kloseb9621712010-04-24 17:59:49 +000010364$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010365
10366else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010367 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010368
10369fi
10370
10371
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010372 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010373fi
10374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010375# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010376
Guido van Rossum98935bf2001-09-05 19:13:16 +000010377DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010378
Guido van Rossume97ee181999-12-20 21:27:22 +000010379# the dlopen() function means we might want to use dynload_shlib.o. some
10380# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010381for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010382do :
10383 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010384if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010385 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010386#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010387_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010388
Guido van Rossume97ee181999-12-20 21:27:22 +000010389fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010390done
Guido van Rossume97ee181999-12-20 21:27:22 +000010391
Michael W. Hudson54241132001-12-07 15:38:26 +000010392
Guido van Rossume97ee181999-12-20 21:27:22 +000010393# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10394# loading of modules.
10395
Matthias Kloseb9621712010-04-24 17:59:49 +000010396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10397$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010398if test -z "$DYNLOADFILE"
10399then
10400 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010401 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10402 if test "$ac_cv_func_dlopen" = yes
10403 then DYNLOADFILE="dynload_shlib.o"
10404 else DYNLOADFILE="dynload_aix.o"
10405 fi
10406 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010407 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010408 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10409 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010410 *)
10411 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10412 # out any dynamic loading
10413 if test "$ac_cv_func_dlopen" = yes
10414 then DYNLOADFILE="dynload_shlib.o"
10415 else DYNLOADFILE="dynload_stub.o"
10416 fi
10417 ;;
10418 esac
10419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10421$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010422if test "$DYNLOADFILE" != "dynload_stub.o"
10423then
Martin v. Löwis11437992002-04-12 09:54:03 +000010424
Matthias Kloseb9621712010-04-24 17:59:49 +000010425$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010426
10427fi
10428
Neil Schemenauer4e425612001-06-19 15:44:15 +000010429# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10430
Michael W. Hudson54241132001-12-07 15:38:26 +000010431
Matthias Kloseb9621712010-04-24 17:59:49 +000010432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10433$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010434if test -z "$MACHDEP_OBJS"
10435then
Jack Jansene578a632001-08-15 01:27:14 +000010436 MACHDEP_OBJS=$extra_machdep_objs
10437else
10438 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010439fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010440if test -z "$MACHDEP_OBJS"; then
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10442$as_echo "none" >&6; }
10443else
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10445$as_echo "$MACHDEP_OBJS" >&6; }
10446fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010447
Guido van Rossum627b2d71993-12-24 10:39:16 +000010448# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010449for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010450 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010451 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010452 futimens futimes gai_strerror \
10453 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010454 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010455 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010456 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10457 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010458 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010459 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010460 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010461 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010462 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010463 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010464 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10465 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010466 sigaction sigaltstack siginterrupt sigpending sigrelse \
10467 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010468 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010469 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010470 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010471do :
10472 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10473ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010474if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010475 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010476#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010477_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010478
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010479fi
10480done
10481
Michael W. Hudson54241132001-12-07 15:38:26 +000010482
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010483ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10484 #include <dirent.h>
10485"
10486if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10487
10488$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10489
10490fi
10491
10492
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010493# For some functions, having a definition is not sufficient, since
10494# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10496$as_echo_n "checking for chroot... " >&6; }
10497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010498/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010499#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010500int
10501main ()
10502{
10503void *x=chroot
10504 ;
10505 return 0;
10506}
10507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010508if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010509
Matthias Kloseb9621712010-04-24 17:59:49 +000010510$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010511
Matthias Kloseb159a552010-04-25 21:00:44 +000010512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010513$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010514else
Matthias Kloseb9621712010-04-24 17:59:49 +000010515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010517
10518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10521$as_echo_n "checking for link... " >&6; }
10522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010523/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010524#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010525int
10526main ()
10527{
10528void *x=link
10529 ;
10530 return 0;
10531}
10532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010533if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010534
Matthias Kloseb9621712010-04-24 17:59:49 +000010535$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010536
Matthias Kloseb159a552010-04-25 21:00:44 +000010537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010538$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010539else
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10541$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010542
10543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10546$as_echo_n "checking for symlink... " >&6; }
10547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010548/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010549#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010550int
10551main ()
10552{
10553void *x=symlink
10554 ;
10555 return 0;
10556}
10557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010559
Matthias Kloseb9621712010-04-24 17:59:49 +000010560$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010561
Matthias Kloseb159a552010-04-25 21:00:44 +000010562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010563$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010564else
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10566$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010567
10568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10571$as_echo_n "checking for fchdir... " >&6; }
10572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010573/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010574#include <unistd.h>
10575int
10576main ()
10577{
10578void *x=fchdir
10579 ;
10580 return 0;
10581}
10582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010583if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010584
Matthias Kloseb9621712010-04-24 17:59:49 +000010585$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010586
Matthias Kloseb159a552010-04-25 21:00:44 +000010587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010588$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010589else
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010592
10593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10596$as_echo_n "checking for fsync... " >&6; }
10597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010598/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010599#include <unistd.h>
10600int
10601main ()
10602{
10603void *x=fsync
10604 ;
10605 return 0;
10606}
10607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010608if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010609
Matthias Kloseb9621712010-04-24 17:59:49 +000010610$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010611
Matthias Kloseb159a552010-04-25 21:00:44 +000010612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010613$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010614else
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10616$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010617
10618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10621$as_echo_n "checking for fdatasync... " >&6; }
10622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010623/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010624#include <unistd.h>
10625int
10626main ()
10627{
10628void *x=fdatasync
10629 ;
10630 return 0;
10631}
10632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010633if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010634
Matthias Kloseb9621712010-04-24 17:59:49 +000010635$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010636
Matthias Kloseb159a552010-04-25 21:00:44 +000010637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010638$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010639else
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10641$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010642
10643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10646$as_echo_n "checking for epoll... " >&6; }
10647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010648/* end confdefs.h. */
10649#include <sys/epoll.h>
10650int
10651main ()
10652{
10653void *x=epoll_create
10654 ;
10655 return 0;
10656}
10657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010658if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010659
Matthias Kloseb9621712010-04-24 17:59:49 +000010660$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010661
Matthias Kloseb159a552010-04-25 21:00:44 +000010662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010663$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010664else
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10666$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010667
10668fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10671$as_echo_n "checking for epoll_create1... " >&6; }
10672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10673/* end confdefs.h. */
10674#include <sys/epoll.h>
10675int
10676main ()
10677{
10678void *x=epoll_create1
10679 ;
10680 return 0;
10681}
10682_ACEOF
10683if ac_fn_c_try_compile "$LINENO"; then :
10684
10685$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10686
10687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10688$as_echo "yes" >&6; }
10689else
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10691$as_echo "no" >&6; }
10692
10693fi
10694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10696$as_echo_n "checking for kqueue... " >&6; }
10697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010698/* end confdefs.h. */
10699
10700#include <sys/types.h>
10701#include <sys/event.h>
10702
10703int
10704main ()
10705{
10706int x=kqueue()
10707 ;
10708 return 0;
10709}
10710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010711if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010714
Matthias Kloseb159a552010-04-25 21:00:44 +000010715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010716$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010717else
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10719$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010720
10721fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10724$as_echo_n "checking for prlimit... " >&6; }
10725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10726/* end confdefs.h. */
10727
10728#include <sys/time.h>
10729#include <sys/resource.h>
10730
10731int
10732main ()
10733{
10734void *x=prlimit
10735 ;
10736 return 0;
10737}
10738_ACEOF
10739if ac_fn_c_try_compile "$LINENO"; then :
10740
10741$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10742
10743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10744$as_echo "yes" >&6; }
10745else
10746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10747$as_echo "no" >&6; }
10748
10749fi
10750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10751
Martin v. Löwisd5843682002-11-21 20:41:28 +000010752# On some systems (eg. FreeBSD 5), we would find a definition of the
10753# functions ctermid_r, setgroups in the library, but no prototype
10754# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10755# address to avoid compiler warnings and potential miscompilations
10756# because of the missing prototypes.
10757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10759$as_echo_n "checking for ctermid_r... " >&6; }
10760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010761/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010762
Martin v. Löwisd5843682002-11-21 20:41:28 +000010763#include <stdio.h>
10764
Martin v. Löwisd5843682002-11-21 20:41:28 +000010765int
10766main ()
10767{
10768void* p = ctermid_r
10769 ;
10770 return 0;
10771}
10772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010773if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010776
Matthias Kloseb159a552010-04-25 21:00:44 +000010777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010778$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010779else
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10781$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010782
10783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10785
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10787$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010788if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010789 $as_echo_n "(cached) " >&6
10790else
10791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010792/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010793#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010794int
10795main ()
10796{
10797void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010798
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010799 ;
10800 return 0;
10801}
10802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010803if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010804 ac_cv_flock_decl=yes
10805else
10806 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010807
10808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010810
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010811fi
10812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10813$as_echo "$ac_cv_flock_decl" >&6; }
10814if test "x${ac_cv_flock_decl}" = xyes; then
10815 for ac_func in flock
10816do :
10817 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010818if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010819 cat >>confdefs.h <<_ACEOF
10820#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010821_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010822
Antoine Pitroua3000072010-09-07 14:52:42 +000010823else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010825$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010826if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010827 $as_echo_n "(cached) " >&6
10828else
10829 ac_check_lib_save_LIBS=$LIBS
10830LIBS="-lbsd $LIBS"
10831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10832/* end confdefs.h. */
10833
10834/* Override any GCC internal prototype to avoid an error.
10835 Use char because int might match the return type of a GCC
10836 builtin and then its argument prototype would still apply. */
10837#ifdef __cplusplus
10838extern "C"
10839#endif
10840char flock ();
10841int
10842main ()
10843{
10844return flock ();
10845 ;
10846 return 0;
10847}
10848_ACEOF
10849if ac_fn_c_try_link "$LINENO"; then :
10850 ac_cv_lib_bsd_flock=yes
10851else
10852 ac_cv_lib_bsd_flock=no
10853fi
10854rm -f core conftest.err conftest.$ac_objext \
10855 conftest$ac_exeext conftest.$ac_ext
10856LIBS=$ac_check_lib_save_LIBS
10857fi
10858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10859$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010860if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010861 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010862
10863
10864$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10865
10866
10867fi
10868
10869
10870fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010871done
10872
Antoine Pitroua3000072010-09-07 14:52:42 +000010873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010874
Matthias Kloseb9621712010-04-24 17:59:49 +000010875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10876$as_echo_n "checking for getpagesize... " >&6; }
10877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010878/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010879
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010880#include <unistd.h>
10881
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010882int
10883main ()
10884{
10885void* p = getpagesize
10886 ;
10887 return 0;
10888}
10889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010890if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010893
Matthias Kloseb159a552010-04-25 21:00:44 +000010894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010895$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010896else
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10898$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010899
10900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010902
Victor Stinner984890f2011-11-24 13:53:38 +010010903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10904$as_echo_n "checking for broken unsetenv... " >&6; }
10905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10906/* end confdefs.h. */
10907
10908#include <stdlib.h>
10909
10910int
10911main ()
10912{
10913int res = unsetenv("DUMMY")
10914 ;
10915 return 0;
10916}
10917_ACEOF
10918if ac_fn_c_try_compile "$LINENO"; then :
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10920$as_echo "no" >&6; }
10921else
10922
10923$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10924
10925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10926$as_echo "yes" >&6; }
10927
10928fi
10929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10930
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010931for ac_prog in true
10932do
10933 # Extract the first word of "$ac_prog", so it can be a program name with args.
10934set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10936$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010937if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010939else
10940 if test -n "$TRUE"; then
10941 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10942else
10943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10944for as_dir in $PATH
10945do
10946 IFS=$as_save_IFS
10947 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010949 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010950 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 $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 +000010952 break 2
10953 fi
10954done
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010956IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010957
10958fi
10959fi
10960TRUE=$ac_cv_prog_TRUE
10961if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10963$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010964else
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10966$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010967fi
10968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010970 test -n "$TRUE" && break
10971done
10972test -n "$TRUE" || TRUE="/bin/true"
10973
10974
Matthias Kloseb9621712010-04-24 17:59:49 +000010975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10976$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010977if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010979else
10980 ac_check_lib_save_LIBS=$LIBS
10981LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010983/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010985/* Override any GCC internal prototype to avoid an error.
10986 Use char because int might match the return type of a GCC
10987 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010988#ifdef __cplusplus
10989extern "C"
10990#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010991char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010992int
10993main ()
10994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010996 ;
10997 return 0;
10998}
10999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011000if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011001 ac_cv_lib_c_inet_aton=yes
11002else
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011005rm -f core conftest.err conftest.$ac_objext \
11006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011007LIBS=$ac_check_lib_save_LIBS
11008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11010$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011011if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011012 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011013else
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11015$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011016if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011017 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011018else
11019 ac_check_lib_save_LIBS=$LIBS
11020LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011022/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024/* Override any GCC internal prototype to avoid an error.
11025 Use char because int might match the return type of a GCC
11026 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011027#ifdef __cplusplus
11028extern "C"
11029#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011030char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011031int
11032main ()
11033{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011035 ;
11036 return 0;
11037}
11038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011039if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011040 ac_cv_lib_resolv_inet_aton=yes
11041else
Matthias Kloseb9621712010-04-24 17:59:49 +000011042 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011044rm -f core conftest.err conftest.$ac_objext \
11045 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011046LIBS=$ac_check_lib_save_LIBS
11047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11049$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011050if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011051 cat >>confdefs.h <<_ACEOF
11052#define HAVE_LIBRESOLV 1
11053_ACEOF
11054
11055 LIBS="-lresolv $LIBS"
11056
11057fi
11058
11059
11060fi
11061
11062
Christian Heimesd0764e22007-12-04 15:00:33 +000011063# On Tru64, chflags seems to be present, but calling it will
11064# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11066$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011067if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011068 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011069else
Matthias Kloseb9621712010-04-24 17:59:49 +000011070 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011071 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011072else
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011074/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011075
Christian Heimesd0764e22007-12-04 15:00:33 +000011076#include <sys/stat.h>
11077#include <unistd.h>
11078int main(int argc, char*argv[])
11079{
11080 if(chflags(argv[0], 0) != 0)
11081 return 1;
11082 return 0;
11083}
Ned Deily3eb67d52011-06-28 00:00:28 -070011084
Christian Heimesd0764e22007-12-04 15:00:33 +000011085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011086if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011087 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011088else
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011093fi
11094
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011095
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11098$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011099if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011101if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011102 ac_cv_have_chflags="yes"
11103else
11104 ac_cv_have_chflags="no"
11105fi
11106
11107fi
11108if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011109
Matthias Kloseb9621712010-04-24 17:59:49 +000011110$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011111
11112fi
11113
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11115$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011116if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011118else
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011120 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011121else
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011123/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011124
Christian Heimesd0764e22007-12-04 15:00:33 +000011125#include <sys/stat.h>
11126#include <unistd.h>
11127int main(int argc, char*argv[])
11128{
11129 if(lchflags(argv[0], 0) != 0)
11130 return 1;
11131 return 0;
11132}
Ned Deily3eb67d52011-06-28 00:00:28 -070011133
Christian Heimesd0764e22007-12-04 15:00:33 +000011134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011135if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011136 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011137else
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11141 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011142fi
11143
11144
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11147$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011148if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011149 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011150if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011151 ac_cv_have_lchflags="yes"
11152else
11153 ac_cv_have_lchflags="no"
11154fi
11155
11156fi
11157if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011158
Matthias Kloseb9621712010-04-24 17:59:49 +000011159$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011160
11161fi
11162
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011163case $ac_sys_system/$ac_sys_release in
11164Darwin/*)
11165 _CUR_CFLAGS="${CFLAGS}"
11166 _CUR_LDFLAGS="${LDFLAGS}"
11167 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11168 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11169 ;;
11170esac
11171
Matthias Kloseb9621712010-04-24 17:59:49 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11173$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011174if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011175 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011176else
11177 ac_check_lib_save_LIBS=$LIBS
11178LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011180/* end confdefs.h. */
11181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011182/* Override any GCC internal prototype to avoid an error.
11183 Use char because int might match the return type of a GCC
11184 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011185#ifdef __cplusplus
11186extern "C"
11187#endif
11188char inflateCopy ();
11189int
11190main ()
11191{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011192return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011193 ;
11194 return 0;
11195}
11196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011197if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011198 ac_cv_lib_z_inflateCopy=yes
11199else
Matthias Kloseb9621712010-04-24 17:59:49 +000011200 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011202rm -f core conftest.err conftest.$ac_objext \
11203 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011204LIBS=$ac_check_lib_save_LIBS
11205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11207$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011208if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011209
Matthias Kloseb9621712010-04-24 17:59:49 +000011210$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011211
11212fi
11213
11214
11215case $ac_sys_system/$ac_sys_release in
11216Darwin/*)
11217 CFLAGS="${_CUR_CFLAGS}"
11218 LDFLAGS="${_CUR_LDFLAGS}"
11219 ;;
11220esac
11221
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11223$as_echo_n "checking for hstrerror... " >&6; }
11224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011225/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011226
Martin v. Löwise9416172003-05-03 10:12:45 +000011227#include <netdb.h>
11228
Martin v. Löwise9416172003-05-03 10:12:45 +000011229int
11230main ()
11231{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011232void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011233 ;
11234 return 0;
11235}
11236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011237if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011240
Matthias Kloseb159a552010-04-25 21:00:44 +000011241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011242$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011243else
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11245$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011246
11247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011248rm -f core conftest.err conftest.$ac_objext \
11249 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250
Matthias Kloseb9621712010-04-24 17:59:49 +000011251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11252$as_echo_n "checking for inet_aton... " >&6; }
11253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011254/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011255
Martin v. Löwis86d66262006-02-17 08:40:11 +000011256#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011257#include <sys/socket.h>
11258#include <netinet/in.h>
11259#include <arpa/inet.h>
11260
Martin v. Löwise9416172003-05-03 10:12:45 +000011261int
11262main ()
11263{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011264void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011272
Matthias Kloseb159a552010-04-25 21:00:44 +000011273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011274$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011275else
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011278
11279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011280rm -f core conftest.err conftest.$ac_objext \
11281 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011282
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11284$as_echo_n "checking for inet_pton... " >&6; }
11285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011286/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011287
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011288#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011289#include <sys/socket.h>
11290#include <netinet/in.h>
11291#include <arpa/inet.h>
11292
Martin v. Löwise9416172003-05-03 10:12:45 +000011293int
11294main ()
11295{
11296void* p = inet_pton
11297 ;
11298 return 0;
11299}
11300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011304
Matthias Kloseb159a552010-04-25 21:00:44 +000011305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011306$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011307else
Matthias Kloseb9621712010-04-24 17:59:49 +000011308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011310
11311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011313
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011314# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11316$as_echo_n "checking for setgroups... " >&6; }
11317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011318/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011319
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011320#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011321#ifdef HAVE_GRP_H
11322#include <grp.h>
11323#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011324
Martin v. Löwisd5843682002-11-21 20:41:28 +000011325int
11326main ()
11327{
11328void* p = setgroups
11329 ;
11330 return 0;
11331}
11332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011334
Matthias Kloseb9621712010-04-24 17:59:49 +000011335$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011336
Matthias Kloseb159a552010-04-25 21:00:44 +000011337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011338$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011339else
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011342
11343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011345
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011346# check for openpty and forkpty
11347
11348for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011349do :
11350 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011351if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011353#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011354_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011355
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011356else
Matthias Kloseb9621712010-04-24 17:59:49 +000011357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11358$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011359if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011361else
Martin v. Löwis11437992002-04-12 09:54:03 +000011362 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011363LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011367/* Override any GCC internal prototype to avoid an error.
11368 Use char because int might match the return type of a GCC
11369 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011370#ifdef __cplusplus
11371extern "C"
11372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011373char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011374int
11375main ()
11376{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011377return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 ;
11379 return 0;
11380}
11381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011382if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011384else
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011387rm -f core conftest.err conftest.$ac_objext \
11388 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011389LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11392$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011393if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011394 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011395 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011396else
Matthias Kloseb9621712010-04-24 17:59:49 +000011397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11398$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011399if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011401else
11402 ac_check_lib_save_LIBS=$LIBS
11403LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011405/* end confdefs.h. */
11406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407/* Override any GCC internal prototype to avoid an error.
11408 Use char because int might match the return type of a GCC
11409 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011410#ifdef __cplusplus
11411extern "C"
11412#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011413char openpty ();
11414int
11415main ()
11416{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011417return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011418 ;
11419 return 0;
11420}
11421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011422if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011423 ac_cv_lib_bsd_openpty=yes
11424else
Matthias Kloseb9621712010-04-24 17:59:49 +000011425 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011427rm -f core conftest.err conftest.$ac_objext \
11428 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011429LIBS=$ac_check_lib_save_LIBS
11430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11432$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011433if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011434 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011435 LIBS="$LIBS -lbsd"
11436fi
11437
11438
11439fi
11440
Fred Drake8cef4cf2000-06-28 16:40:38 +000011441
11442fi
11443done
11444
11445for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011446do :
11447 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011448if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011450#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011451_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011452
Fred Drake8cef4cf2000-06-28 16:40:38 +000011453else
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11455$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011456if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011457 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011458else
Martin v. Löwis11437992002-04-12 09:54:03 +000011459 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011460LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464/* Override any GCC internal prototype to avoid an error.
11465 Use char because int might match the return type of a GCC
11466 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011467#ifdef __cplusplus
11468extern "C"
11469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011470char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011471int
11472main ()
11473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011474return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 ;
11476 return 0;
11477}
11478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011479if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011480 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011481else
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011484rm -f core conftest.err conftest.$ac_objext \
11485 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011486LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11489$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011490if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011492 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011493else
Matthias Kloseb9621712010-04-24 17:59:49 +000011494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11495$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011496if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011497 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011498else
11499 ac_check_lib_save_LIBS=$LIBS
11500LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011502/* end confdefs.h. */
11503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504/* Override any GCC internal prototype to avoid an error.
11505 Use char because int might match the return type of a GCC
11506 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011507#ifdef __cplusplus
11508extern "C"
11509#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011510char forkpty ();
11511int
11512main ()
11513{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011515 ;
11516 return 0;
11517}
11518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011519if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011520 ac_cv_lib_bsd_forkpty=yes
11521else
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011524rm -f core conftest.err conftest.$ac_objext \
11525 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011526LIBS=$ac_check_lib_save_LIBS
11527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11529$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011530if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011532 LIBS="$LIBS -lbsd"
11533fi
11534
11535
11536fi
11537
Fred Drake8cef4cf2000-06-28 16:40:38 +000011538
11539fi
11540done
11541
Jack Jansendd19cf82001-12-06 22:36:17 +000011542
Christian Heimesb186d002008-03-18 15:15:01 +000011543# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011544for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011545do :
11546 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011547if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011548 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011549#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011550_ACEOF
11551
11552fi
11553done
11554
11555
Michael W. Hudson54241132001-12-07 15:38:26 +000011556# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011557for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011558do :
11559 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11560ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011561if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011563#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011564_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011565
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011566fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011567done
11568
Michael W. Hudson54241132001-12-07 15:38:26 +000011569
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011570ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011571if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011572 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011573
Martin v. Löwis1142de32002-03-29 16:28:31 +000011574else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011575 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011576 *" dup2.$ac_objext "* ) ;;
11577 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011579esac
11580
Martin v. Löwis1142de32002-03-29 16:28:31 +000011581fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011582
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011583ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011584if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011585 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11586
11587else
11588 case " $LIBOBJS " in
11589 *" strdup.$ac_objext "* ) ;;
11590 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11591 ;;
11592esac
11593
11594fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011595
11596
11597for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011598do :
11599 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011600if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011601 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011602#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011605/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011606#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011607int
11608main ()
11609{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011610getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011611 ;
11612 return 0;
11613}
11614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011615if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011616
Matthias Kloseb9621712010-04-24 17:59:49 +000011617$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011618
Guido van Rossum627b2d71993-12-24 10:39:16 +000011619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011621
Guido van Rossum627b2d71993-12-24 10:39:16 +000011622fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011623done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011624
Jack Jansen150753c2003-03-29 22:07:47 +000011625for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011626do :
11627 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011628if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011629 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011630#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011633/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011634#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011635int
11636main ()
11637{
11638setpgrp(0,0);
11639 ;
11640 return 0;
11641}
11642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011643if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011646
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011649
11650fi
11651done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011652
Thomas Wouters3a584202000-08-05 23:28:51 +000011653for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011654do :
11655 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011656if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011658#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011661/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011662#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011663int
11664main ()
11665{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011666gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 ;
11668 return 0;
11669}
11670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011671if ac_fn_c_try_compile "$LINENO"; then :
11672
Guido van Rossum627b2d71993-12-24 10:39:16 +000011673else
Skip Montanaro6dead952003-09-25 14:50:04 +000011674
Matthias Kloseb9621712010-04-24 17:59:49 +000011675$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011676
Martin v. Löwis11437992002-04-12 09:54:03 +000011677
Guido van Rossum627b2d71993-12-24 10:39:16 +000011678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011680
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011681fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011682done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011683
Michael W. Hudson54241132001-12-07 15:38:26 +000011684
Victor Stinnere0be4232011-10-25 13:06:09 +020011685for ac_func in clock_gettime
11686do :
11687 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11688if test "x$ac_cv_func_clock_gettime" = xyes; then :
11689 cat >>confdefs.h <<_ACEOF
11690#define HAVE_CLOCK_GETTIME 1
11691_ACEOF
11692
11693else
11694
11695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11696$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11697if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11698 $as_echo_n "(cached) " >&6
11699else
11700 ac_check_lib_save_LIBS=$LIBS
11701LIBS="-lrt $LIBS"
11702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11703/* end confdefs.h. */
11704
11705/* Override any GCC internal prototype to avoid an error.
11706 Use char because int might match the return type of a GCC
11707 builtin and then its argument prototype would still apply. */
11708#ifdef __cplusplus
11709extern "C"
11710#endif
11711char clock_gettime ();
11712int
11713main ()
11714{
11715return clock_gettime ();
11716 ;
11717 return 0;
11718}
11719_ACEOF
11720if ac_fn_c_try_link "$LINENO"; then :
11721 ac_cv_lib_rt_clock_gettime=yes
11722else
11723 ac_cv_lib_rt_clock_gettime=no
11724fi
11725rm -f core conftest.err conftest.$ac_objext \
11726 conftest$ac_exeext conftest.$ac_ext
11727LIBS=$ac_check_lib_save_LIBS
11728fi
11729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11730$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11731if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11732
11733 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11734
11735
11736$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11737
11738
11739fi
11740
11741
11742fi
11743done
11744
11745
11746for ac_func in clock_getres
11747do :
11748 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11749if test "x$ac_cv_func_clock_getres" = xyes; then :
11750 cat >>confdefs.h <<_ACEOF
11751#define HAVE_CLOCK_GETRES 1
11752_ACEOF
11753
11754else
11755
11756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11757$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11758if ${ac_cv_lib_rt_clock_getres+:} false; then :
11759 $as_echo_n "(cached) " >&6
11760else
11761 ac_check_lib_save_LIBS=$LIBS
11762LIBS="-lrt $LIBS"
11763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11764/* end confdefs.h. */
11765
11766/* Override any GCC internal prototype to avoid an error.
11767 Use char because int might match the return type of a GCC
11768 builtin and then its argument prototype would still apply. */
11769#ifdef __cplusplus
11770extern "C"
11771#endif
11772char clock_getres ();
11773int
11774main ()
11775{
11776return clock_getres ();
11777 ;
11778 return 0;
11779}
11780_ACEOF
11781if ac_fn_c_try_link "$LINENO"; then :
11782 ac_cv_lib_rt_clock_getres=yes
11783else
11784 ac_cv_lib_rt_clock_getres=no
11785fi
11786rm -f core conftest.err conftest.$ac_objext \
11787 conftest$ac_exeext conftest.$ac_ext
11788LIBS=$ac_check_lib_save_LIBS
11789fi
11790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11791$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11792if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11793
11794 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11795
11796
11797fi
11798
11799
11800fi
11801done
11802
11803
Matthias Kloseb9621712010-04-24 17:59:49 +000011804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11805$as_echo_n "checking for major... " >&6; }
11806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011807/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011808
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011809#if defined(MAJOR_IN_MKDEV)
11810#include <sys/mkdev.h>
11811#elif defined(MAJOR_IN_SYSMACROS)
11812#include <sys/sysmacros.h>
11813#else
11814#include <sys/types.h>
11815#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011816
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011817int
11818main ()
11819{
11820
11821 makedev(major(0),minor(0));
11822
11823 ;
11824 return 0;
11825}
11826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011827if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011828
11829
Matthias Kloseb9621712010-04-24 17:59:49 +000011830$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11833$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011834
11835else
Skip Montanaro6dead952003-09-25 14:50:04 +000011836
Matthias Kloseb9621712010-04-24 17:59:49 +000011837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11838$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011839
11840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011841rm -f core conftest.err conftest.$ac_objext \
11842 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011843
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011844# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011845# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11847$as_echo_n "checking for getaddrinfo... " >&6; }
11848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011849/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011850
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011851#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011852#include <sys/socket.h>
11853#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011854#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011855
Martin v. Löwis11437992002-04-12 09:54:03 +000011856int
11857main ()
11858{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011859getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011860 ;
11861 return 0;
11862}
11863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011864if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011865 have_getaddrinfo=yes
11866else
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011869rm -f core conftest.err conftest.$ac_objext \
11870 conftest$ac_exeext conftest.$ac_ext
11871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11872$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011873if test $have_getaddrinfo = yes
11874then
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11876$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011877 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011881
11882if test "${enable_ipv6+set}" = set; then
11883 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11884else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011885 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011886fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011887else
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011889/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011890
Stefan Krah19c21392012-11-22 23:47:32 +010011891#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011892#include <sys/types.h>
11893#include <netdb.h>
11894#include <string.h>
11895#include <sys/socket.h>
11896#include <netinet/in.h>
11897
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011898int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011899{
11900 int passive, gaierr, inet4 = 0, inet6 = 0;
11901 struct addrinfo hints, *ai, *aitop;
11902 char straddr[INET6_ADDRSTRLEN], strport[16];
11903
11904 for (passive = 0; passive <= 1; passive++) {
11905 memset(&hints, 0, sizeof(hints));
11906 hints.ai_family = AF_UNSPEC;
11907 hints.ai_flags = passive ? AI_PASSIVE : 0;
11908 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011909 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011910 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11911 (void)gai_strerror(gaierr);
11912 goto bad;
11913 }
11914 for (ai = aitop; ai; ai = ai->ai_next) {
11915 if (ai->ai_addr == NULL ||
11916 ai->ai_addrlen == 0 ||
11917 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11918 straddr, sizeof(straddr), strport, sizeof(strport),
11919 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11920 goto bad;
11921 }
11922 switch (ai->ai_family) {
11923 case AF_INET:
11924 if (strcmp(strport, "54321") != 0) {
11925 goto bad;
11926 }
11927 if (passive) {
11928 if (strcmp(straddr, "0.0.0.0") != 0) {
11929 goto bad;
11930 }
11931 } else {
11932 if (strcmp(straddr, "127.0.0.1") != 0) {
11933 goto bad;
11934 }
11935 }
11936 inet4++;
11937 break;
11938 case AF_INET6:
11939 if (strcmp(strport, "54321") != 0) {
11940 goto bad;
11941 }
11942 if (passive) {
11943 if (strcmp(straddr, "::") != 0) {
11944 goto bad;
11945 }
11946 } else {
11947 if (strcmp(straddr, "::1") != 0) {
11948 goto bad;
11949 }
11950 }
11951 inet6++;
11952 break;
11953 case AF_UNSPEC:
11954 goto bad;
11955 break;
11956 default:
11957 /* another family support? */
11958 break;
11959 }
11960 }
11961 }
11962
11963 if (!(inet4 == 0 || inet4 == 2))
11964 goto bad;
11965 if (!(inet6 == 0 || inet6 == 2))
11966 goto bad;
11967
11968 if (aitop)
11969 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011970 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011971
11972 bad:
11973 if (aitop)
11974 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011975 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011976}
11977
Martin v. Löwis11437992002-04-12 09:54:03 +000011978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011979if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011980 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011981else
Matthias Kloseb9621712010-04-24 17:59:49 +000011982 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011983fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11985 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011987
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011988fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011989
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11993$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11994
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011995if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011996then
11997 if test $ipv6 = yes
11998 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011999 echo 'Fatal: You must get working getaddrinfo() function.'
12000 echo ' or you can specify "--disable-ipv6"'.
12001 exit 1
12002 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012003else
Martin v. Löwis11437992002-04-12 09:54:03 +000012004
Matthias Kloseb9621712010-04-24 17:59:49 +000012005$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012006
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012007fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012008
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012009for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012010do :
12011 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012012if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012013 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012014#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012015_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012016
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012017fi
12018done
12019
Michael W. Hudson54241132001-12-07 15:38:26 +000012020
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012021# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12023$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012024if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012026else
Matthias Kloseb9621712010-04-24 17:59:49 +000012027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012028/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012029#include <sys/types.h>
12030#include <sys/time.h>
12031#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012032
Martin v. Löwis11437992002-04-12 09:54:03 +000012033int
12034main ()
12035{
12036if ((struct tm *) 0)
12037return 0;
12038 ;
12039 return 0;
12040}
12041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012042if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012043 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012044else
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12050$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012051if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012054
12055fi
12056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12058$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012059if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012061else
Matthias Kloseb9621712010-04-24 17:59:49 +000012062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012064#include <sys/types.h>
12065#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012066
Martin v. Löwis11437992002-04-12 09:54:03 +000012067int
12068main ()
12069{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012070struct tm tm;
12071 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012073 ;
12074 return 0;
12075}
12076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012077if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012078 ac_cv_struct_tm=time.h
12079else
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12085$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012086if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089
12090fi
12091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092ac_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 +000012093#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012094
Matthias Kloseb9621712010-04-24 17:59:49 +000012095"
Victor Stinnere0be4232011-10-25 13:06:09 +020012096if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012097
12098cat >>confdefs.h <<_ACEOF
12099#define HAVE_STRUCT_TM_TM_ZONE 1
12100_ACEOF
12101
12102
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012103fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012104
Martin v. Löwis11437992002-04-12 09:54:03 +000012105if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12106
Matthias Kloseb9621712010-04-24 17:59:49 +000012107$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012108
12109else
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12111"
Victor Stinnere0be4232011-10-25 13:06:09 +020012112if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116fi
12117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012119#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012120_ACEOF
12121
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12123$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012124if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126else
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012128/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012129#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012130#if !HAVE_DECL_TZNAME
12131extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012133
Martin v. Löwis11437992002-04-12 09:54:03 +000012134int
12135main ()
12136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012138 ;
12139 return 0;
12140}
12141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012142if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012143 ac_cv_var_tzname=yes
12144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012147rm -f core conftest.err conftest.$ac_objext \
12148 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12151$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012152 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012153
Matthias Kloseb9621712010-04-24 17:59:49 +000012154$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012155
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156 fi
12157fi
12158
Matthias Kloseb9621712010-04-24 17:59:49 +000012159ac_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 +020012160if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012161
12162cat >>confdefs.h <<_ACEOF
12163#define HAVE_STRUCT_STAT_ST_RDEV 1
12164_ACEOF
12165
12166
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012167fi
12168
Matthias Kloseb9621712010-04-24 17:59:49 +000012169ac_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 +020012170if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012171
Martin v. Löwis11437992002-04-12 09:54:03 +000012172cat >>confdefs.h <<_ACEOF
12173#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12174_ACEOF
12175
12176
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012177fi
12178
Matthias Kloseb9621712010-04-24 17:59:49 +000012179ac_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 +020012180if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012181
12182cat >>confdefs.h <<_ACEOF
12183#define HAVE_STRUCT_STAT_ST_FLAGS 1
12184_ACEOF
12185
12186
12187fi
12188
Matthias Kloseb9621712010-04-24 17:59:49 +000012189ac_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 +020012190if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012191
12192cat >>confdefs.h <<_ACEOF
12193#define HAVE_STRUCT_STAT_ST_GEN 1
12194_ACEOF
12195
12196
12197fi
12198
Matthias Kloseb9621712010-04-24 17:59:49 +000012199ac_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 +020012200if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012201
12202cat >>confdefs.h <<_ACEOF
12203#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12204_ACEOF
12205
12206
12207fi
12208
Matthias Kloseb9621712010-04-24 17:59:49 +000012209ac_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 +020012210if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012211
Martin v. Löwis11437992002-04-12 09:54:03 +000012212cat >>confdefs.h <<_ACEOF
12213#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12214_ACEOF
12215
12216
Matthias Kloseb9621712010-04-24 17:59:49 +000012217$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012218
12219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012221 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012222 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12223 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012224esac
12225
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012226fi
12227
Michael W. Hudson54241132001-12-07 15:38:26 +000012228
Martin v. Löwis11437992002-04-12 09:54:03 +000012229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12231$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012232if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012234else
Matthias Kloseb159a552010-04-25 21:00:44 +000012235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012237/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012238#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012239int
12240main ()
12241{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012242return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 ;
12244 return 0;
12245}
12246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012247if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248 ac_cv_header_time_altzone=yes
12249else
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012254fi
12255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12257$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012258if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012259
Matthias Kloseb9621712010-04-24 17:59:49 +000012260$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012261
12262fi
12263
Guido van Rossumda88dad1995-01-26 00:46:29 +000012264was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12266$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012269
12270#include <sys/types.h>
12271#include <sys/select.h>
12272#include <sys/time.h>
12273
Martin v. Löwis11437992002-04-12 09:54:03 +000012274int
12275main ()
12276{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012277;
Martin v. Löwis11437992002-04-12 09:54:03 +000012278 ;
12279 return 0;
12280}
12281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012283
12284
Matthias Kloseb9621712010-04-24 17:59:49 +000012285$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012286
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012287 was_it_defined=yes
12288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12292$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293
Matthias Kloseb9621712010-04-24 17:59:49 +000012294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12295$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012296if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012298else
Matthias Kloseb9621712010-04-24 17:59:49 +000012299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012300/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012301#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012302int
12303main ()
12304{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012305struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012306 ;
12307 return 0;
12308}
12309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012311 ac_cv_struct_addrinfo=yes
12312else
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12316fi
12317
Matthias Kloseb9621712010-04-24 17:59:49 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12319$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012320if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012321
Matthias Kloseb9621712010-04-24 17:59:49 +000012322$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012323
12324fi
12325
Matthias Kloseb9621712010-04-24 17:59:49 +000012326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12327$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012328if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012330else
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012332/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012333
12334# include <sys/types.h>
12335# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012336int
12337main ()
12338{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012339struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012340 ;
12341 return 0;
12342}
12343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012345 ac_cv_struct_sockaddr_storage=yes
12346else
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12350fi
12351
Matthias Kloseb9621712010-04-24 17:59:49 +000012352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12353$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012354if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012357
12358fi
12359
Guido van Rossum627b2d71993-12-24 10:39:16 +000012360# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12363$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012364if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012366else
Matthias Kloseb9621712010-04-24 17:59:49 +000012367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012369$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012370int
12371main ()
12372{
12373static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012374test_array [0] = 0;
12375return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012376
12377 ;
12378 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012379}
Martin v. Löwis11437992002-04-12 09:54:03 +000012380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012381if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012382 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012383else
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12389$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012390if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012391 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012392
12393fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012394
Matthias Kloseb9621712010-04-24 17:59:49 +000012395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12396$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012397if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012399else
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012401/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012402
Martin v. Löwis11437992002-04-12 09:54:03 +000012403int
12404main ()
12405{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012406
Martin v. Löwis11437992002-04-12 09:54:03 +000012407#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012408 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012409 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012410 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412 char const *const *pcpcc;
12413 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012414 /* NEC SVR4.0.2 mips cc rejects this. */
12415 struct point {int x, y;};
12416 static struct point const zero = {0,0};
12417 /* AIX XL C 1.02.0.0 rejects this.
12418 It does not let you subtract one const X* pointer from another in
12419 an arm of an if-expression whose if-part is not a constant
12420 expression */
12421 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012422 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012423 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012424 ++pcpcc;
12425 ppc = (char**) pcpcc;
12426 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012427 { /* SCO 3.2v4 cc rejects this sort of thing. */
12428 char tx;
12429 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012430 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012431
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012434 }
12435 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12436 int x[] = {25, 17};
12437 const int *foo = &x[0];
12438 ++foo;
12439 }
12440 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12441 typedef const int *iptr;
12442 iptr p = 0;
12443 ++p;
12444 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012445 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012446 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012447 struct s { int j; const int *ap[3]; } bx;
12448 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012449 }
12450 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12451 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012453 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012455#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012456
Martin v. Löwis11437992002-04-12 09:54:03 +000012457 ;
12458 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012459}
Martin v. Löwis11437992002-04-12 09:54:03 +000012460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012461if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012462 ac_cv_c_const=yes
12463else
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12469$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012470if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012471
Matthias Kloseb9621712010-04-24 17:59:49 +000012472$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012473
12474fi
12475
Michael W. Hudson54241132001-12-07 15:38:26 +000012476
Guido van Rossumda88dad1995-01-26 00:46:29 +000012477works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12479$as_echo_n "checking for working volatile... " >&6; }
12480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012481/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012482
Martin v. Löwis11437992002-04-12 09:54:03 +000012483int
12484main ()
12485{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012486volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012487 ;
12488 return 0;
12489}
12490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012491if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012492 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012493else
Skip Montanaro6dead952003-09-25 14:50:04 +000012494
Matthias Kloseb9621712010-04-24 17:59:49 +000012495$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012496
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012497
Guido van Rossum627b2d71993-12-24 10:39:16 +000012498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12501$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012502
Guido van Rossumda88dad1995-01-26 00:46:29 +000012503works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12505$as_echo_n "checking for working signed char... " >&6; }
12506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012507/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012508
Martin v. Löwis11437992002-04-12 09:54:03 +000012509int
12510main ()
12511{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012512signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012513 ;
12514 return 0;
12515}
12516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012517if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012518 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012519else
Skip Montanaro6dead952003-09-25 14:50:04 +000012520
Matthias Kloseb9621712010-04-24 17:59:49 +000012521$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012522
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012523
Guido van Rossum7f43da71994-08-01 12:15:30 +000012524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12527$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012528
Guido van Rossumda88dad1995-01-26 00:46:29 +000012529have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12531$as_echo_n "checking for prototypes... " >&6; }
12532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012533/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012534int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012535int
12536main ()
12537{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 ;
12540 return 0;
12541}
12542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012546
Matthias Kloseb159a552010-04-25 21:00:44 +000012547 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12551$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012552
Guido van Rossumda88dad1995-01-26 00:46:29 +000012553works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12555$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012557/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012558
12559#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012560int foo(int x, ...) {
12561 va_list va;
12562 va_start(va, x);
12563 va_arg(va, int);
12564 va_arg(va, char *);
12565 va_arg(va, double);
12566 return 0;
12567}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012568
Martin v. Löwis11437992002-04-12 09:54:03 +000012569int
12570main ()
12571{
Guido van Rossum90eea071996-08-30 20:58:57 +000012572return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012573 ;
12574 return 0;
12575}
12576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012577if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012578
12579
Matthias Kloseb9621712010-04-24 17:59:49 +000012580$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012581
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012582 works=yes
12583
Guido van Rossum627b2d71993-12-24 10:39:16 +000012584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12587$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012588
Martin v. Löwisd6320502004-08-12 13:45:08 +000012589# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12591$as_echo_n "checking for socketpair... " >&6; }
12592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012593/* end confdefs.h. */
12594
12595#include <sys/types.h>
12596#include <sys/socket.h>
12597
12598int
12599main ()
12600{
12601void *x=socketpair
12602 ;
12603 return 0;
12604}
12605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012606if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012609
Matthias Kloseb159a552010-04-25 21:00:44 +000012610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012611$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012612else
Matthias Kloseb9621712010-04-24 17:59:49 +000012613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12614$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012615
12616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012618
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012619# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12621$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012623/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012624#include <sys/types.h>
12625#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012626int
12627main ()
12628{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012629struct sockaddr x;
12630x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 ;
12632 return 0;
12633}
12634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012635if ac_fn_c_try_compile "$LINENO"; then :
12636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12637$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012638
Matthias Kloseb9621712010-04-24 17:59:49 +000012639$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012640
12641else
Matthias Kloseb9621712010-04-24 17:59:49 +000012642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12643$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012644
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012647
Guido van Rossumda88dad1995-01-26 00:46:29 +000012648va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12650$as_echo_n "checking whether va_list is an array... " >&6; }
12651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012652/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012653
12654#ifdef HAVE_STDARG_PROTOTYPES
12655#include <stdarg.h>
12656#else
12657#include <varargs.h>
12658#endif
12659
Martin v. Löwis11437992002-04-12 09:54:03 +000012660int
12661main ()
12662{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012663va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012664 ;
12665 return 0;
12666}
12667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012668if ac_fn_c_try_compile "$LINENO"; then :
12669
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012670else
Skip Montanaro6dead952003-09-25 14:50:04 +000012671
Martin v. Löwis11437992002-04-12 09:54:03 +000012672
Matthias Kloseb9621712010-04-24 17:59:49 +000012673$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012674
Guido van Rossumda88dad1995-01-26 00:46:29 +000012675 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012676
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12680$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012681
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012682# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012683
12684
Matthias Kloseb9621712010-04-24 17:59:49 +000012685ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012686if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
Matthias Kloseb9621712010-04-24 17:59:49 +000012688 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012689
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12691$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012692 OLD_CFLAGS=$CFLAGS
12693 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012695/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012696
12697# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
Martin v. Löwis11437992002-04-12 09:54:03 +000012699int
12700main ()
12701{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012702
12703 char *name;
12704 struct hostent *he, *res;
12705 char buffer[2048];
12706 int buflen = 2048;
12707 int h_errnop;
12708
12709 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012710
12711 ;
12712 return 0;
12713}
12714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012716
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012718
Martin v. Löwis11437992002-04-12 09:54:03 +000012719
Matthias Kloseb9621712010-04-24 17:59:49 +000012720$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12723$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012725else
Skip Montanaro6dead952003-09-25 14:50:04 +000012726
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12728$as_echo "no" >&6; }
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12730$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012732/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012733
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012734# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012735
Martin v. Löwis11437992002-04-12 09:54:03 +000012736int
12737main ()
12738{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012739
12740 char *name;
12741 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012742 char buffer[2048];
12743 int buflen = 2048;
12744 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012745
Matthias Kloseb159a552010-04-25 21:00:44 +000012746 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012747
12748 ;
12749 return 0;
12750}
12751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012752if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012755
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Matthias Kloseb159a552010-04-25 21:00:44 +000012757$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12760$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012762else
Skip Montanaro6dead952003-09-25 14:50:04 +000012763
Matthias Kloseb9621712010-04-24 17:59:49 +000012764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12765$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12767$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12769/* end confdefs.h. */
12770
12771# include <netdb.h>
12772
12773int
12774main ()
12775{
12776
12777 char *name;
12778 struct hostent *he;
12779 struct hostent_data data;
12780
12781 (void) gethostbyname_r(name, he, &data);
12782
12783 ;
12784 return 0;
12785}
12786_ACEOF
12787if ac_fn_c_try_compile "$LINENO"; then :
12788
12789 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12790
12791
12792$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12793
12794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12795$as_echo "yes" >&6; }
12796
12797else
12798
12799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12800$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012801
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012804
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012807
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012810 CFLAGS=$OLD_CFLAGS
12811
12812else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 for ac_func in gethostbyname
12815do :
12816 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012817if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012818 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012819#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012820_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012821
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012822fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012823done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012824
Michael W. Hudson54241132001-12-07 15:38:26 +000012825
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012826fi
12827
Michael W. Hudson54241132001-12-07 15:38:26 +000012828
12829
12830
12831
12832
12833
Guido van Rossum627b2d71993-12-24 10:39:16 +000012834# checks for system services
12835# (none yet)
12836
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012837# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012838ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012839if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012840
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012841else
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12843$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012844if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012845 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846else
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012848LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852/* Override any GCC internal prototype to avoid an error.
12853 Use char because int might match the return type of a GCC
12854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012855#ifdef __cplusplus
12856extern "C"
12857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012858char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012859int
12860main ()
12861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012862return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 ;
12864 return 0;
12865}
12866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012867if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012869else
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012872rm -f core conftest.err conftest.$ac_objext \
12873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012874LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12877$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012878if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 cat >>confdefs.h <<_ACEOF
12880#define HAVE_LIBIEEE 1
12881_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012882
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012883 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012884
Guido van Rossum627b2d71993-12-24 10:39:16 +000012885fi
12886
Michael W. Hudson54241132001-12-07 15:38:26 +000012887
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012888fi
12889
Michael W. Hudson54241132001-12-07 15:38:26 +000012890
Guido van Rossum7f253911997-05-09 02:42:48 +000012891# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12893$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012896if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012898if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012899then
12900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12904$as_echo "yes" >&6; }
12905else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12906$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012907fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012908else
Matthias Kloseb9621712010-04-24 17:59:49 +000012909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12910$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911fi
12912
Guido van Rossum7f253911997-05-09 02:42:48 +000012913
Guido van Rossum7f43da71994-08-01 12:15:30 +000012914# check for --with-libm=...
12915
Guido van Rossum563e7081996-09-10 18:20:48 +000012916case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012917Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012918*) LIBM=-lm
12919esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12921$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012924if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012926if test "$withval" = no
12927then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12929$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012930elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012931then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12933$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012934else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012935fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012936else
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12938$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939fi
12940
Guido van Rossum7f43da71994-08-01 12:15:30 +000012941
12942# check for --with-libc=...
12943
Matthias Kloseb9621712010-04-24 17:59:49 +000012944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12945$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012948if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012950if test "$withval" = no
12951then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12953$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012954elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012955then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12957$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012958else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012959fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12962$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963fi
12964
Guido van Rossum7f43da71994-08-01 12:15:30 +000012965
Stefan Krah1919b7e2012-03-21 18:25:23 +010012966# **************************************
12967# * Check for gcc x64 inline assembler *
12968# **************************************
12969
12970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12971$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12973/* end confdefs.h. */
12974
12975int
12976main ()
12977{
12978
12979 __asm__ __volatile__ ("movq %rcx, %rax");
12980
12981 ;
12982 return 0;
12983}
12984_ACEOF
12985if ac_fn_c_try_compile "$LINENO"; then :
12986 have_gcc_asm_for_x64=yes
12987else
12988 have_gcc_asm_for_x64=no
12989fi
12990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12992$as_echo "$have_gcc_asm_for_x64" >&6; }
12993if test "$have_gcc_asm_for_x64" = yes
12994then
12995
12996$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12997
12998fi
12999
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013000# **************************************************
13001# * Check for various properties of floating point *
13002# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013003
Matthias Kloseb9621712010-04-24 17:59:49 +000013004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13005$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013006if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013008else
13009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013011 ac_cv_little_endian_double=no
13012else
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013014/* end confdefs.h. */
13015
13016#include <string.h>
13017int main() {
13018 double x = 9006104071832581.0;
13019 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13020 return 0;
13021 else
13022 return 1;
13023}
13024
13025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013026if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013027 ac_cv_little_endian_double=yes
13028else
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13032 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013033fi
13034
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013035fi
13036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13038$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013039if test "$ac_cv_little_endian_double" = yes
13040then
13041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013043
13044fi
13045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13047$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013048if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013049 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013050else
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013053 ac_cv_big_endian_double=no
13054else
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013056/* end confdefs.h. */
13057
13058#include <string.h>
13059int main() {
13060 double x = 9006104071832581.0;
13061 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13062 return 0;
13063 else
13064 return 1;
13065}
13066
13067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013068if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013069 ac_cv_big_endian_double=yes
13070else
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13074 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013075fi
13076
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013077fi
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13080$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013081if test "$ac_cv_big_endian_double" = yes
13082then
13083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013085
13086fi
13087
13088# Some ARM platforms use a mixed-endian representation for doubles.
13089# While Python doesn't currently have full support for these platforms
13090# (see e.g., issue 1762561), we can at least make sure that float <-> string
13091# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13093$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013094if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013096else
13097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013099 ac_cv_mixed_endian_double=no
13100else
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013102/* end confdefs.h. */
13103
13104#include <string.h>
13105int main() {
13106 double x = 9006104071832581.0;
13107 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13108 return 0;
13109 else
13110 return 1;
13111}
13112
13113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013114if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013115 ac_cv_mixed_endian_double=yes
13116else
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13120 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013121fi
13122
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013123fi
13124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13126$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013127if test "$ac_cv_mixed_endian_double" = yes
13128then
13129
Matthias Kloseb9621712010-04-24 17:59:49 +000013130$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013131
13132fi
13133
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013134# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013135# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013136# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013137# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013138# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013139# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013140
13141# This inline assembler syntax may also work for suncc and icc,
13142# so we try it on all platforms.
13143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13145$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013147/* end confdefs.h. */
13148
13149int
13150main ()
13151{
13152
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013153 unsigned short cw;
13154 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13155 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013156
13157 ;
13158 return 0;
13159}
13160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013161if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013162 have_gcc_asm_for_x87=yes
13163else
Matthias Kloseb9621712010-04-24 17:59:49 +000013164 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013165fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13168$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013169if test "$have_gcc_asm_for_x87" = yes
13170then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013171
Matthias Kloseb9621712010-04-24 17:59:49 +000013172$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013173
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013175
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013176# Detect whether system arithmetic is subject to x87-style double
13177# rounding issues. The result of this test has little meaning on non
13178# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13179# mode is round-to-nearest and double rounding issues are present, and
13180# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13182$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013183# $BASECFLAGS may affect the result
13184ac_save_cc="$CC"
13185CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013186if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013187 ac_cv_x87_double_rounding=no
13188else
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013190/* end confdefs.h. */
13191
13192#include <stdlib.h>
13193#include <math.h>
13194int main() {
13195 volatile double x, y, z;
13196 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13197 x = 0.99999999999999989; /* 1-2**-53 */
13198 y = 1./x;
13199 if (y != 1.)
13200 exit(0);
13201 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13202 x = 1e16;
13203 y = 2.99999;
13204 z = x + y;
13205 if (z != 1e16+4.)
13206 exit(0);
13207 /* both tests show evidence of double rounding */
13208 exit(1);
13209}
13210
13211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013212if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013213 ac_cv_x87_double_rounding=no
13214else
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13218 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013219fi
13220
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013221CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13223$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013224if test "$ac_cv_x87_double_rounding" = yes
13225then
13226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013228
13229fi
13230
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013231# ************************************
13232# * Check for mathematical functions *
13233# ************************************
13234
13235LIBS_SAVE=$LIBS
13236LIBS="$LIBS $LIBM"
13237
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013238for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13239do :
13240 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13241ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013242if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013243 cat >>confdefs.h <<_ACEOF
13244#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13245_ACEOF
13246
13247fi
13248done
13249
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013250for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013251do :
13252 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13253ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013254if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013255 cat >>confdefs.h <<_ACEOF
13256#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13257_ACEOF
13258
13259fi
13260done
13261
13262ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13263"
Victor Stinnere0be4232011-10-25 13:06:09 +020013264if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013265 ac_have_decl=1
13266else
13267 ac_have_decl=0
13268fi
13269
13270cat >>confdefs.h <<_ACEOF
13271#define HAVE_DECL_ISINF $ac_have_decl
13272_ACEOF
13273ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13274"
Victor Stinnere0be4232011-10-25 13:06:09 +020013275if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013276 ac_have_decl=1
13277else
13278 ac_have_decl=0
13279fi
13280
13281cat >>confdefs.h <<_ACEOF
13282#define HAVE_DECL_ISNAN $ac_have_decl
13283_ACEOF
13284ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13285"
Victor Stinnere0be4232011-10-25 13:06:09 +020013286if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013287 ac_have_decl=1
13288else
13289 ac_have_decl=0
13290fi
13291
13292cat >>confdefs.h <<_ACEOF
13293#define HAVE_DECL_ISFINITE $ac_have_decl
13294_ACEOF
13295
13296
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013297# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13298# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13300$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013301if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013303else
13304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013306 ac_cv_tanh_preserves_zero_sign=no
13307else
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013309/* end confdefs.h. */
13310
13311#include <math.h>
13312#include <stdlib.h>
13313int main() {
13314 /* return 0 if either negative zeros don't exist
13315 on this platform or if negative zeros exist
13316 and tanh(-0.) == -0. */
13317 if (atan2(0., -1.) == atan2(-0., -1.) ||
13318 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13319 else exit(1);
13320}
13321
13322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013323if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013324 ac_cv_tanh_preserves_zero_sign=yes
13325else
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13329 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013330fi
13331
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013332fi
13333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13335$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013336if test "$ac_cv_tanh_preserves_zero_sign" = yes
13337then
13338
Matthias Kloseb9621712010-04-24 17:59:49 +000013339$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013340
13341fi
13342
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013343if test "$ac_cv_func_log1p" = yes
13344then
13345 # On some versions of AIX, log1p(-0.) returns 0. instead of
13346 # -0. See issue #9920.
13347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13348$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013349 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013350 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013351else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013352
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013353 if test "$cross_compiling" = yes; then :
13354 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013355else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13357/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013358
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013359 #include <math.h>
13360 #include <stdlib.h>
13361 int main() {
13362 /* Fail if the signs of log1p(-0.) and -0. can be
13363 distinguished. */
13364 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13365 return 0;
13366 else
13367 return 1;
13368 }
13369
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013370_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013371if ac_fn_c_try_run "$LINENO"; then :
13372 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013373else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013374 ac_cv_log1p_drops_zero_sign=yes
13375fi
13376rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13377 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013378fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013379
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013380fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013381
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13383$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13384fi
13385if test "$ac_cv_log1p_drops_zero_sign" = yes
13386then
13387
13388$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13389
13390fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013391
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013392LIBS=$LIBS_SAVE
13393
Mark Dickinsona614f042009-11-28 12:48:43 +000013394# For multiprocessing module, check that sem_open
13395# actually works. For FreeBSD versions <= 7.2,
13396# the kernel module that provides POSIX semaphores
13397# isn't loaded by default, so an attempt to call
13398# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13400$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013401if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013403else
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013405 ac_cv_posix_semaphores_enabled=yes
13406else
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013408/* end confdefs.h. */
13409
13410#include <unistd.h>
13411#include <fcntl.h>
13412#include <stdio.h>
13413#include <semaphore.h>
13414#include <sys/stat.h>
13415
13416int main(void) {
13417 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13418 if (a == SEM_FAILED) {
13419 perror("sem_open");
13420 return 1;
13421 }
13422 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013423 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013424 return 0;
13425}
13426
13427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013428if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013429 ac_cv_posix_semaphores_enabled=yes
13430else
Matthias Kloseb9621712010-04-24 17:59:49 +000013431 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13434 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013435fi
13436
13437
Mark Dickinsona614f042009-11-28 12:48:43 +000013438fi
13439
Matthias Kloseb9621712010-04-24 17:59:49 +000013440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13441$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013442if test $ac_cv_posix_semaphores_enabled = no
13443then
13444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013446
13447fi
13448
Mark Dickinson10683072009-04-18 21:18:19 +000013449# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13451$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013452if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013454else
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013456 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013457else
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013459/* end confdefs.h. */
13460
13461#include <unistd.h>
13462#include <fcntl.h>
13463#include <stdio.h>
13464#include <semaphore.h>
13465#include <sys/stat.h>
13466
13467int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013468 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013469 int count;
13470 int res;
13471 if(a==SEM_FAILED){
13472 perror("sem_open");
13473 return 1;
13474
13475 }
13476 res = sem_getvalue(a, &count);
13477 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013478 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013479 return res==-1 ? 1 : 0;
13480}
13481
Mark Dickinson10683072009-04-18 21:18:19 +000013482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013483if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013484 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013485else
Matthias Kloseb9621712010-04-24 17:59:49 +000013486 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13489 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013490fi
13491
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013492
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013493fi
13494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13496$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013497if test $ac_cv_broken_sem_getvalue = yes
13498then
13499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013501
13502fi
13503
Mark Dickinsonbd792642009-03-18 20:06:12 +000013504# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13506$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013507# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013508if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013509 enableval=$enable_big_digits; case $enable_big_digits in
13510yes)
13511 enable_big_digits=30 ;;
13512no)
13513 enable_big_digits=15 ;;
1351415|30)
13515 ;;
13516*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013517 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 +000013518esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13520$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013521
13522cat >>confdefs.h <<_ACEOF
13523#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13524_ACEOF
13525
13526
13527else
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13529$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013530fi
13531
13532
Guido van Rossumef2255b2000-03-10 22:30:29 +000013533# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013534ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013535if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013536
13537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013539
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013540 wchar_h="yes"
13541
Guido van Rossumef2255b2000-03-10 22:30:29 +000013542else
Martin v. Löwis11437992002-04-12 09:54:03 +000013543 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013544
13545fi
13546
Michael W. Hudson54241132001-12-07 15:38:26 +000013547
Martin v. Löwis11437992002-04-12 09:54:03 +000013548
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013549# determine wchar_t size
13550if test "$wchar_h" = yes
13551then
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13554# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13555# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13557$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013558if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13562"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013563
Martin v. Löwis11437992002-04-12 09:54:03 +000013564else
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 if test "$ac_cv_type_wchar_t" = yes; then
13566 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13567$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013568as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013569See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013570 else
13571 ac_cv_sizeof_wchar_t=0
13572 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013574
Martin v. Löwis11437992002-04-12 09:54:03 +000013575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13577$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013578
13579
13580
Martin v. Löwis11437992002-04-12 09:54:03 +000013581cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013582#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013583_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013584
Michael W. Hudson54241132001-12-07 15:38:26 +000013585
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013586fi
13587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13589$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013590have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013592/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013593
13594#include <tcl.h>
13595#if TCL_UTF_MAX != 6
13596# error "NOT UCS4_TCL"
13597#endif
13598int
13599main ()
13600{
13601
13602 ;
13603 return 0;
13604}
13605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013606if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013607
13608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013610
13611 have_ucs4_tcl=yes
13612
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13616$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013617
Skip Montanaro6dead952003-09-25 14:50:04 +000013618# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013619if test "$wchar_h" = yes
13620then
13621 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13623$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013624 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013626else
13627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013629 ac_cv_wchar_t_signed=yes
13630else
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013632/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013633
13634 #include <wchar.h>
13635 int main()
13636 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013637 /* Success: exit code 0 */
13638 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013639 }
13640
13641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013642if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013643 ac_cv_wchar_t_signed=yes
13644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13648 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013649fi
13650
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013651fi
13652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13654$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013655fi
13656
Georg Brandl52d168a2008-01-07 18:10:24 +000013657# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013658if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013659 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013660then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013661 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013662
Matthias Kloseb9621712010-04-24 17:59:49 +000013663$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013664
Georg Brandl52d168a2008-01-07 18:10:24 +000013665else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013666 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013667fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13669$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013670
13671# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13673$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013674if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013676else
Matthias Kloseb9621712010-04-24 17:59:49 +000013677 ac_cv_c_bigendian=unknown
13678 # See if we're dealing with a universal compiler.
13679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13680/* end confdefs.h. */
13681#ifndef __APPLE_CC__
13682 not a universal capable compiler
13683 #endif
13684 typedef int dummy;
13685
Skip Montanaro6dead952003-09-25 14:50:04 +000013686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013687if ac_fn_c_try_compile "$LINENO"; then :
13688
13689 # Check for potential -arch flags. It is not universal unless
13690 # there are at least two -arch flags with different values.
13691 ac_arch=
13692 ac_prev=
13693 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13694 if test -n "$ac_prev"; then
13695 case $ac_word in
13696 i?86 | x86_64 | ppc | ppc64)
13697 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13698 ac_arch=$ac_word
13699 else
13700 ac_cv_c_bigendian=universal
13701 break
13702 fi
13703 ;;
13704 esac
13705 ac_prev=
13706 elif test "x$ac_word" = "x-arch"; then
13707 ac_prev=arch
13708 fi
13709 done
13710fi
13711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13712 if test $ac_cv_c_bigendian = unknown; then
13713 # See if sys/param.h defines the BYTE_ORDER macro.
13714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013715/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013716#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013718
Martin v. Löwis11437992002-04-12 09:54:03 +000013719int
13720main ()
13721{
Matthias Kloseb9621712010-04-24 17:59:49 +000013722#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13723 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13724 && LITTLE_ENDIAN)
13725 bogus endian macros
13726 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013727
13728 ;
13729 return 0;
13730}
13731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013732if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013733 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013735/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013736#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013738
Martin v. Löwis11437992002-04-12 09:54:03 +000013739int
13740main ()
13741{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013742#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 not big endian
13744 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013745
13746 ;
13747 return 0;
13748}
13749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013750if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013751 ac_cv_c_bigendian=yes
13752else
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013756fi
13757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13758 fi
13759 if test $ac_cv_c_bigendian = unknown; then
13760 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013762/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013763#include <limits.h>
13764
Martin v. Löwis11437992002-04-12 09:54:03 +000013765int
13766main ()
13767{
Matthias Kloseb9621712010-04-24 17:59:49 +000013768#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13769 bogus endian macros
13770 #endif
13771
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 ;
13773 return 0;
13774}
13775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013776if ac_fn_c_try_compile "$LINENO"; then :
13777 # It does; now see whether it defined to _BIG_ENDIAN or not.
13778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13779/* end confdefs.h. */
13780#include <limits.h>
13781
13782int
13783main ()
13784{
13785#ifndef _BIG_ENDIAN
13786 not big endian
13787 #endif
13788
13789 ;
13790 return 0;
13791}
13792_ACEOF
13793if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013795else
Matthias Kloseb9621712010-04-24 17:59:49 +000013796 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13799fi
13800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13801 fi
13802 if test $ac_cv_c_bigendian = unknown; then
13803 # Compile a test program.
13804 if test "$cross_compiling" = yes; then :
13805 # Try to guess by grepping values from an object file.
13806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13807/* end confdefs.h. */
13808short int ascii_mm[] =
13809 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13810 short int ascii_ii[] =
13811 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13812 int use_ascii (int i) {
13813 return ascii_mm[i] + ascii_ii[i];
13814 }
13815 short int ebcdic_ii[] =
13816 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13817 short int ebcdic_mm[] =
13818 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13819 int use_ebcdic (int i) {
13820 return ebcdic_mm[i] + ebcdic_ii[i];
13821 }
13822 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823
Matthias Kloseb9621712010-04-24 17:59:49 +000013824int
13825main ()
13826{
13827return use_ascii (foo) == use_ebcdic (foo);
13828 ;
13829 return 0;
13830}
13831_ACEOF
13832if ac_fn_c_try_compile "$LINENO"; then :
13833 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13834 ac_cv_c_bigendian=yes
13835 fi
13836 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13837 if test "$ac_cv_c_bigendian" = unknown; then
13838 ac_cv_c_bigendian=no
13839 else
13840 # finding both strings is unlikely to happen, but who knows?
13841 ac_cv_c_bigendian=unknown
13842 fi
13843 fi
13844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013846else
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013848/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013849$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013850int
13851main ()
13852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854 /* Are we little or big endian? From Harbison&Steele. */
13855 union
13856 {
13857 long int l;
13858 char c[sizeof (long int)];
13859 } u;
13860 u.l = 1;
13861 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013862
13863 ;
13864 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013865}
Martin v. Löwis11437992002-04-12 09:54:03 +000013866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013867if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013868 ac_cv_c_bigendian=no
13869else
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875
Matthias Kloseb9621712010-04-24 17:59:49 +000013876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13879$as_echo "$ac_cv_c_bigendian" >&6; }
13880 case $ac_cv_c_bigendian in #(
13881 yes)
13882 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13883;; #(
13884 no)
13885 ;; #(
13886 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013887
Matthias Kloseb9621712010-04-24 17:59:49 +000013888$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013889
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 ;; #(
13891 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013892 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013893 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013895
Michael W. Hudson54241132001-12-07 15:38:26 +000013896
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013897# ABI version string for Python extension modules. This appears between the
13898# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13899# from the following attributes which affect the ABI of this Python build (in
13900# this order):
13901#
13902# * The Python implementation (always 'cpython-' for us)
13903# * The major and minor version numbers
13904# * --with-pydebug (adds a 'd')
13905# * --with-pymalloc (adds a 'm')
13906# * --with-wide-unicode (adds a 'u')
13907#
13908# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013909# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13910# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013911
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13913$as_echo_n "checking ABIFLAGS... " >&6; }
13914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13915$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13917$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013918SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13920$as_echo "$SOABI" >&6; }
13921
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013922
13923case $ac_sys_system in
13924 Linux*|GNU*)
13925 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13926 *)
13927 EXT_SUFFIX=${SHLIB_SUFFIX};;
13928esac
13929
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13931$as_echo_n "checking LDVERSION... " >&6; }
13932LDVERSION='$(VERSION)$(ABIFLAGS)'
13933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13934$as_echo "$LDVERSION" >&6; }
13935
doko@python.org87421192013-01-26 11:39:31 +010013936
13937LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13938
13939
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013940# Check whether right shifting a negative integer extends the sign bit
13941# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13943$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013944if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013946else
Martin v. Löwis11437992002-04-12 09:54:03 +000013947
Matthias Kloseb9621712010-04-24 17:59:49 +000013948if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013949 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013950else
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013952/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013953
13954int main()
13955{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013956 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013957}
13958
Martin v. Löwis11437992002-04-12 09:54:03 +000013959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013960if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013961 ac_cv_rshift_extends_sign=yes
13962else
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13966 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013967fi
13968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013969fi
13970
Matthias Kloseb9621712010-04-24 17:59:49 +000013971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13972$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013973if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013974then
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013977
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013978fi
13979
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013980# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13982$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013983if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013985else
Martin v. Löwis11437992002-04-12 09:54:03 +000013986
Matthias Kloseb9621712010-04-24 17:59:49 +000013987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013988/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013989#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013990int
13991main ()
13992{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013993
13994 FILE *f = fopen("/dev/null", "r");
13995 flockfile(f);
13996 getc_unlocked(f);
13997 funlockfile(f);
13998
Martin v. Löwis11437992002-04-12 09:54:03 +000013999 ;
14000 return 0;
14001}
14002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014003if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014004 ac_cv_have_getc_unlocked=yes
14005else
Matthias Kloseb9621712010-04-24 17:59:49 +000014006 ac_cv_have_getc_unlocked=no
14007fi
14008rm -f core conftest.err conftest.$ac_objext \
14009 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014011
Matthias Kloseb9621712010-04-24 17:59:49 +000014012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14013$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014014if test "$ac_cv_have_getc_unlocked" = yes
14015then
Martin v. Löwis11437992002-04-12 09:54:03 +000014016
Matthias Kloseb9621712010-04-24 17:59:49 +000014017$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014018
14019fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014020
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014021# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014022# save the value of LIBS so we don't actually link Python with readline
14023LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014024
Gregory P. Smith18820942008-09-07 06:24:49 +000014025# On some systems we need to link readline to a termcap compatible
14026# library. NOTE: Keep the precedence of listed libraries synchronised
14027# with setup.py.
14028py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14030$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014031for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014032 if test -z "$py_libtermcap"; then
14033 READLINE_LIBS="-lreadline"
14034 else
14035 READLINE_LIBS="-lreadline -l$py_libtermcap"
14036 fi
14037 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014039/* end confdefs.h. */
14040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014041/* Override any GCC internal prototype to avoid an error.
14042 Use char because int might match the return type of a GCC
14043 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014044#ifdef __cplusplus
14045extern "C"
14046#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014047char readline ();
14048int
14049main ()
14050{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014051return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014052 ;
14053 return 0;
14054}
14055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014056if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014057 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014059rm -f core conftest.err conftest.$ac_objext \
14060 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014061 if test $py_cv_lib_readline = yes; then
14062 break
14063 fi
14064done
14065# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14066#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014067if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14069$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014070else
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14072$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014073
Matthias Kloseb9621712010-04-24 17:59:49 +000014074$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014075
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014076fi
14077
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014078# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14080$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014081if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014083else
14084 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014085LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014087/* end confdefs.h. */
14088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089/* Override any GCC internal prototype to avoid an error.
14090 Use char because int might match the return type of a GCC
14091 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014092#ifdef __cplusplus
14093extern "C"
14094#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014095char rl_callback_handler_install ();
14096int
14097main ()
14098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014099return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014100 ;
14101 return 0;
14102}
14103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014104if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014105 ac_cv_lib_readline_rl_callback_handler_install=yes
14106else
Matthias Kloseb9621712010-04-24 17:59:49 +000014107 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014109rm -f core conftest.err conftest.$ac_objext \
14110 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014111LIBS=$ac_check_lib_save_LIBS
14112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14114$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014115if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014116
Matthias Kloseb9621712010-04-24 17:59:49 +000014117$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014118
14119fi
14120
14121
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014122# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014124/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014125#include <readline/readline.h>
14126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014127if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014128 have_readline=yes
14129else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014130 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014131
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014132fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014133rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014134if test $have_readline = yes
14135then
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014137/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014138#include <readline/readline.h>
14139
14140_ACEOF
14141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014142 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014145
14146fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014147rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014150/* end confdefs.h. */
14151#include <readline/readline.h>
14152
14153_ACEOF
14154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014156
Matthias Kloseb9621712010-04-24 17:59:49 +000014157$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014158
14159fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014160rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014161
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014162fi
14163
Martin v. Löwis0daad592001-09-30 21:09:59 +000014164# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14166$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014167if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014169else
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014171LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175/* Override any GCC internal prototype to avoid an error.
14176 Use char because int might match the return type of a GCC
14177 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014178#ifdef __cplusplus
14179extern "C"
14180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014181char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014182int
14183main ()
14184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014186 ;
14187 return 0;
14188}
14189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014190if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014192else
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014195rm -f core conftest.err conftest.$ac_objext \
14196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014197LIBS=$ac_check_lib_save_LIBS
14198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14200$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014201if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014204
Martin v. Löwis0daad592001-09-30 21:09:59 +000014205fi
14206
Michael W. Hudson54241132001-12-07 15:38:26 +000014207
Thomas Wouters89d996e2007-09-08 17:39:28 +000014208# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14210$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014211if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014213else
14214 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014215LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014217/* end confdefs.h. */
14218
14219/* Override any GCC internal prototype to avoid an error.
14220 Use char because int might match the return type of a GCC
14221 builtin and then its argument prototype would still apply. */
14222#ifdef __cplusplus
14223extern "C"
14224#endif
14225char rl_completion_display_matches_hook ();
14226int
14227main ()
14228{
14229return rl_completion_display_matches_hook ();
14230 ;
14231 return 0;
14232}
14233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014234if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014235 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14236else
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014239rm -f core conftest.err conftest.$ac_objext \
14240 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014241LIBS=$ac_check_lib_save_LIBS
14242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14244$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014245if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014246
Matthias Kloseb9621712010-04-24 17:59:49 +000014247$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014248
14249fi
14250
14251
Martin v. Löwis0daad592001-09-30 21:09:59 +000014252# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14254$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014255if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014257else
Martin v. Löwis11437992002-04-12 09:54:03 +000014258 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014259LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263/* Override any GCC internal prototype to avoid an error.
14264 Use char because int might match the return type of a GCC
14265 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014266#ifdef __cplusplus
14267extern "C"
14268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014269char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014270int
14271main ()
14272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014274 ;
14275 return 0;
14276}
14277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014278if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014280else
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014283rm -f core conftest.err conftest.$ac_objext \
14284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014285LIBS=$ac_check_lib_save_LIBS
14286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14288$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014289if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014290
Matthias Kloseb9621712010-04-24 17:59:49 +000014291$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014292
Guido van Rossum353ae582001-07-10 16:45:32 +000014293fi
14294
Jack Jansendd19cf82001-12-06 22:36:17 +000014295
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014296# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014298/* end confdefs.h. */
14299#include <readline/readline.h>
14300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014301if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014302 have_readline=yes
14303else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014304 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014305
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014306fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014307rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014308if test $have_readline = yes
14309then
Matthias Kloseb9621712010-04-24 17:59:49 +000014310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014311/* end confdefs.h. */
14312#include <readline/readline.h>
14313
14314_ACEOF
14315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014316 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014317
Matthias Kloseb9621712010-04-24 17:59:49 +000014318$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014319
14320fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014321rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014322
14323fi
14324
Martin v. Löwis82bca632006-02-10 20:49:30 +000014325# End of readline checks: restore LIBS
14326LIBS=$LIBS_no_readline
14327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14329$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014330if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014332else
Martin v. Löwis11437992002-04-12 09:54:03 +000014333
Matthias Kloseb9621712010-04-24 17:59:49 +000014334if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014335 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014336else
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014338/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014339
14340int main()
14341{
14342 int val1 = nice(1);
14343 if (val1 != -1 && val1 == nice(2))
14344 exit(0);
14345 exit(1);
14346}
14347
Martin v. Löwis11437992002-04-12 09:54:03 +000014348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014349if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014350 ac_cv_broken_nice=yes
14351else
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14355 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014356fi
14357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014358fi
14359
Matthias Kloseb9621712010-04-24 17:59:49 +000014360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14361$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014362if test "$ac_cv_broken_nice" = yes
14363then
Martin v. Löwis11437992002-04-12 09:54:03 +000014364
Matthias Kloseb9621712010-04-24 17:59:49 +000014365$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014366
14367fi
14368
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14370$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014371if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014373else
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014375 ac_cv_broken_poll=no
14376else
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014378/* end confdefs.h. */
14379
14380#include <poll.h>
14381
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014382int main()
14383{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014384 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014385 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014386
14387 close (42);
14388
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014389 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014390 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014391 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014392 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014393 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014394 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014395 return 1;
14396}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014397
14398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014399if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014400 ac_cv_broken_poll=yes
14401else
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014404rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14405 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014408fi
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14411$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014412if test "$ac_cv_broken_poll" = yes
14413then
14414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014416
14417fi
14418
Brett Cannon43802422005-02-10 20:48:03 +000014419# 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 +000014420# (which is not required by ISO C or UNIX spec) and/or if we support
14421# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014422ac_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 +000014423#include <$ac_cv_struct_tm>
14424
Matthias Kloseb9621712010-04-24 17:59:49 +000014425"
Victor Stinnere0be4232011-10-25 13:06:09 +020014426if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014427
14428cat >>confdefs.h <<_ACEOF
14429#define HAVE_STRUCT_TM_TM_ZONE 1
14430_ACEOF
14431
14432
14433fi
14434
14435if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14436
Matthias Kloseb9621712010-04-24 17:59:49 +000014437$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014438
14439else
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14441"
Victor Stinnere0be4232011-10-25 13:06:09 +020014442if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014444else
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014446fi
14447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014449#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014450_ACEOF
14451
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14453$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014454if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014455 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456else
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014458/* end confdefs.h. */
14459#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460#if !HAVE_DECL_TZNAME
14461extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014462#endif
14463
14464int
14465main ()
14466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014468 ;
14469 return 0;
14470}
14471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014472if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014473 ac_cv_var_tzname=yes
14474else
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014477rm -f core conftest.err conftest.$ac_objext \
14478 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14481$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014482 if test $ac_cv_var_tzname = yes; then
14483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014485
14486 fi
14487fi
14488
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014489
Martin v. Löwis1d459062005-03-14 21:23:33 +000014490# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14492$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014493if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014495else
14496
Matthias Kloseb9621712010-04-24 17:59:49 +000014497if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014498 ac_cv_working_tzset=no
14499else
Matthias Kloseb9621712010-04-24 17:59:49 +000014500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014501/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014502
14503#include <stdlib.h>
14504#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014505#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014506
14507#if HAVE_TZNAME
14508extern char *tzname[];
14509#endif
14510
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014511int main()
14512{
Brett Cannon18367812003-09-19 00:59:16 +000014513 /* Note that we need to ensure that not only does tzset(3)
14514 do 'something' with localtime, but it works as documented
14515 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014516 This includes making sure that tzname is set properly if
14517 tm->tm_zone does not exist since it is the alternative way
14518 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014519
14520 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014521 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014522 */
14523
Martin v. Löwis1d459062005-03-14 21:23:33 +000014524 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014525 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14526
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014527 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014528 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014529 if (localtime(&groundhogday)->tm_hour != 0)
14530 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014531#if HAVE_TZNAME
14532 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14533 if (strcmp(tzname[0], "UTC") ||
14534 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14535 exit(1);
14536#endif
Brett Cannon18367812003-09-19 00:59:16 +000014537
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014538 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014539 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014540 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014541 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014542#if HAVE_TZNAME
14543 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14544 exit(1);
14545#endif
Brett Cannon18367812003-09-19 00:59:16 +000014546
14547 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14548 tzset();
14549 if (localtime(&groundhogday)->tm_hour != 11)
14550 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014551#if HAVE_TZNAME
14552 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14553 exit(1);
14554#endif
14555
14556#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014557 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14558 exit(1);
14559 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14560 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014561#endif
Brett Cannon18367812003-09-19 00:59:16 +000014562
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014563 exit(0);
14564}
14565
14566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014567if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014568 ac_cv_working_tzset=yes
14569else
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14573 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014574fi
14575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576fi
14577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14579$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014580if test "$ac_cv_working_tzset" = yes
14581then
14582
Matthias Kloseb9621712010-04-24 17:59:49 +000014583$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014584
14585fi
14586
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014587# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14589$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014590if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014592else
Matthias Kloseb9621712010-04-24 17:59:49 +000014593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014594/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014595#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014596int
14597main ()
14598{
14599
14600struct stat st;
14601st.st_mtim.tv_nsec = 1;
14602
14603 ;
14604 return 0;
14605}
14606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014607if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014608 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014609else
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14613fi
14614
Matthias Kloseb9621712010-04-24 17:59:49 +000014615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14616$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014617if test "$ac_cv_stat_tv_nsec" = yes
14618then
14619
Matthias Kloseb9621712010-04-24 17:59:49 +000014620$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014621
14622fi
14623
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014624# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14626$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014627if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014628 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014629else
Matthias Kloseb9621712010-04-24 17:59:49 +000014630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014631/* end confdefs.h. */
14632#include <sys/stat.h>
14633int
14634main ()
14635{
14636
14637struct stat st;
14638st.st_mtimespec.tv_nsec = 1;
14639
14640 ;
14641 return 0;
14642}
14643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014644if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014645 ac_cv_stat_tv_nsec2=yes
14646else
Matthias Kloseb9621712010-04-24 17:59:49 +000014647 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14650fi
14651
Matthias Kloseb9621712010-04-24 17:59:49 +000014652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14653$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014654if test "$ac_cv_stat_tv_nsec2" = yes
14655then
14656
Matthias Kloseb9621712010-04-24 17:59:49 +000014657$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014658
14659fi
14660
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014661ac_save_cppflags="$CPPFLAGS"
14662CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014663# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14665$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014666if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014668else
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014670/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014671#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014672int
14673main ()
14674{
Jack Jansen666b1e72001-10-31 12:11:48 +000014675
14676 int rtn;
14677 rtn = mvwdelch(0,0,0);
14678
Martin v. Löwis11437992002-04-12 09:54:03 +000014679 ;
14680 return 0;
14681}
14682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014683if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014684 ac_cv_mvwdelch_is_expression=yes
14685else
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14689fi
14690
Matthias Kloseb9621712010-04-24 17:59:49 +000014691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14692$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014693
14694if test "$ac_cv_mvwdelch_is_expression" = yes
14695then
Martin v. Löwis11437992002-04-12 09:54:03 +000014696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014698
14699fi
14700
Matthias Kloseb9621712010-04-24 17:59:49 +000014701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14702$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014703if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014704 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014705else
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014707/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014708#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014709int
14710main ()
14711{
Jack Jansen666b1e72001-10-31 12:11:48 +000014712
14713 WINDOW *w;
14714 w->_flags = 0;
14715
Martin v. Löwis11437992002-04-12 09:54:03 +000014716 ;
14717 return 0;
14718}
14719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014720if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014721 ac_cv_window_has_flags=yes
14722else
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14726fi
14727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14729$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014730
Jack Jansen666b1e72001-10-31 12:11:48 +000014731
14732if test "$ac_cv_window_has_flags" = yes
14733then
Martin v. Löwis11437992002-04-12 09:54:03 +000014734
Matthias Kloseb9621712010-04-24 17:59:49 +000014735$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014736
14737fi
14738
Matthias Kloseb9621712010-04-24 17:59:49 +000014739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14740$as_echo_n "checking for is_term_resized... " >&6; }
14741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014742/* end confdefs.h. */
14743#include <curses.h>
14744int
14745main ()
14746{
14747void *x=is_term_resized
14748 ;
14749 return 0;
14750}
14751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014752if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014753
Matthias Kloseb9621712010-04-24 17:59:49 +000014754$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014755
Matthias Kloseb159a552010-04-25 21:00:44 +000014756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014757$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014758else
Matthias Kloseb9621712010-04-24 17:59:49 +000014759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14760$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014761
14762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14766$as_echo_n "checking for resize_term... " >&6; }
14767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014768/* end confdefs.h. */
14769#include <curses.h>
14770int
14771main ()
14772{
14773void *x=resize_term
14774 ;
14775 return 0;
14776}
14777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014778if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014779
Matthias Kloseb9621712010-04-24 17:59:49 +000014780$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014781
Matthias Kloseb159a552010-04-25 21:00:44 +000014782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014783$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014784else
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14786$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014787
14788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14792$as_echo_n "checking for resizeterm... " >&6; }
14793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014794/* end confdefs.h. */
14795#include <curses.h>
14796int
14797main ()
14798{
14799void *x=resizeterm
14800 ;
14801 return 0;
14802}
14803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014804if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014805
Matthias Kloseb9621712010-04-24 17:59:49 +000014806$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014807
Matthias Kloseb159a552010-04-25 21:00:44 +000014808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014809$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014810else
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14812$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014813
14814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014816# last curses configure check
14817CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014818
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14820$as_echo "$as_me: checking for device files" >&6;}
14821
14822if test "x$cross_compiling" = xyes; then
14823 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14825$as_echo_n "checking for /dev/ptmx... " >&6; }
14826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14827$as_echo "not set" >&6; }
14828 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14829 fi
14830 if test "${ac_cv_file__dev_ptc+set}" != set; then
14831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14832$as_echo_n "checking for /dev/ptc... " >&6; }
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14834$as_echo "not set" >&6; }
14835 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14836 fi
14837fi
14838
Matthias Kloseb9621712010-04-24 17:59:49 +000014839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14840$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014841if ${ac_cv_file__dev_ptmx+:} false; then :
14842 $as_echo_n "(cached) " >&6
14843else
14844 test "$cross_compiling" = yes &&
14845 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14846if test -r "/dev/ptmx"; then
14847 ac_cv_file__dev_ptmx=yes
14848else
14849 ac_cv_file__dev_ptmx=no
14850fi
14851fi
14852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14853$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14854if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014855
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014856fi
14857
14858if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014859
Matthias Kloseb9621712010-04-24 17:59:49 +000014860$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014861
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14864$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014865if ${ac_cv_file__dev_ptc+:} false; then :
14866 $as_echo_n "(cached) " >&6
14867else
14868 test "$cross_compiling" = yes &&
14869 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14870if test -r "/dev/ptc"; then
14871 ac_cv_file__dev_ptc=yes
14872else
14873 ac_cv_file__dev_ptc=no
14874fi
14875fi
14876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14877$as_echo "$ac_cv_file__dev_ptc" >&6; }
14878if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014879
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014880fi
14881
14882if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014883
Matthias Kloseb9621712010-04-24 17:59:49 +000014884$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014885
Neal Norwitz865400f2003-03-21 01:42:58 +000014886fi
14887
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014888if test "$have_long_long" = yes
14889then
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14891$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014892 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014893 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014894else
Matthias Kloseb9621712010-04-24 17:59:49 +000014895 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014896 ac_cv_have_long_long_format="cross -- assuming no"
14897 if test x$GCC = xyes; then
14898 save_CFLAGS=$CFLAGS
14899 CFLAGS="$CFLAGS -Werror -Wformat"
14900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14901/* end confdefs.h. */
14902
14903 #include <stdio.h>
14904 #include <stddef.h>
14905
14906int
14907main ()
14908{
14909
14910 char *buffer;
14911 sprintf(buffer, "%lld", (long long)123);
14912 sprintf(buffer, "%lld", (long long)-123);
14913 sprintf(buffer, "%llu", (unsigned long long)123);
14914
14915 ;
14916 return 0;
14917}
14918_ACEOF
14919if ac_fn_c_try_compile "$LINENO"; then :
14920 ac_cv_have_long_long_format=yes
14921
14922fi
14923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14924 CFLAGS=$save_CFLAGS
14925 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014926else
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014928/* end confdefs.h. */
14929
14930 #include <stdio.h>
14931 #include <stddef.h>
14932 #include <string.h>
14933
14934 #ifdef HAVE_SYS_TYPES_H
14935 #include <sys/types.h>
14936 #endif
14937
14938 int main()
14939 {
14940 char buffer[256];
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, "%lld", (long long)-123) < 0)
14948 return 1;
14949 if (strcmp(buffer, "-123"))
14950 return 1;
14951
14952 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14953 return 1;
14954 if (strcmp(buffer, "123"))
14955 return 1;
14956
14957 return 0;
14958 }
14959
14960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014961if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014962 ac_cv_have_long_long_format=yes
14963else
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14967 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014968fi
14969
14970
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014971fi
14972
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14974$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014975fi
14976
Mark Dickinson89d7d412009-12-31 20:50:59 +000014977if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014978then
14979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014981
14982fi
14983
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014984if test $ac_sys_system = Darwin
14985then
14986 LIBS="$LIBS -framework CoreFoundation"
14987fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014988
Matthias Kloseb9621712010-04-24 17:59:49 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14990$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014991if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014993else
Matthias Kloseb9621712010-04-24 17:59:49 +000014994 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014995 ac_cv_have_size_t_format="cross -- assuming yes"
14996
Thomas Wouters477c8d52006-05-27 19:21:47 +000014997else
Matthias Kloseb9621712010-04-24 17:59:49 +000014998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014999/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015000
Thomas Wouters477c8d52006-05-27 19:21:47 +000015001#include <stdio.h>
15002#include <stddef.h>
15003#include <string.h>
15004
Christian Heimes2c181612007-12-17 20:04:13 +000015005#ifdef HAVE_SYS_TYPES_H
15006#include <sys/types.h>
15007#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015008
15009#ifdef HAVE_SSIZE_T
15010typedef ssize_t Py_ssize_t;
15011#elif SIZEOF_VOID_P == SIZEOF_LONG
15012typedef long Py_ssize_t;
15013#else
15014typedef int Py_ssize_t;
15015#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015016
Christian Heimes2c181612007-12-17 20:04:13 +000015017int main()
15018{
15019 char buffer[256];
15020
Thomas Wouters477c8d52006-05-27 19:21:47 +000015021 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15022 return 1;
15023
Thomas Wouters89f507f2006-12-13 04:49:30 +000015024 if (strcmp(buffer, "123"))
15025 return 1;
15026
15027 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15028 return 1;
15029
15030 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015031 return 1;
15032
15033 return 0;
15034}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015035
Thomas Wouters477c8d52006-05-27 19:21:47 +000015036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015037if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015038 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015039else
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015044fi
15045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15048$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015049if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015050
Matthias Kloseb9621712010-04-24 17:59:49 +000015051$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015052
15053fi
15054
Matthias Kloseb9621712010-04-24 17:59:49 +000015055ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015056#ifdef HAVE_SYS_TYPES_H
15057#include <sys/types.h>
15058#endif
15059#ifdef HAVE_SYS_SOCKET_H
15060#include <sys/socket.h>
15061#endif
15062
Matthias Kloseb9621712010-04-24 17:59:49 +000015063"
Victor Stinnere0be4232011-10-25 13:06:09 +020015064if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015065
Martin v. Löwis11437992002-04-12 09:54:03 +000015066else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015067
Matthias Kloseb9621712010-04-24 17:59:49 +000015068$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015069
15070fi
15071
Michael W. Hudson54241132001-12-07 15:38:26 +000015072
Matthias Kloseb9621712010-04-24 17:59:49 +000015073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15074$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015075if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015077else
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015079 ac_cv_broken_mbstowcs=no
15080else
Matthias Kloseb9621712010-04-24 17:59:49 +000015081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015082/* end confdefs.h. */
15083
Stefan Krah19c21392012-11-22 23:47:32 +010015084#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015085#include<stdlib.h>
15086int main() {
15087 size_t len = -1;
15088 const char *str = "text";
15089 len = mbstowcs(NULL, str, 0);
15090 return (len != 4);
15091}
15092
15093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015094if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015095 ac_cv_broken_mbstowcs=no
15096else
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15100 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015101fi
15102
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015103fi
15104
Matthias Kloseb9621712010-04-24 17:59:49 +000015105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15106$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015107if test "$ac_cv_broken_mbstowcs" = yes
15108then
15109
Matthias Kloseb9621712010-04-24 17:59:49 +000015110$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015111
15112fi
15113
Antoine Pitroub52ec782009-01-25 16:34:23 +000015114# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15116$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015117
15118# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015119if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015120 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015121if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015122then
15123
Matthias Kloseb9621712010-04-24 17:59:49 +000015124$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015125
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15127$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015128fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015129if test "$withval" = no
15130then
15131
15132$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15133
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15135$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015136fi
15137
Antoine Pitrou042b1282010-08-13 21:15:58 +000015138else
15139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15140$as_echo "no value specified" >&6; }
15141fi
15142
Antoine Pitroub52ec782009-01-25 16:34:23 +000015143
Matthias Kloseb17289e2012-03-15 19:51:34 +010015144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15145$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15146if ${ac_cv_computed_gotos+:} false; then :
15147 $as_echo_n "(cached) " >&6
15148else
15149 if test "$cross_compiling" = yes; then :
15150 if test "${with_computed_gotos+set}" = set; then
15151 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15152 else
15153 ac_cv_computed_gotos=no
15154 fi
15155else
15156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15157/* end confdefs.h. */
15158
15159int main(int argc, char **argv)
15160{
15161 static void *targets[1] = { &&LABEL1 };
15162 goto LABEL2;
15163LABEL1:
15164 return 0;
15165LABEL2:
15166 goto *targets[0];
15167 return 1;
15168}
15169
15170_ACEOF
15171if ac_fn_c_try_run "$LINENO"; then :
15172 ac_cv_computed_gotos=yes
15173else
15174 ac_cv_computed_gotos=no
15175fi
15176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15177 conftest.$ac_objext conftest.beam conftest.$ac_ext
15178fi
15179
15180fi
15181
15182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15183$as_echo "$ac_cv_computed_gotos" >&6; }
15184case "$ac_cv_computed_gotos" in yes*)
15185
15186$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15187
15188esac
15189
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015190case $ac_sys_system in
15191AIX*)
15192
15193$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15194 ;;
15195esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015196
Michael W. Hudson54241132001-12-07 15:38:26 +000015197
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015198
15199
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015200for h in `(cd $srcdir;echo Python/thread_*.h)`
15201do
15202 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15203done
15204
Michael W. Hudson54241132001-12-07 15:38:26 +000015205
Neal Norwitzd24499d2005-12-18 21:36:39 +000015206SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15208$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015209for dir in $SRCDIRS; do
15210 if test ! -d $dir; then
15211 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015212 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015213done
Matthias Kloseb9621712010-04-24 17:59:49 +000015214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15215$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015216
Stefan Krah1919b7e2012-03-21 18:25:23 +010015217# Availability of -O2:
15218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15219$as_echo_n "checking for -O2... " >&6; }
15220saved_cflags="$CFLAGS"
15221CFLAGS="-O2"
15222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15223/* end confdefs.h. */
15224
15225int
15226main ()
15227{
15228
15229
15230 ;
15231 return 0;
15232}
15233_ACEOF
15234if ac_fn_c_try_compile "$LINENO"; then :
15235 have_O2=yes
15236else
15237 have_O2=no
15238fi
15239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15241$as_echo "$have_O2" >&6; }
15242CFLAGS="$saved_cflags"
15243
15244# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15245# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15247$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15248saved_cflags="$CFLAGS"
15249CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15250if test "$have_O2" = no; then
15251 CFLAGS=""
15252fi
15253if test "$cross_compiling" = yes; then :
15254 have_glibc_memmove_bug=undefined
15255else
15256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15257/* end confdefs.h. */
15258
15259#include <stdio.h>
15260#include <stdlib.h>
15261#include <string.h>
15262void foo(void *p, void *q) { memmove(p, q, 19); }
15263int main() {
15264 char a[32] = "123456789000000000";
15265 foo(&a[9], a);
15266 if (strcmp(a, "123456789123456789000000000") != 0)
15267 return 1;
15268 foo(a, &a[9]);
15269 if (strcmp(a, "123456789000000000") != 0)
15270 return 1;
15271 return 0;
15272}
15273
15274_ACEOF
15275if ac_fn_c_try_run "$LINENO"; then :
15276 have_glibc_memmove_bug=no
15277else
15278 have_glibc_memmove_bug=yes
15279fi
15280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15281 conftest.$ac_objext conftest.beam conftest.$ac_ext
15282fi
15283
15284CFLAGS="$saved_cflags"
15285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15286$as_echo "$have_glibc_memmove_bug" >&6; }
15287if test "$have_glibc_memmove_bug" = yes; then
15288
15289$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15290
15291fi
15292
15293if test "$have_gcc_asm_for_x87" = yes; then
15294 # Some versions of gcc miscompile inline asm:
15295 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15296 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15297 case $CC in
15298 *gcc*)
15299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15300$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15301 saved_cflags="$CFLAGS"
15302 CFLAGS="-O2"
15303 if test "$cross_compiling" = yes; then :
15304 have_ipa_pure_const_bug=undefined
15305else
15306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15307/* end confdefs.h. */
15308
15309 __attribute__((noinline)) int
15310 foo(int *p) {
15311 int r;
15312 asm ( "movl \$6, (%1)\n\t"
15313 "xorl %0, %0\n\t"
15314 : "=r" (r) : "r" (p) : "memory"
15315 );
15316 return r;
15317 }
15318 int main() {
15319 int p = 8;
15320 if ((foo(&p) ? : p) != 6)
15321 return 1;
15322 return 0;
15323 }
15324
15325_ACEOF
15326if ac_fn_c_try_run "$LINENO"; then :
15327 have_ipa_pure_const_bug=no
15328else
15329 have_ipa_pure_const_bug=yes
15330fi
15331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15332 conftest.$ac_objext conftest.beam conftest.$ac_ext
15333fi
15334
15335 CFLAGS="$saved_cflags"
15336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15337$as_echo "$have_ipa_pure_const_bug" >&6; }
15338 if test "$have_ipa_pure_const_bug" = yes; then
15339
15340$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15341
15342 fi
15343 ;;
15344 esac
15345fi
15346
Guido van Rossum627b2d71993-12-24 10:39:16 +000015347# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015348ac_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 +000015349
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015350ac_config_files="$ac_config_files Modules/ld_so_aix"
15351
Martin v. Löwis11437992002-04-12 09:54:03 +000015352cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015353# This file is a shell script that caches the results of configure
15354# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015355# scripts and configure runs, see configure's option --config-cache.
15356# It is not useful on other systems. If it contains results you don't
15357# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015358#
Martin v. Löwis11437992002-04-12 09:54:03 +000015359# config.status only pays attention to the cache file if you give it
15360# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015361#
Skip Montanaro6dead952003-09-25 14:50:04 +000015362# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015363# loading this file, other *unset* `ac_cv_foo' will be assigned the
15364# following values.
15365
15366_ACEOF
15367
Guido van Rossumf78abae1997-01-21 22:02:36 +000015368# The following way of writing the cache mishandles newlines in values,
15369# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015371# Ultrix sh set writes to stderr and can't be redirected directly,
15372# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373(
15374 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15375 eval ac_val=\$$ac_var
15376 case $ac_val in #(
15377 *${as_nl}*)
15378 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015379 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15380$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381 esac
15382 case $ac_var in #(
15383 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015384 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15385 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015386 esac ;;
15387 esac
15388 done
15389
Martin v. Löwis11437992002-04-12 09:54:03 +000015390 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015391 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15392 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015393 # `set' does not quote correctly, so add quotes: double-quote
15394 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015395 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015396 "s/'/'\\\\''/g;
15397 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 *)
15400 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015401 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015402 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015403 esac |
15404 sort
15405) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015406 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015407 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015408 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015409 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15411 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015412 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15413 :end' >>confcache
15414if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15415 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015416 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15418$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015419 if test ! -f "$cache_file" || test -h "$cache_file"; then
15420 cat confcache >"$cache_file"
15421 else
15422 case $cache_file in #(
15423 */* | ?:*)
15424 mv -f confcache "$cache_file"$$ &&
15425 mv -f "$cache_file"$$ "$cache_file" ;; #(
15426 *)
15427 mv -f confcache "$cache_file" ;;
15428 esac
15429 fi
15430 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015431 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015432 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15433$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015434 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015435fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015436rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015437
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015438test "x$prefix" = xNONE && prefix=$ac_default_prefix
15439# Let make expand exec_prefix.
15440test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015441
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015442DEFS=-DHAVE_CONFIG_H
15443
Skip Montanaro6dead952003-09-25 14:50:04 +000015444ac_libobjs=
15445ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015446U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015447for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15448 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015451 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15452 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15454 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015455done
15456LIBOBJS=$ac_libobjs
15457
15458LTLIBOBJS=$ac_ltlibobjs
15459
15460
Martin v. Löwis11437992002-04-12 09:54:03 +000015461
Matthias Kloseb9621712010-04-24 17:59:49 +000015462
Victor Stinnere0be4232011-10-25 13:06:09 +020015463: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015464ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015465ac_clean_files_save=$ac_clean_files
15466ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015467{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15468$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15469as_write_fail=0
15470cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015471#! $SHELL
15472# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015473# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015474# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015475# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015476
Martin v. Löwis11437992002-04-12 09:54:03 +000015477debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015478ac_cs_recheck=false
15479ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015480
Matthias Kloseb9621712010-04-24 17:59:49 +000015481SHELL=\${CONFIG_SHELL-$SHELL}
15482export SHELL
15483_ASEOF
15484cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15485## -------------------- ##
15486## M4sh Initialization. ##
15487## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015489# Be more Bourne compatible
15490DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015491if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 emulate sh
15493 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015494 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015495 # is contrary to our usage. Disable this feature.
15496 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015497 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015498else
Matthias Kloseb9621712010-04-24 17:59:49 +000015499 case `(set -o) 2>/dev/null` in #(
15500 *posix*) :
15501 set -o posix ;; #(
15502 *) :
15503 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015504esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015505fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015506
15507
Matthias Kloseb9621712010-04-24 17:59:49 +000015508as_nl='
15509'
15510export as_nl
15511# Printing a long string crashes Solaris 7 /usr/bin/printf.
15512as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15513as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15514as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15515# Prefer a ksh shell builtin over an external printf program on Solaris,
15516# but without wasting forks for bash or zsh.
15517if test -z "$BASH_VERSION$ZSH_VERSION" \
15518 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15519 as_echo='print -r --'
15520 as_echo_n='print -rn --'
15521elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15522 as_echo='printf %s\n'
15523 as_echo_n='printf %s'
15524else
15525 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15526 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15527 as_echo_n='/usr/ucb/echo -n'
15528 else
15529 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15530 as_echo_n_body='eval
15531 arg=$1;
15532 case $arg in #(
15533 *"$as_nl"*)
15534 expr "X$arg" : "X\\(.*\\)$as_nl";
15535 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15536 esac;
15537 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15538 '
15539 export as_echo_n_body
15540 as_echo_n='sh -c $as_echo_n_body as_echo'
15541 fi
15542 export as_echo_body
15543 as_echo='sh -c $as_echo_body as_echo'
15544fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015545
15546# The user is always right.
15547if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015548 PATH_SEPARATOR=:
15549 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15550 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15551 PATH_SEPARATOR=';'
15552 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015553fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555
15556# IFS
15557# We need space, tab and new line, in precisely that order. Quoting is
15558# there to prevent editors from complaining about space-tab.
15559# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15560# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561IFS=" "" $as_nl"
15562
15563# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015564as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015565case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015566 *[\\/]* ) as_myself=$0 ;;
15567 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015568for as_dir in $PATH
15569do
15570 IFS=$as_save_IFS
15571 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015572 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15573 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015576 ;;
15577esac
15578# We did not find ourselves, most probably we were run as `sh COMMAND'
15579# in which case we are not to be found in the path.
15580if test "x$as_myself" = x; then
15581 as_myself=$0
15582fi
15583if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015584 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15585 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586fi
15587
Matthias Kloseb9621712010-04-24 17:59:49 +000015588# Unset variables that we do not need and which cause bugs (e.g. in
15589# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15590# suppresses any "Segmentation fault" message there. '((' could
15591# trigger a bug in pdksh 5.2.14.
15592for as_var in BASH_ENV ENV MAIL MAILPATH
15593do eval test x\${$as_var+set} = xset \
15594 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595done
15596PS1='$ '
15597PS2='> '
15598PS4='+ '
15599
15600# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015601LC_ALL=C
15602export LC_ALL
15603LANGUAGE=C
15604export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015605
Matthias Kloseb9621712010-04-24 17:59:49 +000015606# CDPATH.
15607(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15608
15609
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015610# as_fn_error STATUS ERROR [LINENO LOG_FD]
15611# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015612# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15613# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015614# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015615as_fn_error ()
15616{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015617 as_status=$1; test $as_status -eq 0 && as_status=1
15618 if test "$4"; then
15619 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15620 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015621 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015622 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015623 as_fn_exit $as_status
15624} # as_fn_error
15625
15626
15627# as_fn_set_status STATUS
15628# -----------------------
15629# Set $? to STATUS, without forking.
15630as_fn_set_status ()
15631{
15632 return $1
15633} # as_fn_set_status
15634
15635# as_fn_exit STATUS
15636# -----------------
15637# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15638as_fn_exit ()
15639{
15640 set +e
15641 as_fn_set_status $1
15642 exit $1
15643} # as_fn_exit
15644
15645# as_fn_unset VAR
15646# ---------------
15647# Portably unset VAR.
15648as_fn_unset ()
15649{
15650 { eval $1=; unset $1;}
15651}
15652as_unset=as_fn_unset
15653# as_fn_append VAR VALUE
15654# ----------------------
15655# Append the text in VALUE to the end of the definition contained in VAR. Take
15656# advantage of any shell optimizations that allow amortized linear growth over
15657# repeated appends, instead of the typical quadratic growth present in naive
15658# implementations.
15659if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15660 eval 'as_fn_append ()
15661 {
15662 eval $1+=\$2
15663 }'
15664else
15665 as_fn_append ()
15666 {
15667 eval $1=\$$1\$2
15668 }
15669fi # as_fn_append
15670
15671# as_fn_arith ARG...
15672# ------------------
15673# Perform arithmetic evaluation on the ARGs, and store the result in the
15674# global $as_val. Take advantage of shells that can avoid forks. The arguments
15675# must be portable across $(()) and expr.
15676if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15677 eval 'as_fn_arith ()
15678 {
15679 as_val=$(( $* ))
15680 }'
15681else
15682 as_fn_arith ()
15683 {
15684 as_val=`expr "$@" || test $? -eq 1`
15685 }
15686fi # as_fn_arith
15687
15688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015689if expr a : '\(a\)' >/dev/null 2>&1 &&
15690 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15691 as_expr=expr
15692else
15693 as_expr=false
15694fi
15695
15696if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15697 as_basename=basename
15698else
15699 as_basename=false
15700fi
15701
Matthias Kloseb9621712010-04-24 17:59:49 +000015702if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15703 as_dirname=dirname
15704else
15705 as_dirname=false
15706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015708as_me=`$as_basename -- "$0" ||
15709$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15710 X"$0" : 'X\(//\)$' \| \
15711 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015712$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713 sed '/^.*\/\([^/][^/]*\)\/*$/{
15714 s//\1/
15715 q
15716 }
15717 /^X\/\(\/\/\)$/{
15718 s//\1/
15719 q
15720 }
15721 /^X\/\(\/\).*/{
15722 s//\1/
15723 q
15724 }
15725 s/.*/./; q'`
15726
Matthias Kloseb9621712010-04-24 17:59:49 +000015727# Avoid depending upon Character Ranges.
15728as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15729as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15730as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15731as_cr_digits='0123456789'
15732as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015733
15734ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015735case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015737 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015739 xy) ECHO_C='\c';;
15740 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15741 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742 esac;;
15743*)
15744 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015745esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015746
Martin v. Löwis11437992002-04-12 09:54:03 +000015747rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748if test -d conf$$.dir; then
15749 rm -f conf$$.dir/conf$$.file
15750else
15751 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015752 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015754if (echo >conf$$.file) 2>/dev/null; then
15755 if ln -s conf$$.file conf$$ 2>/dev/null; then
15756 as_ln_s='ln -s'
15757 # ... but there are two gotchas:
15758 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15759 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015760 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015762 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 elif ln conf$$.file conf$$ 2>/dev/null; then
15764 as_ln_s=ln
15765 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015766 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015768else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015769 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015771rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15772rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015773
Matthias Kloseb9621712010-04-24 17:59:49 +000015774
15775# as_fn_mkdir_p
15776# -------------
15777# Create "$as_dir" as a directory, including parents if necessary.
15778as_fn_mkdir_p ()
15779{
15780
15781 case $as_dir in #(
15782 -*) as_dir=./$as_dir;;
15783 esac
15784 test -d "$as_dir" || eval $as_mkdir_p || {
15785 as_dirs=
15786 while :; do
15787 case $as_dir in #(
15788 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15789 *) as_qdir=$as_dir;;
15790 esac
15791 as_dirs="'$as_qdir' $as_dirs"
15792 as_dir=`$as_dirname -- "$as_dir" ||
15793$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15794 X"$as_dir" : 'X\(//\)[^/]' \| \
15795 X"$as_dir" : 'X\(//\)$' \| \
15796 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15797$as_echo X"$as_dir" |
15798 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15799 s//\1/
15800 q
15801 }
15802 /^X\(\/\/\)[^/].*/{
15803 s//\1/
15804 q
15805 }
15806 /^X\(\/\/\)$/{
15807 s//\1/
15808 q
15809 }
15810 /^X\(\/\).*/{
15811 s//\1/
15812 q
15813 }
15814 s/.*/./; q'`
15815 test -d "$as_dir" && break
15816 done
15817 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015818 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015819
15820
15821} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015822if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015823 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015824else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015825 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015826 as_mkdir_p=false
15827fi
15828
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015829
15830# as_fn_executable_p FILE
15831# -----------------------
15832# Test if FILE is an executable regular file.
15833as_fn_executable_p ()
15834{
15835 test -f "$1" && test -x "$1"
15836} # as_fn_executable_p
15837as_test_x='test -x'
15838as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015839
15840# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015841as_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 +000015842
15843# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015844as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015845
15846
Martin v. Löwis11437992002-04-12 09:54:03 +000015847exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015848## ----------------------------------- ##
15849## Main body of $CONFIG_STATUS script. ##
15850## ----------------------------------- ##
15851_ASEOF
15852test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015853
Matthias Kloseb9621712010-04-24 17:59:49 +000015854cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15855# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015856# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015857# values after options handling.
15858ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015859This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015860generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015861
15862 CONFIG_FILES = $CONFIG_FILES
15863 CONFIG_HEADERS = $CONFIG_HEADERS
15864 CONFIG_LINKS = $CONFIG_LINKS
15865 CONFIG_COMMANDS = $CONFIG_COMMANDS
15866 $ $0 $@
15867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868on `(hostname || uname -n) 2>/dev/null | sed 1q`
15869"
15870
Martin v. Löwis11437992002-04-12 09:54:03 +000015871_ACEOF
15872
Matthias Kloseb9621712010-04-24 17:59:49 +000015873case $ac_config_files in *"
15874"*) set x $ac_config_files; shift; ac_config_files=$*;;
15875esac
15876
15877case $ac_config_headers in *"
15878"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15879esac
15880
15881
15882cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015883# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015884config_files="$ac_config_files"
15885config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015887_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015888
Matthias Kloseb9621712010-04-24 17:59:49 +000015889cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015890ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015891\`$as_me' instantiates files and other configuration actions
15892from templates according to the current configuration. Unless the files
15893and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015894
Matthias Kloseb9621712010-04-24 17:59:49 +000015895Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015896
15897 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015898 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015899 --config print configuration, then exit
15900 -q, --quiet, --silent
15901 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015902 -d, --debug don't remove temporary files
15903 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015904 --file=FILE[:TEMPLATE]
15905 instantiate the configuration file FILE
15906 --header=FILE[:TEMPLATE]
15907 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015908
15909Configuration files:
15910$config_files
15911
15912Configuration headers:
15913$config_headers
15914
Matthias Kloseb9621712010-04-24 17:59:49 +000015915Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015918cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15919ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015920ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015921python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015922configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015923 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015924
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015925Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015926This config.status script is free software; the Free Software Foundation
15927gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928
15929ac_pwd='$ac_pwd'
15930srcdir='$srcdir'
15931INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015932MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015933test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015934_ACEOF
15935
Matthias Kloseb9621712010-04-24 17:59:49 +000015936cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15937# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015938ac_need_defaults=:
15939while test $# != 0
15940do
15941 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015942 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015943 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15944 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015945 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015946 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015947 --*=)
15948 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15949 ac_optarg=
15950 ac_shift=:
15951 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015952 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015953 ac_option=$1
15954 ac_optarg=$2
15955 ac_shift=shift
15956 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 esac
15958
Skip Montanaro6dead952003-09-25 14:50:04 +000015959 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015960 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015961 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15962 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015963 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015964 $as_echo "$ac_cs_version"; exit ;;
15965 --config | --confi | --conf | --con | --co | --c )
15966 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015967 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015968 debug=: ;;
15969 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015970 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015971 case $ac_optarg in
15972 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015973 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015974 esac
15975 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 ac_need_defaults=false;;
15977 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015978 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015979 case $ac_optarg in
15980 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15981 esac
15982 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015983 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015984 --he | --h)
15985 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015986 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015987Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015988 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015989 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015990 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15991 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15992 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015993
15994 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015995 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015996Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015999 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016000
16001 esac
16002 shift
16003done
16004
Skip Montanaro6dead952003-09-25 14:50:04 +000016005ac_configure_extra_args=
16006
16007if $ac_cs_silent; then
16008 exec 6>/dev/null
16009 ac_configure_extra_args="$ac_configure_extra_args --silent"
16010fi
16011
16012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016013cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016014if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016015 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016016 shift
16017 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16018 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016019 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016020 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016021fi
16022
Martin v. Löwis11437992002-04-12 09:54:03 +000016023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016024cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016025exec 5>>config.log
16026{
16027 echo
16028 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16029## Running $as_me. ##
16030_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016031 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016032} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016035cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016036_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016037
Matthias Kloseb9621712010-04-24 17:59:49 +000016038cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039
16040# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016041for ac_config_target in $ac_config_targets
16042do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016043 case $ac_config_target in
16044 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16045 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16046 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016047 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16048 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016049 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16050 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016051 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016052 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016053 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016054
Victor Stinnere0be4232011-10-25 13:06:09 +020016055 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016056 esac
16057done
16058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016059
Martin v. Löwis11437992002-04-12 09:54:03 +000016060# If the user did not use the arguments to specify the items to instantiate,
16061# then the envvar interface is used. Set only those that are not.
16062# We use the long form for the default assignment because of an extremely
16063# bizarre bug on SunOS 4.1.3.
16064if $ac_need_defaults; then
16065 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16066 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16067fi
16068
Skip Montanaro6dead952003-09-25 14:50:04 +000016069# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016070# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016071# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016072# Hook for its removal unless debugging.
16073# Note that there is a small window in which the directory will not be cleaned:
16074# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016075$debug ||
16076{
Victor Stinnere0be4232011-10-25 13:06:09 +020016077 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016078 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016079 : "${ac_tmp:=$tmp}"
16080 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016081' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016082 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016083}
Martin v. Löwis11437992002-04-12 09:54:03 +000016084# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016085
Martin v. Löwis11437992002-04-12 09:54:03 +000016086{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016087 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016088 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016089} ||
16090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016091 tmp=./conf$$-$RANDOM
16092 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016093} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016094ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016095
Matthias Kloseb9621712010-04-24 17:59:49 +000016096# Set up the scripts for CONFIG_FILES section.
16097# No need to generate them if there are no CONFIG_FILES.
16098# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016099if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016100
Matthias Kloseb9621712010-04-24 17:59:49 +000016101
16102ac_cr=`echo X | tr X '\015'`
16103# On cygwin, bash can eat \r inside `` if the user requested igncr.
16104# But we know of no other shell where ac_cr would be empty at this
16105# point, so we can use a bashism as a fallback.
16106if test "x$ac_cr" = x; then
16107 eval ac_cr=\$\'\\r\'
16108fi
16109ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16110if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016111 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016112else
16113 ac_cs_awk_cr=$ac_cr
16114fi
16115
Victor Stinnere0be4232011-10-25 13:06:09 +020016116echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016117_ACEOF
16118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119
Matthias Kloseb9621712010-04-24 17:59:49 +000016120{
16121 echo "cat >conf$$subs.awk <<_ACEOF" &&
16122 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16123 echo "_ACEOF"
16124} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016125 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16126ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016127ac_delim='%!_!# '
16128for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016129 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016130 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016131
Matthias Kloseb9621712010-04-24 17:59:49 +000016132 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16133 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016134 break
16135 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016136 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016137 else
16138 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140done
Matthias Kloseb9621712010-04-24 17:59:49 +000016141rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016142
Matthias Kloseb9621712010-04-24 17:59:49 +000016143cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016144cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016146sed -n '
16147h
16148s/^/S["/; s/!.*/"]=/
16149p
16150g
16151s/^[^!]*!//
16152:repl
16153t repl
16154s/'"$ac_delim"'$//
16155t delim
16156:nl
16157h
16158s/\(.\{148\}\)..*/\1/
16159t more1
16160s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16161p
16162n
16163b repl
16164:more1
16165s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16166p
16167g
16168s/.\{148\}//
16169t nl
16170:delim
16171h
16172s/\(.\{148\}\)..*/\1/
16173t more2
16174s/["\\]/\\&/g; s/^/"/; s/$/"/
16175p
16176b
16177:more2
16178s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16179p
16180g
16181s/.\{148\}//
16182t delim
16183' <conf$$subs.awk | sed '
16184/^[^""]/{
16185 N
16186 s/\n//
16187}
16188' >>$CONFIG_STATUS || ac_write_fail=1
16189rm -f conf$$subs.awk
16190cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16191_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016192cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016193 for (key in S) S_is_set[key] = 1
16194 FS = ""
16195
16196}
16197{
16198 line = $ 0
16199 nfields = split(line, field, "@")
16200 substed = 0
16201 len = length(field[1])
16202 for (i = 2; i < nfields; i++) {
16203 key = field[i]
16204 keylen = length(key)
16205 if (S_is_set[key]) {
16206 value = S[key]
16207 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16208 len += length(value) + length(field[++i])
16209 substed = 1
16210 } else
16211 len += 1 + keylen
16212 }
16213
16214 print line
16215}
16216
16217_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016219cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16220if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16221 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16222else
16223 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016224fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016225 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016226_ACEOF
16227
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016228# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16229# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230# trailing colons and then remove the whole line if VPATH becomes empty
16231# (actually we leave an empty line to preserve line numbers).
16232if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016233 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16234h
16235s///
16236s/^/:/
16237s/[ ]*$/:/
16238s/:\$(srcdir):/:/g
16239s/:\${srcdir}:/:/g
16240s/:@srcdir@:/:/g
16241s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016242s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016243x
16244s/\(=[ ]*\).*/\1/
16245G
16246s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016247s/^[^=]*=[ ]*$//
16248}'
16249fi
16250
Matthias Kloseb9621712010-04-24 17:59:49 +000016251cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016252fi # test -n "$CONFIG_FILES"
16253
Matthias Kloseb9621712010-04-24 17:59:49 +000016254# Set up the scripts for CONFIG_HEADERS section.
16255# No need to generate them if there are no CONFIG_HEADERS.
16256# This happens for instance with `./config.status Makefile'.
16257if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016258cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016259BEGIN {
16260_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016261
Matthias Kloseb9621712010-04-24 17:59:49 +000016262# Transform confdefs.h into an awk script `defines.awk', embedded as
16263# here-document in config.status, that substitutes the proper values into
16264# config.h.in to produce config.h.
16265
16266# Create a delimiter string that does not exist in confdefs.h, to ease
16267# handling of long lines.
16268ac_delim='%!_!# '
16269for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016270 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16271 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016272 break
16273 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016274 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016275 else
16276 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16277 fi
16278done
16279
16280# For the awk script, D is an array of macro values keyed by name,
16281# likewise P contains macro parameters if any. Preserve backslash
16282# newline sequences.
16283
16284ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16285sed -n '
16286s/.\{148\}/&'"$ac_delim"'/g
16287t rset
16288:rset
16289s/^[ ]*#[ ]*define[ ][ ]*/ /
16290t def
16291d
16292:def
16293s/\\$//
16294t bsnl
16295s/["\\]/\\&/g
16296s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16297D["\1"]=" \3"/p
16298s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16299d
16300:bsnl
16301s/["\\]/\\&/g
16302s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16303D["\1"]=" \3\\\\\\n"\\/p
16304t cont
16305s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16306t cont
16307d
16308:cont
16309n
16310s/.\{148\}/&'"$ac_delim"'/g
16311t clear
16312:clear
16313s/\\$//
16314t bsnlc
16315s/["\\]/\\&/g; s/^/"/; s/$/"/p
16316d
16317:bsnlc
16318s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16319b cont
16320' <confdefs.h | sed '
16321s/'"$ac_delim"'/"\\\
16322"/g' >>$CONFIG_STATUS || ac_write_fail=1
16323
16324cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16325 for (key in D) D_is_set[key] = 1
16326 FS = ""
16327}
16328/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16329 line = \$ 0
16330 split(line, arg, " ")
16331 if (arg[1] == "#") {
16332 defundef = arg[2]
16333 mac1 = arg[3]
16334 } else {
16335 defundef = substr(arg[1], 2)
16336 mac1 = arg[2]
16337 }
16338 split(mac1, mac2, "(") #)
16339 macro = mac2[1]
16340 prefix = substr(line, 1, index(line, defundef) - 1)
16341 if (D_is_set[macro]) {
16342 # Preserve the white space surrounding the "#".
16343 print prefix "define", macro P[macro] D[macro]
16344 next
16345 } else {
16346 # Replace #undef with comments. This is necessary, for example,
16347 # in the case of _POSIX_SOURCE, which is predefined and required
16348 # on some systems where configure will not decide to define it.
16349 if (defundef == "undef") {
16350 print "/*", prefix defundef, macro, "*/"
16351 next
16352 }
16353 }
16354}
16355{ print }
16356_ACAWK
16357_ACEOF
16358cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016359 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016360fi # test -n "$CONFIG_HEADERS"
16361
16362
16363eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16364shift
16365for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016366do
16367 case $ac_tag in
16368 :[FHLC]) ac_mode=$ac_tag; continue;;
16369 esac
16370 case $ac_mode$ac_tag in
16371 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016372 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016373 :[FH]-) ac_tag=-:-;;
16374 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16375 esac
16376 ac_save_IFS=$IFS
16377 IFS=:
16378 set x $ac_tag
16379 IFS=$ac_save_IFS
16380 shift
16381 ac_file=$1
16382 shift
16383
16384 case $ac_mode in
16385 :L) ac_source=$1;;
16386 :[FH])
16387 ac_file_inputs=
16388 for ac_f
16389 do
16390 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016391 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016392 *) # Look for the file first in the build tree, then in the source tree
16393 # (if the path is not absolute). The absolute path cannot be DOS-style,
16394 # because $ac_f cannot contain `:'.
16395 test -f "$ac_f" ||
16396 case $ac_f in
16397 [\\/$]*) false;;
16398 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16399 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016400 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016401 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016402 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16403 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404 done
16405
16406 # Let's still pretend it is `configure' which instantiates (i.e., don't
16407 # use $as_me), people would be surprised to read:
16408 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016409 configure_input='Generated from '`
16410 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16411 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016412 if test x"$ac_file" != x-; then
16413 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016414 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16415$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016417 # Neutralize special characters interpreted by sed in replacement strings.
16418 case $configure_input in #(
16419 *\&* | *\|* | *\\* )
16420 ac_sed_conf_input=`$as_echo "$configure_input" |
16421 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16422 *) ac_sed_conf_input=$configure_input;;
16423 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016424
16425 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016426 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16427 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016428 esac
16429 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016430 esac
16431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016432 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016433$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016434 X"$ac_file" : 'X\(//\)[^/]' \| \
16435 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016436 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016437$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016438 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16439 s//\1/
16440 q
16441 }
16442 /^X\(\/\/\)[^/].*/{
16443 s//\1/
16444 q
16445 }
16446 /^X\(\/\/\)$/{
16447 s//\1/
16448 q
16449 }
16450 /^X\(\/\).*/{
16451 s//\1/
16452 q
16453 }
16454 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016455 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016456 ac_builddir=.
16457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016458case "$ac_dir" in
16459.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16460*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016461 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016462 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016463 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016464 case $ac_top_builddir_sub in
16465 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16466 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16467 esac ;;
16468esac
16469ac_abs_top_builddir=$ac_pwd
16470ac_abs_builddir=$ac_pwd$ac_dir_suffix
16471# for backward compatibility:
16472ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016473
16474case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016475 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016476 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016477 ac_top_srcdir=$ac_top_builddir_sub
16478 ac_abs_top_srcdir=$ac_pwd ;;
16479 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016480 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016481 ac_top_srcdir=$srcdir
16482 ac_abs_top_srcdir=$srcdir ;;
16483 *) # Relative name.
16484 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16485 ac_top_srcdir=$ac_top_build_prefix$srcdir
16486 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016487esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016488ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016489
Martin v. Löwis11437992002-04-12 09:54:03 +000016490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016491 case $ac_mode in
16492 :F)
16493 #
16494 # CONFIG_FILE
16495 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016496
16497 case $INSTALL in
16498 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016499 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016500 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016501 ac_MKDIR_P=$MKDIR_P
16502 case $MKDIR_P in
16503 [\\/$]* | ?:[\\/]* ) ;;
16504 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16505 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016506_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507
Matthias Kloseb9621712010-04-24 17:59:49 +000016508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509# If the template does not know about datarootdir, expand it.
16510# FIXME: This hack should be removed a few years after 2.60.
16511ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016512ac_sed_dataroot='
16513/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016514 p
16515 q
16516}
16517/@datadir@/p
16518/@docdir@/p
16519/@infodir@/p
16520/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016521/@mandir@/p'
16522case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016523*datarootdir*) ac_datarootdir_seen=yes;;
16524*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016525 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16526$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016528cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529 ac_datarootdir_hack='
16530 s&@datadir@&$datadir&g
16531 s&@docdir@&$docdir&g
16532 s&@infodir@&$infodir&g
16533 s&@localedir@&$localedir&g
16534 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016535 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016536esac
16537_ACEOF
16538
16539# Neutralize VPATH when `$srcdir' = `.'.
16540# Shell code in configure.ac might set extrasub.
16541# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016542cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16543ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016544$extrasub
16545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016546cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016547:t
16548/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016549s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016550s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016551s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552s&@srcdir@&$ac_srcdir&;t t
16553s&@abs_srcdir@&$ac_abs_srcdir&;t t
16554s&@top_srcdir@&$ac_top_srcdir&;t t
16555s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16556s&@builddir@&$ac_builddir&;t t
16557s&@abs_builddir@&$ac_abs_builddir&;t t
16558s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16559s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016560s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016562"
Victor Stinnere0be4232011-10-25 13:06:09 +020016563eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16564 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016566test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016567 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16568 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16569 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016570 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016571which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016572$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016573which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016574
Victor Stinnere0be4232011-10-25 13:06:09 +020016575 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016576 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016577 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16578 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016579 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016580 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016581 ;;
16582 :H)
16583 #
16584 # CONFIG_HEADER
16585 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016586 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016587 {
16588 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016589 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16590 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016591 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016592 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016593 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16594$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016595 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016596 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016597 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016598 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016599 fi
16600 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016601 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016602 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016603 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016604 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016607
16608 esac
16609
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016610
16611 case $ac_file$ac_mode in
16612 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16613
16614 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615done # for ac_tag
16616
Guido van Rossum627b2d71993-12-24 10:39:16 +000016617
Matthias Kloseb9621712010-04-24 17:59:49 +000016618as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016619_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016620ac_clean_files=$ac_clean_files_save
16621
Matthias Kloseb9621712010-04-24 17:59:49 +000016622test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016623 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016624
Martin v. Löwis11437992002-04-12 09:54:03 +000016625
16626# configure is writing to config.log, and then calls config.status.
16627# config.status does its own redirection, appending to config.log.
16628# Unfortunately, on DOS this fails, as config.log is still kept open
16629# by configure, so config.status won't be able to write to it; its
16630# output is simply discarded. So we exec the FD to /dev/null,
16631# effectively closing config.log, so it can be properly (re)opened and
16632# appended to by config.status. When coming back to configure, we
16633# need to make the FD available again.
16634if test "$no_create" != yes; then
16635 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016636 ac_config_status_args=
16637 test "$silent" = yes &&
16638 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016639 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016640 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 exec 5>>config.log
16642 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16643 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016644 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016645fi
16646if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16648$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016649fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016650
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016651
Christian Heimes75ed8902013-11-20 01:11:18 +010016652echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016653if test ! -f Modules/Setup
16654then
16655 cp $srcdir/Modules/Setup.dist Modules/Setup
16656fi
16657
Christian Heimes75ed8902013-11-20 01:11:18 +010016658echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016659if test ! -f Modules/Setup.local
16660then
16661 echo "# Edit this file for local setup changes" >Modules/Setup.local
16662fi
16663
Christian Heimes75ed8902013-11-20 01:11:18 +010016664echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016665$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16666 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016667 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016668mv config.c Modules