blob: 71d7b46913f988d6a54727a11e34df180f1702d2 [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.
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003# Generated by GNU Autoconf 2.69 for python 3.5.
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'
Larry Hastingsf5002bd2014-03-16 23:05:59 -0700583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
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
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700661SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
665BASECFLAGS
666OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000667ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100669MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000670INSTALL_DATA
671INSTALL_SCRIPT
672INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530673OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200674PYTHON
675ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200676ac_ct_READELF
677READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000678ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200679ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000680AR
681RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000682USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000683GNULD
684LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000685LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000686RUNSHARED
687INSTSONAME
688LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000689PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000690BLDLIBRARY
691DLLLIBRARY
692LDLIBRARY
693LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100694MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000695BUILDEXEEXT
696EGREP
697GREP
698CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200699NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000701MAINCC
702CXX
703OBJEXT
704EXEEXT
705ac_ct_CC
706CPPFLAGS
707LDFLAGS
708CFLAGS
709CC
710EXPORT_MACOSX_DEPLOYMENT_TARGET
711CONFIGURE_MACOSX_DEPLOYMENT_TARGET
712SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200713_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000715FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800717FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000718FRAMEWORKALTINSTALLLAST
719FRAMEWORKALTINSTALLFIRST
720FRAMEWORKINSTALLLAST
721FRAMEWORKINSTALLFIRST
722PYTHONFRAMEWORKINSTALLDIR
723PYTHONFRAMEWORKPREFIX
724PYTHONFRAMEWORKDIR
725PYTHONFRAMEWORKIDENTIFIER
726PYTHONFRAMEWORK
727LIPO_32BIT_FLAGS
728ARCH_RUN_32BIT
729UNIVERSALSDK
730CONFIG_ARGS
731SOVERSION
732VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100734host_os
735host_vendor
736host_cpu
737host
738build_os
739build_vendor
740build_cpu
741build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500742HAS_HG
743HGBRANCH
744HGTAG
745HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400746BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000747target_alias
748host_alias
749build_alias
750LIBS
751ECHO_T
752ECHO_N
753ECHO_C
754DEFS
755mandir
756localedir
757libdir
758psdir
759pdfdir
760dvidir
761htmldir
762infodir
763docdir
764oldincludedir
765includedir
766localstatedir
767sharedstatedir
768sysconfdir
769datadir
770datarootdir
771libexecdir
772sbindir
773bindir
774program_transform_name
775prefix
776exec_prefix
777PACKAGE_URL
778PACKAGE_BUGREPORT
779PACKAGE_STRING
780PACKAGE_VERSION
781PACKAGE_TARNAME
782PACKAGE_NAME
783PATH_SEPARATOR
784SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000785ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000786ac_user_opts='
787enable_option_checking
788enable_universalsdk
789with_universal_archs
790with_framework_name
791enable_framework
792with_gcc
793with_cxx_main
794with_suffix
795enable_shared
796enable_profiling
797with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100798with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100799with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000800with_libs
801with_system_expat
802with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100803with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000804enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700805with_tcltk_includes
806with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_dbmliborder
808with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_threads
810with_thread
811enable_ipv6
812with_doc_strings
813with_tsc
814with_pymalloc
815with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_fpectl
817with_libm
818with_libc
819enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800821with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000822'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000823 ac_precious_vars='build_alias
824host_alias
825target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100826MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827CC
828CFLAGS
829LDFLAGS
830LIBS
831CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200832CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000836ac_init_help=
837ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000838ac_unrecognized_opts=
839ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840# The variables have the same names as the options, with
841# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000842cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845no_recursion=
846prefix=NONE
847program_prefix=NONE
848program_suffix=NONE
849program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854x_includes=NONE
855x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000856
857# Installation directory options.
858# These are left unexpanded so users can "make install exec_prefix=/foo"
859# and all the variables that are supposed to be based on exec_prefix
860# by default will actually change.
861# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863bindir='${exec_prefix}/bin'
864sbindir='${exec_prefix}/sbin'
865libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866datarootdir='${prefix}/share'
867datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868sysconfdir='${prefix}/etc'
869sharedstatedir='${prefix}/com'
870localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871includedir='${prefix}/include'
872oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000873docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
874infodir='${datarootdir}/info'
875htmldir='${docdir}'
876dvidir='${docdir}'
877pdfdir='${docdir}'
878psdir='${docdir}'
879libdir='${exec_prefix}/lib'
880localedir='${datarootdir}/locale'
881mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000886do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 # If the previous option needs an argument, assign it.
888 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890 ac_prev=
891 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000892 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200895 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
896 *=) ac_optarg= ;;
897 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900 # Accept the important Cygnus configure options, so we can diagnose typos.
901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 case $ac_dashdash$ac_option in
903 --)
904 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 -bindir | --bindir | --bindi | --bind | --bin | --bi)
907 ac_prev=bindir ;;
908 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000909 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910
911 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916 -cache-file | --cache-file | --cache-fil | --cache-fi \
917 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
918 ac_prev=cache_file ;;
919 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
920 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 cache_file=$ac_optarg ;;
922
923 --config-cache | -C)
924 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
932 | --dataroo | --dataro | --datar)
933 ac_prev=datarootdir ;;
934 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
935 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
936 datarootdir=$ac_optarg ;;
937
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000939 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000941 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200942 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000943 ac_useropt_orig=$ac_useropt
944 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
945 case $ac_user_opts in
946 *"
947"enable_$ac_useropt"
948"*) ;;
949 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
950 ac_unrecognized_sep=', ';;
951 esac
952 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953
954 -docdir | --docdir | --docdi | --doc | --do)
955 ac_prev=docdir ;;
956 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
957 docdir=$ac_optarg ;;
958
959 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
960 ac_prev=dvidir ;;
961 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
962 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
964 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
981 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
982 | --exec | --exe | --ex)
983 ac_prev=exec_prefix ;;
984 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
985 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
986 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 # Obsolete; use --with-gas.
991 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 -help | --help | --hel | --he | -h)
994 ac_init_help=long ;;
995 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
996 ac_init_help=recursive ;;
997 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
998 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
1000 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001005 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1006 ac_prev=htmldir ;;
1007 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1008 | --ht=*)
1009 htmldir=$ac_optarg ;;
1010
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011 -includedir | --includedir | --includedi | --included | --include \
1012 | --includ | --inclu | --incl | --inc)
1013 ac_prev=includedir ;;
1014 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1015 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
1018 -infodir | --infodir | --infodi | --infod | --info | --inf)
1019 ac_prev=infodir ;;
1020 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
1023 -libdir | --libdir | --libdi | --libd)
1024 ac_prev=libdir ;;
1025 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
1028 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1029 | --libexe | --libex | --libe)
1030 ac_prev=libexecdir ;;
1031 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1032 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 -localedir | --localedir | --localedi | --localed | --locale)
1036 ac_prev=localedir ;;
1037 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1038 localedir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042 ac_prev=localstatedir ;;
1043 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001044 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1048 ac_prev=mandir ;;
1049 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001053 # Obsolete; use --without-fp.
1054 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 no_create=yes ;;
1059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001060 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1061 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1062 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1065 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1066 | --oldin | --oldi | --old | --ol | --o)
1067 ac_prev=oldincludedir ;;
1068 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1069 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1070 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1074 ac_prev=prefix ;;
1075 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1079 | --program-pre | --program-pr | --program-p)
1080 ac_prev=program_prefix ;;
1081 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1082 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1086 | --program-suf | --program-su | --program-s)
1087 ac_prev=program_suffix ;;
1088 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1089 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -program-transform-name | --program-transform-name \
1093 | --program-transform-nam | --program-transform-na \
1094 | --program-transform-n | --program-transform- \
1095 | --program-transform | --program-transfor \
1096 | --program-transfo | --program-transf \
1097 | --program-trans | --program-tran \
1098 | --progr-tra | --program-tr | --program-t)
1099 ac_prev=program_transform_name ;;
1100 -program-transform-name=* | --program-transform-name=* \
1101 | --program-transform-nam=* | --program-transform-na=* \
1102 | --program-transform-n=* | --program-transform-=* \
1103 | --program-transform=* | --program-transfor=* \
1104 | --program-transfo=* | --program-transf=* \
1105 | --program-trans=* | --program-tran=* \
1106 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001109 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1110 ac_prev=pdfdir ;;
1111 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1112 pdfdir=$ac_optarg ;;
1113
1114 -psdir | --psdir | --psdi | --psd | --ps)
1115 ac_prev=psdir ;;
1116 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1117 psdir=$ac_optarg ;;
1118
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1120 | -silent | --silent | --silen | --sile | --sil)
1121 silent=yes ;;
1122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001123 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1124 ac_prev=sbindir ;;
1125 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1126 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001128
1129 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1130 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1131 | --sharedst | --shareds | --shared | --share | --shar \
1132 | --sha | --sh)
1133 ac_prev=sharedstatedir ;;
1134 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1135 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1136 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1137 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 -site | --site | --sit)
1141 ac_prev=site ;;
1142 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1146 ac_prev=srcdir ;;
1147 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1151 | --syscon | --sysco | --sysc | --sys | --sy)
1152 ac_prev=sysconfdir ;;
1153 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1154 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1163 verbose=yes ;;
1164
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 -version | --version | --versio | --versi | --vers | -V)
1166 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
1168 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001172 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 ac_useropt_orig=$ac_useropt
1174 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1175 case $ac_user_opts in
1176 *"
1177"with_$ac_useropt"
1178"*) ;;
1179 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1180 ac_unrecognized_sep=', ';;
1181 esac
1182 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183
1184 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001188 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 ac_useropt_orig=$ac_useropt
1190 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1191 case $ac_user_opts in
1192 *"
1193"with_$ac_useropt"
1194"*) ;;
1195 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1196 ac_unrecognized_sep=', ';;
1197 esac
1198 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200 --x)
1201 # Obsolete; use --with-x.
1202 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1205 | --x-incl | --x-inc | --x-in | --x-i)
1206 ac_prev=x_includes ;;
1207 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1208 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1212 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1213 ac_prev=x_libraries ;;
1214 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1215 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001218 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1219Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220 ;;
1221
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 *=*)
1223 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 case $ac_envvar in #(
1226 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001227 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001229 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 export $ac_envvar ;;
1231
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001232 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001237 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 ;;
1239
1240 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241done
1242
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246fi
1247
Matthias Kloseb9621712010-04-24 17:59:49 +00001248if test -n "$ac_unrecognized_opts"; then
1249 case $enable_option_checking in
1250 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1253 esac
1254fi
1255
1256# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1258 datadir sysconfdir sharedstatedir localstatedir includedir \
1259 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1260 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001261do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 # Remove trailing slashes.
1264 case $ac_val in
1265 */ )
1266 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1267 eval $ac_var=\$ac_val;;
1268 esac
1269 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271 [\\/$]* | ?:[\\/]* ) continue;;
1272 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001275done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276
Martin v. Löwis11437992002-04-12 09:54:03 +00001277# There might be people who depend on the old broken behavior: `$host'
1278# used to hold the argument of --host etc.
1279# FIXME: To remove some day.
1280build=$build_alias
1281host=$host_alias
1282target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283
Martin v. Löwis11437992002-04-12 09:54:03 +00001284# FIXME: To remove some day.
1285if test "x$host_alias" != x; then
1286 if test "x$build_alias" = x; then
1287 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 elif test "x$build_alias" != "x$host_alias"; then
1289 cross_compiling=yes
1290 fi
1291fi
1292
1293ac_tool_prefix=
1294test -n "$host_alias" && ac_tool_prefix=$host_alias-
1295
1296test "$silent" = yes && exec 6>/dev/null
1297
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299ac_pwd=`pwd` && test -n "$ac_pwd" &&
1300ac_ls_di=`ls -di .` &&
1301ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001304 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305
1306
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307# Find the source files, if location was not specified.
1308if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001311 ac_confdir=`$as_dirname -- "$as_myself" ||
1312$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1313 X"$as_myself" : 'X\(//\)[^/]' \| \
1314 X"$as_myself" : 'X\(//\)$' \| \
1315 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1316$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1318 s//\1/
1319 q
1320 }
1321 /^X\(\/\/\)[^/].*/{
1322 s//\1/
1323 q
1324 }
1325 /^X\(\/\/\)$/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\).*/{
1330 s//\1/
1331 q
1332 }
1333 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336 srcdir=..
1337 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338else
1339 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341if test ! -r "$srcdir/$ac_unique_file"; then
1342 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001343 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1346ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001347 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 pwd)`
1349# When building in place, set srcdir=.
1350if test "$ac_abs_confdir" = "$ac_pwd"; then
1351 srcdir=.
1352fi
1353# Remove unnecessary trailing slashes from srcdir.
1354# Double slashes in file names in object file debugging info
1355# mess up M-x gdb in Emacs.
1356case $srcdir in
1357*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1358esac
1359for ac_var in $ac_precious_vars; do
1360 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1361 eval ac_env_${ac_var}_value=\$${ac_var}
1362 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1363 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1364done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365
Martin v. Löwis11437992002-04-12 09:54:03 +00001366#
1367# Report the --help message.
1368#
1369if test "$ac_init_help" = "long"; then
1370 # Omit some internal or obsolete options to make the list less imposing.
1371 # This message is too long to be a string in the A/UX 3.1 sh.
1372 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001373\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001374
1375Usage: $0 [OPTION]... [VAR=VALUE]...
1376
1377To assign environment variables (e.g., CC, CFLAGS...), specify them as
1378VAR=VALUE. See below for descriptions of some of the useful variables.
1379
1380Defaults for the options are specified in brackets.
1381
1382Configuration:
1383 -h, --help display this help and exit
1384 --help=short display options specific to this package
1385 --help=recursive display the short help of all the included packages
1386 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001387 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 --cache-file=FILE cache test results in FILE [disabled]
1389 -C, --config-cache alias for \`--cache-file=config.cache'
1390 -n, --no-create do not create output files
1391 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393Installation directories:
1394 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001397 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
1399By default, \`make install' will install all the files in
1400\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1401an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1402for instance \`--prefix=\$HOME'.
1403
1404For better control, use the options below.
1405
1406Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001407 --bindir=DIR user executables [EPREFIX/bin]
1408 --sbindir=DIR system admin executables [EPREFIX/sbin]
1409 --libexecdir=DIR program executables [EPREFIX/libexec]
1410 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1411 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1412 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1413 --libdir=DIR object code libraries [EPREFIX/lib]
1414 --includedir=DIR C header files [PREFIX/include]
1415 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1416 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1417 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1418 --infodir=DIR info documentation [DATAROOTDIR/info]
1419 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1420 --mandir=DIR man documentation [DATAROOTDIR/man]
1421 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1422 --htmldir=DIR html documentation [DOCDIR]
1423 --dvidir=DIR dvi documentation [DOCDIR]
1424 --pdfdir=DIR pdf documentation [DOCDIR]
1425 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426_ACEOF
1427
1428 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001429
1430System types:
1431 --build=BUILD configure for building on BUILD [guessed]
1432 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433_ACEOF
1434fi
1435
1436if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001437 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001438 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001439 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 cat <<\_ACEOF
1441
1442Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1445 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001446 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001447 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001448 --enable-framework[=INSTALLDIR]
1449 Build (MacOSX|Darwin) framework
1450 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001451 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001452 --enable-loadable-sqlite-extensions
1453 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --enable-ipv6 Enable ipv6 (with ipv4) support
1455 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001456 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001458
1459Optional Packages:
1460 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1461 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001462 --with-universal-archs=ARCH
1463 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001464 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001465 --with-framework-name=FRAMEWORK
1466 specify an alternate name of the framework built
1467 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001468 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001469 --with-cxx-main=<compiler>
1470 compile main() and link python executable with C++
1471 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --with-suffix=.exe set executable suffix
1473 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001474 --with-hash-algorithm=[fnv|siphash24]
1475 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001476 --with-address-sanitizer
1477 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001479 --with-system-expat build pyexpat module using an installed expat
1480 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001481 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001482 --with-system-libmpdec build _decimal module using an installed libmpdec
1483 library
Ned Deilyd819b932013-09-06 01:07:05 -07001484 --with-tcltk-includes='-I...'
1485 override search for Tcl and Tk include files
1486 --with-tcltk-libs='-L...'
1487 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001488 --with-dbmliborder=db1:db2:...
1489 order to check db backends for dbm. Valid value is a
1490 colon separated string with the backend names
1491 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with(out)-threads[=DIRECTORY]
1494 disable/enable thread support
1495 --with(out)-thread[=DIRECTORY]
1496 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001498 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001500 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-fpectl enable SIGFPE catching
1502 --with-libm=STRING math library
1503 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001504 --with(out)-computed-gotos
1505 Use computed gotos in evaluation loop (enabled by
1506 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001507 --with(out)-ensurepip=[=upgrade]
1508 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
1510Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001511 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 CC C compiler command
1513 CFLAGS C compiler flags
1514 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1515 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001517 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 CPP C preprocessor
1520
1521Use these variables to override the choices made by `configure' or to help
1522it to find libraries and programs with nonstandard names/locations.
1523
Georg Brandle2e15612009-05-20 18:25:10 +00001524Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001525_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001527fi
1528
1529if test "$ac_init_help" = "recursive"; then
1530 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001531 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001532 test -d "$ac_dir" ||
1533 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1534 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 ac_builddir=.
1536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537case "$ac_dir" in
1538.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1539*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001540 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001541 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001542 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543 case $ac_top_builddir_sub in
1544 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1545 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1546 esac ;;
1547esac
1548ac_abs_top_builddir=$ac_pwd
1549ac_abs_builddir=$ac_pwd$ac_dir_suffix
1550# for backward compatibility:
1551ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 ac_top_srcdir=$ac_top_builddir_sub
1557 ac_abs_top_srcdir=$ac_pwd ;;
1558 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 ac_top_srcdir=$srcdir
1561 ac_abs_top_srcdir=$srcdir ;;
1562 *) # Relative name.
1563 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1564 ac_top_srcdir=$ac_top_build_prefix$srcdir
1565 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001566esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 cd "$ac_dir" || { ac_status=$?; continue; }
1570 # Check for guested configure.
1571 if test -f "$ac_srcdir/configure.gnu"; then
1572 echo &&
1573 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1574 elif test -f "$ac_srcdir/configure"; then
1575 echo &&
1576 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 fi || ac_status=$?
1580 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 done
1582fi
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001585if $ac_init_version; then
1586 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001587python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001588generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001590Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001591This configure script is free software; the Free Software Foundation
1592gives unlimited permission to copy, distribute and modify it.
1593_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001596
1597## ------------------------ ##
1598## Autoconf initialization. ##
1599## ------------------------ ##
1600
1601# ac_fn_c_try_compile LINENO
1602# --------------------------
1603# Try to compile conftest.$ac_ext, and return whether this succeeded.
1604ac_fn_c_try_compile ()
1605{
1606 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1607 rm -f conftest.$ac_objext
1608 if { { ac_try="$ac_compile"
1609case "(($ac_try" in
1610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1611 *) ac_try_echo=$ac_try;;
1612esac
1613eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1614$as_echo "$ac_try_echo"; } >&5
1615 (eval "$ac_compile") 2>conftest.err
1616 ac_status=$?
1617 if test -s conftest.err; then
1618 grep -v '^ *+' conftest.err >conftest.er1
1619 cat conftest.er1 >&5
1620 mv -f conftest.er1 conftest.err
1621 fi
1622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1623 test $ac_status = 0; } && {
1624 test -z "$ac_c_werror_flag" ||
1625 test ! -s conftest.err
1626 } && test -s conftest.$ac_objext; then :
1627 ac_retval=0
1628else
1629 $as_echo "$as_me: failed program was:" >&5
1630sed 's/^/| /' conftest.$ac_ext >&5
1631
1632 ac_retval=1
1633fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001634 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001635 as_fn_set_status $ac_retval
1636
1637} # ac_fn_c_try_compile
1638
Matthias Kloseb9621712010-04-24 17:59:49 +00001639# ac_fn_c_try_link LINENO
1640# -----------------------
1641# Try to link conftest.$ac_ext, and return whether this succeeded.
1642ac_fn_c_try_link ()
1643{
1644 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1645 rm -f conftest.$ac_objext conftest$ac_exeext
1646 if { { ac_try="$ac_link"
1647case "(($ac_try" in
1648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1649 *) ac_try_echo=$ac_try;;
1650esac
1651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1652$as_echo "$ac_try_echo"; } >&5
1653 (eval "$ac_link") 2>conftest.err
1654 ac_status=$?
1655 if test -s conftest.err; then
1656 grep -v '^ *+' conftest.err >conftest.er1
1657 cat conftest.er1 >&5
1658 mv -f conftest.er1 conftest.err
1659 fi
1660 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1661 test $ac_status = 0; } && {
1662 test -z "$ac_c_werror_flag" ||
1663 test ! -s conftest.err
1664 } && test -s conftest$ac_exeext && {
1665 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001666 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001667 }; then :
1668 ac_retval=0
1669else
1670 $as_echo "$as_me: failed program was:" >&5
1671sed 's/^/| /' conftest.$ac_ext >&5
1672
1673 ac_retval=1
1674fi
1675 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1676 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1677 # interfere with the next link command; also delete a directory that is
1678 # left behind by Apple's compiler. We do this before executing the actions.
1679 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001680 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 as_fn_set_status $ac_retval
1682
1683} # ac_fn_c_try_link
1684
Matthias Kloseb9621712010-04-24 17:59:49 +00001685# ac_fn_c_try_cpp LINENO
1686# ----------------------
1687# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_cpp ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_cpp conftest.$ac_ext"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001706 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001707 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 }; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
1714
1715 ac_retval=1
1716fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001718 as_fn_set_status $ac_retval
1719
1720} # ac_fn_c_try_cpp
1721
1722# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1723# -------------------------------------------------------
1724# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1725# the include files in INCLUDES and setting the cache variable VAR
1726# accordingly.
1727ac_fn_c_check_header_mongrel ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001730 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1732$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001733if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001734 $as_echo_n "(cached) " >&6
1735fi
1736eval ac_res=\$$3
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1738$as_echo "$ac_res" >&6; }
1739else
1740 # Is the header compilable?
1741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1742$as_echo_n "checking $2 usability... " >&6; }
1743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1744/* end confdefs.h. */
1745$4
1746#include <$2>
1747_ACEOF
1748if ac_fn_c_try_compile "$LINENO"; then :
1749 ac_header_compiler=yes
1750else
1751 ac_header_compiler=no
1752fi
1753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1755$as_echo "$ac_header_compiler" >&6; }
1756
1757# Is the header present?
1758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1759$as_echo_n "checking $2 presence... " >&6; }
1760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1761/* end confdefs.h. */
1762#include <$2>
1763_ACEOF
1764if ac_fn_c_try_cpp "$LINENO"; then :
1765 ac_header_preproc=yes
1766else
1767 ac_header_preproc=no
1768fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001769rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1771$as_echo "$ac_header_preproc" >&6; }
1772
1773# So? What about this header?
1774case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1775 yes:no: )
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1777$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1779$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1780 ;;
1781 no:yes:* )
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1783$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1785$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1787$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1789$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1791$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001792( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001793## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001794## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001795 ) | sed "s/^/$as_me: WARNING: /" >&2
1796 ;;
1797esac
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1799$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001800if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001801 $as_echo_n "(cached) " >&6
1802else
1803 eval "$3=\$ac_header_compiler"
1804fi
1805eval ac_res=\$$3
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1807$as_echo "$ac_res" >&6; }
1808fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001809 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001810
1811} # ac_fn_c_check_header_mongrel
1812
1813# ac_fn_c_try_run LINENO
1814# ----------------------
1815# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1816# that executables *can* be run.
1817ac_fn_c_try_run ()
1818{
1819 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1820 if { { ac_try="$ac_link"
1821case "(($ac_try" in
1822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1823 *) ac_try_echo=$ac_try;;
1824esac
1825eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1826$as_echo "$ac_try_echo"; } >&5
1827 (eval "$ac_link") 2>&5
1828 ac_status=$?
1829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1830 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1831 { { case "(($ac_try" in
1832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833 *) ac_try_echo=$ac_try;;
1834esac
1835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836$as_echo "$ac_try_echo"; } >&5
1837 (eval "$ac_try") 2>&5
1838 ac_status=$?
1839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1840 test $ac_status = 0; }; }; then :
1841 ac_retval=0
1842else
1843 $as_echo "$as_me: program exited with status $ac_status" >&5
1844 $as_echo "$as_me: failed program was:" >&5
1845sed 's/^/| /' conftest.$ac_ext >&5
1846
1847 ac_retval=$ac_status
1848fi
1849 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001850 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001851 as_fn_set_status $ac_retval
1852
1853} # ac_fn_c_try_run
1854
1855# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1856# -------------------------------------------------------
1857# Tests whether HEADER exists and can be compiled using the include files in
1858# INCLUDES, setting the cache variable VAR accordingly.
1859ac_fn_c_check_header_compile ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1863$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001864if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001865 $as_echo_n "(cached) " >&6
1866else
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869$4
1870#include <$2>
1871_ACEOF
1872if ac_fn_c_try_compile "$LINENO"; then :
1873 eval "$3=yes"
1874else
1875 eval "$3=no"
1876fi
1877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1878fi
1879eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001882 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001883
1884} # ac_fn_c_check_header_compile
1885
Matthias Kloseb9621712010-04-24 17:59:49 +00001886# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1887# -------------------------------------------
1888# Tests whether TYPE exists after having included INCLUDES, setting cache
1889# variable VAR accordingly.
1890ac_fn_c_check_type ()
1891{
1892 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001895if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001896 $as_echo_n "(cached) " >&6
1897else
1898 eval "$3=no"
1899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900/* end confdefs.h. */
1901$4
1902int
1903main ()
1904{
1905if (sizeof ($2))
1906 return 0;
1907 ;
1908 return 0;
1909}
1910_ACEOF
1911if ac_fn_c_try_compile "$LINENO"; then :
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$4
1915int
1916main ()
1917{
1918if (sizeof (($2)))
1919 return 0;
1920 ;
1921 return 0;
1922}
1923_ACEOF
1924if ac_fn_c_try_compile "$LINENO"; then :
1925
1926else
1927 eval "$3=yes"
1928fi
1929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1930fi
1931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1932fi
1933eval ac_res=\$$3
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001936 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001937
1938} # ac_fn_c_check_type
1939
1940# ac_fn_c_find_uintX_t LINENO BITS VAR
1941# ------------------------------------
1942# Finds an unsigned integer type with width BITS, setting cache variable VAR
1943# accordingly.
1944ac_fn_c_find_uintX_t ()
1945{
1946 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1948$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001949if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001950 $as_echo_n "(cached) " >&6
1951else
1952 eval "$3=no"
1953 # Order is important - never check a type that is potentially smaller
1954 # than half of the expected target width.
1955 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1956 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$ac_includes_default
1960int
1961main ()
1962{
1963static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001964test_array [0] = 0;
1965return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001966
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972 case $ac_type in #(
1973 uint$2_t) :
1974 eval "$3=yes" ;; #(
1975 *) :
1976 eval "$3=\$ac_type" ;;
1977esac
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001980 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982else
1983 break
1984fi
1985 done
1986fi
1987eval ac_res=\$$3
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001990 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992} # ac_fn_c_find_uintX_t
1993
1994# ac_fn_c_find_intX_t LINENO BITS VAR
1995# -----------------------------------
1996# Finds a signed integer type with width BITS, setting cache variable VAR
1997# accordingly.
1998ac_fn_c_find_intX_t ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2002$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002003if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002004 $as_echo_n "(cached) " >&6
2005else
2006 eval "$3=no"
2007 # Order is important - never check a type that is potentially smaller
2008 # than half of the expected target width.
2009 for ac_type in int$2_t 'int' 'long int' \
2010 'long long int' 'short int' 'signed char'; do
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002014 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002015int
2016main ()
2017{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002018static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002019test_array [0] = 0;
2020return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002030 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002031int
2032main ()
2033{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002034static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002035 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002036test_array [0] = 0;
2037return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043if ac_fn_c_try_compile "$LINENO"; then :
2044
2045else
2046 case $ac_type in #(
2047 int$2_t) :
2048 eval "$3=yes" ;; #(
2049 *) :
2050 eval "$3=\$ac_type" ;;
2051esac
2052fi
2053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054fi
2055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002056 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058else
2059 break
2060fi
2061 done
2062fi
2063eval ac_res=\$$3
2064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2065$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002066 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068} # ac_fn_c_find_intX_t
2069
2070# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2071# --------------------------------------------
2072# Tries to find the compile-time value of EXPR in a program that includes
2073# INCLUDES, setting VAR accordingly. Returns whether the value could be
2074# computed
2075ac_fn_c_compute_int ()
2076{
2077 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2078 if test "$cross_compiling" = yes; then
2079 # Depending upon the size, compute the lo and hi bounds.
2080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081/* end confdefs.h. */
2082$4
2083int
2084main ()
2085{
2086static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002087test_array [0] = 0;
2088return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002089
2090 ;
2091 return 0;
2092}
2093_ACEOF
2094if ac_fn_c_try_compile "$LINENO"; then :
2095 ac_lo=0 ac_mid=0
2096 while :; do
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
2099$4
2100int
2101main ()
2102{
2103static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002104test_array [0] = 0;
2105return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002106
2107 ;
2108 return 0;
2109}
2110_ACEOF
2111if ac_fn_c_try_compile "$LINENO"; then :
2112 ac_hi=$ac_mid; break
2113else
2114 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2115 if test $ac_lo -le $ac_mid; then
2116 ac_lo= ac_hi=
2117 break
2118 fi
2119 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122 done
2123else
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127int
2128main ()
2129{
2130static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002131test_array [0] = 0;
2132return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002133
2134 ;
2135 return 0;
2136}
2137_ACEOF
2138if ac_fn_c_try_compile "$LINENO"; then :
2139 ac_hi=-1 ac_mid=-1
2140 while :; do
2141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142/* end confdefs.h. */
2143$4
2144int
2145main ()
2146{
2147static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002148test_array [0] = 0;
2149return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_compile "$LINENO"; then :
2156 ac_lo=$ac_mid; break
2157else
2158 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2159 if test $ac_mid -le $ac_hi; then
2160 ac_lo= ac_hi=
2161 break
2162 fi
2163 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2164fi
2165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166 done
2167else
2168 ac_lo= ac_hi=
2169fi
2170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2171fi
2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173# Binary search between lo and hi bounds.
2174while test "x$ac_lo" != "x$ac_hi"; do
2175 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178$4
2179int
2180main ()
2181{
2182static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002183test_array [0] = 0;
2184return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002185
2186 ;
2187 return 0;
2188}
2189_ACEOF
2190if ac_fn_c_try_compile "$LINENO"; then :
2191 ac_hi=$ac_mid
2192else
2193 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196done
2197case $ac_lo in #((
2198?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2199'') ac_retval=1 ;;
2200esac
2201 else
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204$4
2205static long int longval () { return $2; }
2206static unsigned long int ulongval () { return $2; }
2207#include <stdio.h>
2208#include <stdlib.h>
2209int
2210main ()
2211{
2212
2213 FILE *f = fopen ("conftest.val", "w");
2214 if (! f)
2215 return 1;
2216 if (($2) < 0)
2217 {
2218 long int i = longval ();
2219 if (i != ($2))
2220 return 1;
2221 fprintf (f, "%ld", i);
2222 }
2223 else
2224 {
2225 unsigned long int i = ulongval ();
2226 if (i != ($2))
2227 return 1;
2228 fprintf (f, "%lu", i);
2229 }
2230 /* Do not output a trailing newline, as this causes \r\n confusion
2231 on some platforms. */
2232 return ferror (f) || fclose (f) != 0;
2233
2234 ;
2235 return 0;
2236}
2237_ACEOF
2238if ac_fn_c_try_run "$LINENO"; then :
2239 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2240else
2241 ac_retval=1
2242fi
2243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2244 conftest.$ac_objext conftest.beam conftest.$ac_ext
2245rm -f conftest.val
2246
2247 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002248 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002249 as_fn_set_status $ac_retval
2250
2251} # ac_fn_c_compute_int
2252
2253# ac_fn_c_check_func LINENO FUNC VAR
2254# ----------------------------------
2255# Tests whether FUNC exists, setting the cache variable VAR accordingly
2256ac_fn_c_check_func ()
2257{
2258 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2260$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002261if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002262 $as_echo_n "(cached) " >&6
2263else
2264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265/* end confdefs.h. */
2266/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2267 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2268#define $2 innocuous_$2
2269
2270/* System header to define __stub macros and hopefully few prototypes,
2271 which can conflict with char $2 (); below.
2272 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2273 <limits.h> exists even on freestanding compilers. */
2274
2275#ifdef __STDC__
2276# include <limits.h>
2277#else
2278# include <assert.h>
2279#endif
2280
2281#undef $2
2282
2283/* Override any GCC internal prototype to avoid an error.
2284 Use char because int might match the return type of a GCC
2285 builtin and then its argument prototype would still apply. */
2286#ifdef __cplusplus
2287extern "C"
2288#endif
2289char $2 ();
2290/* The GNU C library defines this for functions which it implements
2291 to always fail with ENOSYS. Some functions are actually named
2292 something starting with __ and the normal name is an alias. */
2293#if defined __stub_$2 || defined __stub___$2
2294choke me
2295#endif
2296
2297int
2298main ()
2299{
2300return $2 ();
2301 ;
2302 return 0;
2303}
2304_ACEOF
2305if ac_fn_c_try_link "$LINENO"; then :
2306 eval "$3=yes"
2307else
2308 eval "$3=no"
2309fi
2310rm -f core conftest.err conftest.$ac_objext \
2311 conftest$ac_exeext conftest.$ac_ext
2312fi
2313eval ac_res=\$$3
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2315$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002316 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002317
2318} # ac_fn_c_check_func
2319
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002320# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2321# ---------------------------------------------
2322# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2323# accordingly.
2324ac_fn_c_check_decl ()
2325{
2326 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2327 as_decl_name=`echo $2|sed 's/ *(.*//'`
2328 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2330$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2331if eval \${$3+:} false; then :
2332 $as_echo_n "(cached) " >&6
2333else
2334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2335/* end confdefs.h. */
2336$4
2337int
2338main ()
2339{
2340#ifndef $as_decl_name
2341#ifdef __cplusplus
2342 (void) $as_decl_use;
2343#else
2344 (void) $as_decl_name;
2345#endif
2346#endif
2347
2348 ;
2349 return 0;
2350}
2351_ACEOF
2352if ac_fn_c_try_compile "$LINENO"; then :
2353 eval "$3=yes"
2354else
2355 eval "$3=no"
2356fi
2357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2358fi
2359eval ac_res=\$$3
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2361$as_echo "$ac_res" >&6; }
2362 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2363
2364} # ac_fn_c_check_decl
2365
Matthias Kloseb9621712010-04-24 17:59:49 +00002366# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2367# ----------------------------------------------------
2368# Tries to find if the field MEMBER exists in type AGGR, after including
2369# INCLUDES, setting cache variable VAR accordingly.
2370ac_fn_c_check_member ()
2371{
2372 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2374$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002375if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002376 $as_echo_n "(cached) " >&6
2377else
2378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379/* end confdefs.h. */
2380$5
2381int
2382main ()
2383{
2384static $2 ac_aggr;
2385if (ac_aggr.$3)
2386return 0;
2387 ;
2388 return 0;
2389}
2390_ACEOF
2391if ac_fn_c_try_compile "$LINENO"; then :
2392 eval "$4=yes"
2393else
2394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2395/* end confdefs.h. */
2396$5
2397int
2398main ()
2399{
2400static $2 ac_aggr;
2401if (sizeof ac_aggr.$3)
2402return 0;
2403 ;
2404 return 0;
2405}
2406_ACEOF
2407if ac_fn_c_try_compile "$LINENO"; then :
2408 eval "$4=yes"
2409else
2410 eval "$4=no"
2411fi
2412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2413fi
2414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2415fi
2416eval ac_res=\$$4
2417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2418$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002419 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002420
2421} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002422cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002423This file contains any messages produced by compilers while
2424running configure, to aid debugging if configure makes a mistake.
2425
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002426It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002427generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002428
2429 $ $0 $@
2430
2431_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002432exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002433{
2434cat <<_ASUNAME
2435## --------- ##
2436## Platform. ##
2437## --------- ##
2438
2439hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2440uname -m = `(uname -m) 2>/dev/null || echo unknown`
2441uname -r = `(uname -r) 2>/dev/null || echo unknown`
2442uname -s = `(uname -s) 2>/dev/null || echo unknown`
2443uname -v = `(uname -v) 2>/dev/null || echo unknown`
2444
2445/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2446/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2447
2448/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2449/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2450/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002452/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2453/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2454/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2455
2456_ASUNAME
2457
2458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2459for as_dir in $PATH
2460do
2461 IFS=$as_save_IFS
2462 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 $as_echo "PATH: $as_dir"
2464 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002466
2467} >&5
2468
2469cat >&5 <<_ACEOF
2470
2471
2472## ----------- ##
2473## Core tests. ##
2474## ----------- ##
2475
2476_ACEOF
2477
2478
2479# Keep a trace of the command line.
2480# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002481# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002482# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002483# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002484ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002485ac_configure_args0=
2486ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002487ac_must_keep_next=false
2488for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002489do
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 for ac_arg
2491 do
2492 case $ac_arg in
2493 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2494 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2495 | -silent | --silent | --silen | --sile | --sil)
2496 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 esac
2500 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002505 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002507 case $ac_arg in
2508 *=* | --config-cache | -C | -disable-* | --disable-* \
2509 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2510 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2511 | -with-* | --with-* | -without-* | --without-* | --x)
2512 case "$ac_configure_args0 " in
2513 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2514 esac
2515 ;;
2516 -* ) ac_must_keep_next=true ;;
2517 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 ;;
2521 esac
2522 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002523done
Matthias Kloseb9621712010-04-24 17:59:49 +00002524{ ac_configure_args0=; unset ac_configure_args0;}
2525{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002526
2527# When interrupted or exit'd, cleanup temporary files, and complete
2528# config.log. We remove comments because anyway the quotes in there
2529# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530# WARNING: Use '\'' to represent an apostrophe within the trap.
2531# 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 +00002532trap 'exit_status=$?
2533 # Save into config.log some information that might help in debugging.
2534 {
2535 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002536
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002537 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002538## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002539## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 echo
2541 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542(
2543 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2544 eval ac_val=\$$ac_var
2545 case $ac_val in #(
2546 *${as_nl}*)
2547 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2549$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 esac
2551 case $ac_var in #(
2552 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002553 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2554 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 esac ;;
2556 esac
2557 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2560 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 "s/'\''/'\''\\\\'\'''\''/g;
2563 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2564 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002565 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002567 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac |
2569 sort
2570)
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002572
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002574## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002575## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002576 echo
2577 for ac_var in $ac_subst_vars
2578 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 eval ac_val=\$$ac_var
2580 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002584 done | sort
2585 echo
2586
2587 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002590## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002591 echo
2592 for ac_var in $ac_subst_files
2593 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 eval ac_val=\$$ac_var
2595 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002599 done | sort
2600 echo
2601 fi
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002604 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002605## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002606## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 echo
2610 fi
2611 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002612 $as_echo "$as_me: caught signal $ac_signal"
2613 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 rm -f core *.core core.conftest.* &&
2616 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002619for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002621done
2622ac_signal=0
2623
2624# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002626
Matthias Kloseb9621712010-04-24 17:59:49 +00002627$as_echo "/* confdefs.h */" > confdefs.h
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629# Predefined preprocessor variables.
2630
2631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_NAME "$PACKAGE_NAME"
2633_ACEOF
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2637_ACEOF
2638
Martin v. Löwis11437992002-04-12 09:54:03 +00002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_VERSION "$PACKAGE_VERSION"
2641_ACEOF
2642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_STRING "$PACKAGE_STRING"
2645_ACEOF
2646
Martin v. Löwis11437992002-04-12 09:54:03 +00002647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2649_ACEOF
2650
Matthias Kloseb9621712010-04-24 17:59:49 +00002651cat >>confdefs.h <<_ACEOF
2652#define PACKAGE_URL "$PACKAGE_URL"
2653_ACEOF
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655
2656# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002657# Prefer an explicitly selected file to automatically selected ones.
2658ac_site_file1=NONE
2659ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002660if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002661 # We do not want a PATH search for config.site.
2662 case $CONFIG_SITE in #((
2663 -*) ac_site_file1=./$CONFIG_SITE;;
2664 */*) ac_site_file1=$CONFIG_SITE;;
2665 *) ac_site_file1=./$CONFIG_SITE;;
2666 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 ac_site_file1=$prefix/share/config.site
2669 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670else
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 ac_site_file1=$ac_default_prefix/share/config.site
2672 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002674for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002675do
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 test "x$ac_site_file" = xNONE && continue
2677 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2679$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002681 . "$ac_site_file" \
2682 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2684as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002685See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686 fi
2687done
2688
2689if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 # Some versions of bash will fail to source /dev/null (special files
2691 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2692 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2694$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2697 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 esac
2699 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700else
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2702$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 >$cache_file
2704fi
2705
2706# Check that the precious variables saved in the cache have kept the same
2707# value.
2708ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2711 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2713 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 case $ac_old_set,$ac_new_set in
2715 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2717$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 +00002718 ac_cache_corrupted=: ;;
2719 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002720 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2721$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 ac_cache_corrupted=: ;;
2723 ,);;
2724 *)
2725 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 # differences in whitespace do not lead to failure.
2727 ac_old_val_w=`echo x $ac_old_val`
2728 ac_new_val_w=`echo x $ac_new_val`
2729 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2731$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2732 ac_cache_corrupted=:
2733 else
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2735$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2736 eval $ac_var=\$ac_old_val
2737 fi
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2739$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2741$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 fi;;
2743 esac
2744 # Pass precious variables to config.status.
2745 if test "$ac_new_set" = set; then
2746 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002747 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 *) ac_arg=$ac_var=$ac_new_val ;;
2749 esac
2750 case " $ac_configure_args " in
2751 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002752 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 esac
2754 fi
2755done
2756if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002757 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2760$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002761 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002763## -------------------- ##
2764## Main body of script. ##
2765## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766
Guido van Rossum7f43da71994-08-01 12:15:30 +00002767ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002769ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2770ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2771ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002772
Guido van Rossum627b2d71993-12-24 10:39:16 +00002773
Michael W. Hudson54241132001-12-07 15:38:26 +00002774
Trent Nelson4d4ec652012-10-16 08:51:24 -04002775
Trent Nelson5595ab52012-10-17 04:47:31 -04002776if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002777 # If we're building out-of-tree, we need to make sure the following
2778 # resources get picked up before their $srcdir counterparts.
2779 # Objects/ -> typeslots.inc
2780 # Include/ -> Python-ast.h, graminit.h
2781 # Python/ -> importlib.h
2782 # (A side effect of this is that these resources will automatically be
2783 # regenerated when building out-of-tree, regardless of whether or not
2784 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2785 # off.)
2786 BASECPPFLAGS="-IObjects -IInclude -IPython"
2787else
2788 BASECPPFLAGS=""
2789fi
2790
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791
2792
2793
2794
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002795if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002796then
2797# Extract the first word of "hg", so it can be a program name with args.
2798set dummy hg; ac_word=$2
2799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2800$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002801if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002802 $as_echo_n "(cached) " >&6
2803else
2804 if test -n "$HAS_HG"; then
2805 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2806else
2807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2808for as_dir in $PATH
2809do
2810 IFS=$as_save_IFS
2811 test -z "$as_dir" && as_dir=.
2812 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002814 ac_cv_prog_HAS_HG="found"
2815 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2816 break 2
2817 fi
2818done
2819 done
2820IFS=$as_save_IFS
2821
2822 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2823fi
2824fi
2825HAS_HG=$ac_cv_prog_HAS_HG
2826if test -n "$HAS_HG"; then
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2828$as_echo "$HAS_HG" >&6; }
2829else
2830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2831$as_echo "no" >&6; }
2832fi
2833
2834
2835else
2836HAS_HG=no-repository
2837fi
2838if test $HAS_HG = found
2839then
2840 HGVERSION="hg id -i \$(srcdir)"
2841 HGTAG="hg id -t \$(srcdir)"
2842 HGBRANCH="hg id -b \$(srcdir)"
2843else
2844 HGVERSION=""
2845 HGTAG=""
2846 HGBRANCH=""
2847fi
2848
2849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002850ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002851
2852
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002853ac_aux_dir=
2854for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2855 if test -f "$ac_dir/install-sh"; then
2856 ac_aux_dir=$ac_dir
2857 ac_install_sh="$ac_aux_dir/install-sh -c"
2858 break
2859 elif test -f "$ac_dir/install.sh"; then
2860 ac_aux_dir=$ac_dir
2861 ac_install_sh="$ac_aux_dir/install.sh -c"
2862 break
2863 elif test -f "$ac_dir/shtool"; then
2864 ac_aux_dir=$ac_dir
2865 ac_install_sh="$ac_aux_dir/shtool install -c"
2866 break
2867 fi
2868done
2869if test -z "$ac_aux_dir"; then
2870 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2871fi
2872
2873# These three variables are undocumented and unsupported,
2874# and are intended to be withdrawn in a future Autoconf release.
2875# They can cause serious problems if a builder's source tree is in a directory
2876# whose full name contains unusual characters.
2877ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2878ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2879ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2880
2881
2882# Make sure we can run config.sub.
2883$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2884 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2885
2886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2887$as_echo_n "checking build system type... " >&6; }
2888if ${ac_cv_build+:} false; then :
2889 $as_echo_n "(cached) " >&6
2890else
2891 ac_build_alias=$build_alias
2892test "x$ac_build_alias" = x &&
2893 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2894test "x$ac_build_alias" = x &&
2895 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2896ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2897 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2898
2899fi
2900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2901$as_echo "$ac_cv_build" >&6; }
2902case $ac_cv_build in
2903*-*-*) ;;
2904*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2905esac
2906build=$ac_cv_build
2907ac_save_IFS=$IFS; IFS='-'
2908set x $ac_cv_build
2909shift
2910build_cpu=$1
2911build_vendor=$2
2912shift; shift
2913# Remember, the first character of IFS is used to create $*,
2914# except with old shells:
2915build_os=$*
2916IFS=$ac_save_IFS
2917case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2918
2919
2920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2921$as_echo_n "checking host system type... " >&6; }
2922if ${ac_cv_host+:} false; then :
2923 $as_echo_n "(cached) " >&6
2924else
2925 if test "x$host_alias" = x; then
2926 ac_cv_host=$ac_cv_build
2927else
2928 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2929 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2930fi
2931
2932fi
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2934$as_echo "$ac_cv_host" >&6; }
2935case $ac_cv_host in
2936*-*-*) ;;
2937*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2938esac
2939host=$ac_cv_host
2940ac_save_IFS=$IFS; IFS='-'
2941set x $ac_cv_host
2942shift
2943host_cpu=$1
2944host_vendor=$2
2945shift; shift
2946# Remember, the first character of IFS is used to create $*,
2947# except with old shells:
2948host_os=$*
2949IFS=$ac_save_IFS
2950case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2951
2952
2953
doko@python.orga10e4a92013-01-25 18:45:12 +01002954
2955
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002956if test "$cross_compiling" = yes; then
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2958$as_echo_n "checking for python interpreter for cross build... " >&6; }
2959 if test -z "$PYTHON_FOR_BUILD"; then
2960 for interp in python$PACKAGE_VERSION python3 python; do
2961 which $interp >/dev/null 2>&1 || continue
2962 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2963 break
2964 fi
2965 interp=
2966 done
2967 if test x$interp = x; then
2968 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2969 fi
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2971$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002972 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 +02002973 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002974elif test "$cross_compiling" = maybe; then
2975 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002976else
2977 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2978fi
2979
2980
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
Benjamin Petersond23f8222009-04-05 19:13:16 +00002982if test "$prefix" != "/"; then
2983 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2984fi
2985
2986
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
2988
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002989# We don't use PACKAGE_ variables, and they cause conflicts
2990# with other autoconf-based packages that include Python.h
2991grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2992rm confdefs.h
2993mv confdefs.h.new confdefs.h
2994
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002995
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002996VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002997
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002998# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002999
3000SOVERSION=1.0
3001
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002# The later defininition of _XOPEN_SOURCE disables certain features
3003# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
3007
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003008# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3009# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3010# them.
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003013
3014
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003015# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3016# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3017# them.
3018
Matthias Kloseb9621712010-04-24 17:59:49 +00003019$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003020
3021
Martin v. Löwisd6320502004-08-12 13:45:08 +00003022# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3023# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3024
Matthias Kloseb9621712010-04-24 17:59:49 +00003025$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003026
3027
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003028# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3029# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3030# them.
3031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003033
3034
3035
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003036define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003037
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003038# Arguments passed to configure.
3039
3040CONFIG_ARGS="$ac_configure_args"
3041
Matthias Kloseb9621712010-04-24 17:59:49 +00003042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3043$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003045if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047 case $enableval in
3048 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003049 # Locate the best usable SDK, see Mac/README.txt for more
3050 # information
3051 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003052 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3055 if test ! -d "${enableval}"
3056 then
3057 enableval=/
3058 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060 ;;
3061 esac
3062 case $enableval in
3063 no)
3064 UNIVERSALSDK=
3065 enable_universalsdk=
3066 ;;
3067 *)
3068 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 if test ! -d "${UNIVERSALSDK}"
3070 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003071 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003073 ;;
3074 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003075
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077else
3078
3079 UNIVERSALSDK=
3080 enable_universalsdk=
3081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003084if test -n "${UNIVERSALSDK}"
3085then
Matthias Kloseb9621712010-04-24 17:59:49 +00003086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3087$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088else
Matthias Kloseb9621712010-04-24 17:59:49 +00003089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3090$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003093
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003094
Ned Deily87adb6e2013-10-18 21:09:56 -07003095ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003096
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097# For backward compatibility reasons we prefer to select '32-bit' if available,
3098# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003100if test "`uname -s`" = "Darwin"
3101then
3102 if test -n "${UNIVERSALSDK}"
3103 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003104 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003105 then
3106 UNIVERSAL_ARCHS="intel"
3107 fi
3108 fi
3109fi
3110
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003111
Matthias Kloseb9621712010-04-24 17:59:49 +00003112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3113$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114
3115# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003116if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003117 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118 UNIVERSAL_ARCHS="$withval"
3119
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120fi
3121
Ned Deily87adb6e2013-10-18 21:09:56 -07003122if test -n "${UNIVERSALSDK}"
3123then
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3125$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3126else
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3128$as_echo "no" >&6; }
3129fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003130
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003131
3132# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003133if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003134 withval=$with_framework_name;
3135 PYTHONFRAMEWORK=${withval}
3136 PYTHONFRAMEWORKDIR=${withval}.framework
3137 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3138
3139else
3140
3141 PYTHONFRAMEWORK=Python
3142 PYTHONFRAMEWORKDIR=Python.framework
3143 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3144
3145fi
3146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003148if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003150 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003151 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003152 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003153 esac
3154 case $enableval in
3155 no)
3156 PYTHONFRAMEWORK=
3157 PYTHONFRAMEWORKDIR=no-framework
3158 PYTHONFRAMEWORKPREFIX=
3159 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003160 FRAMEWORKINSTALLFIRST=
3161 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162 FRAMEWORKALTINSTALLFIRST=
3163 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003164 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003165 if test "x${prefix}" = "xNONE"; then
3166 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3167 else
3168 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3169 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003170 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003171 ;;
3172 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003173 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003174 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003176 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003177 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3178 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003179 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003180 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003181
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003182 if test "x${prefix}" = "xNONE" ; then
3183 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003185 else
3186 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3187 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003188
3189 case "${enableval}" in
3190 /System*)
3191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3192 if test "${prefix}" = "NONE" ; then
3193 # See below
3194 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3195 fi
3196 ;;
3197
3198 /Library*)
3199 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3200 ;;
3201
3202 */Library/Frameworks)
3203 MDIR="`dirname "${enableval}"`"
3204 MDIR="`dirname "${MDIR}"`"
3205 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3206
3207 if test "${prefix}" = "NONE"; then
3208 # User hasn't specified the
3209 # --prefix option, but wants to install
3210 # the framework in a non-default location,
3211 # ensure that the compatibility links get
3212 # installed relative to that prefix as well
3213 # instead of in /usr/local.
3214 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3215 fi
3216 ;;
3217
3218 *)
3219 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3220 ;;
3221 esac
3222
Jack Jansen127e56e2001-09-11 14:41:54 +00003223 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003227 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3232
3233 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3234
Jack Jansene578a632001-08-15 01:27:14 +00003235 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003236
Guido van Rossum563e7081996-09-10 18:20:48 +00003237else
Martin v. Löwis11437992002-04-12 09:54:03 +00003238
Jack Jansene578a632001-08-15 01:27:14 +00003239 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003240 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003241 PYTHONFRAMEWORKPREFIX=
3242 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243 FRAMEWORKINSTALLFIRST=
3244 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003245 FRAMEWORKALTINSTALLFIRST=
3246 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003247 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003248 if test "x${prefix}" = "xNONE" ; then
3249 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3250 else
3251 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3252 fi
Jack Jansene578a632001-08-15 01:27:14 +00003253 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256fi
3257
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258
3259
Michael W. Hudson54241132001-12-07 15:38:26 +00003260
3261
3262
3263
Jack Jansene578a632001-08-15 01:27:14 +00003264
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003265
3266
3267
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003268
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003269
Ned Deilyb8f944f2013-11-21 22:42:25 -08003270
Jack Jansene578a632001-08-15 01:27:14 +00003271##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003272## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003273## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003274##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275# Set name for machine-dependent library files
3276
Matthias Kloseb9621712010-04-24 17:59:49 +00003277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3278$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279if test -z "$MACHDEP"
3280then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 # avoid using uname for cross builds
3282 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003283 # ac_sys_system and ac_sys_release are used for setting
3284 # a lot of different things including 'define_xopen_source'
3285 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 case "$host" in
3287 *-*-linux*)
3288 ac_sys_system=Linux
3289 ;;
3290 *-*-cygwin*)
3291 ac_sys_system=Cygwin
3292 ;;
3293 *)
3294 # for now, limit cross builds to known configurations
3295 MACHDEP="unknown"
3296 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3297 esac
3298 ac_sys_release=
3299 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003300 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003301 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003302 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003303 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003304 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003305 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003306 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003307 fi
3308 ac_md_system=`echo $ac_sys_system |
3309 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3310 ac_md_release=`echo $ac_sys_release |
3311 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3312 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003313
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003314 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003315 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003316 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003317 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003318 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003319 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003320 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003321fi
Guido van Rossum91922671997-10-09 20:24:13 +00003322
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003323
3324if test "$cross_compiling" = yes; then
3325 case "$host" in
3326 *-*-linux*)
3327 case "$host_cpu" in
3328 arm*)
3329 _host_cpu=arm
3330 ;;
3331 *)
3332 _host_cpu=$host_cpu
3333 esac
3334 ;;
3335 *-*-cygwin*)
3336 _host_cpu=
3337 ;;
3338 *)
3339 # for now, limit cross builds to known configurations
3340 MACHDEP="unknown"
3341 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3342 esac
3343 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3344fi
3345
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003346# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3347# disable features if it is defined, without any means to access these
3348# features as extensions. For these systems, we skip the definition of
3349# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3350# some feature, make sure there is no alternative way to access this
3351# feature. Also, when using wildcards, make sure you have verified the
3352# need for not defining _XOPEN_SOURCE on all systems matching the
3353# wildcard, and that the wildcard does not include future systems
3354# (which may remove their limitations).
3355case $ac_sys_system/$ac_sys_release in
3356 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3357 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003358 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003359 # In addition, Stefan Krah confirms that issue #1244610 exists through
3360 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003361 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003362 define_xopen_source=no
3363 # 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
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003368
3369 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003370 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003371 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3372 # also defined. This can be overridden by defining _BSD_SOURCE
3373 # As this has a different meaning on Linux, only define it on OpenBSD
3374
Matthias Kloseb9621712010-04-24 17:59:49 +00003375$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003376
3377 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003378 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3379 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3380 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003381 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 +00003382 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003383 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3384 # request to enable features supported by the standard as a request
3385 # to disable features not supported by the standard. The best way
3386 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3387 # entirely and define __EXTENSIONS__ instead.
3388 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003389 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003390 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3391 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003392 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003393 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003394 define_xopen_source=no;;
3395 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003396 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003397 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003398 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003399 # On FreeBSD 4, the math functions C89 does not cover are never defined
3400 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3401 FreeBSD/4.*)
3402 define_xopen_source=no;;
3403 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3404 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3405 # identifies itself as Darwin/7.*
3406 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3407 # disables platform specific features beyond repair.
3408 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3409 # has no effect, don't bother defining them
3410 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003411 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003412 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003413 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003414 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3415 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3416 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003417 AIX/4)
3418 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003419 AIX/5)
3420 if test `uname -r` -eq 1; then
3421 define_xopen_source=no
3422 fi
3423 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003424 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3425 # defining NI_NUMERICHOST.
3426 QNX/6.3.2)
3427 define_xopen_source=no
3428 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003429
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003430esac
3431
3432if test $define_xopen_source = yes
3433then
Victor Stinner14d098d2011-09-07 22:29:43 +02003434 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
Victor Stinner14d098d2011-09-07 22:29:43 +02003436$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003437
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003438
3439 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3440 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3441 # several APIs are not declared. Since this is also needed in some
3442 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003443
Matthias Kloseb9621712010-04-24 17:59:49 +00003444$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003445
3446
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003447
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003448$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003450fi
3451
Christian Heimes647cd872013-12-07 23:39:33 +01003452# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3453case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003454 hp*|HP*)
3455 define_stdc_a1=yes;;
3456 *)
3457 define_stdc_a1=no;;
3458esac
3459
3460if test $define_stdc_a1 = yes
3461then
Christian Heimes647cd872013-12-07 23:39:33 +01003462
3463$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3464
Christian Heimesb02bcae2013-12-08 15:21:08 +01003465fi
Christian Heimes647cd872013-12-07 23:39:33 +01003466
Guido van Rossum91922671997-10-09 20:24:13 +00003467#
3468# SGI compilers allow the specification of the both the ABI and the
3469# ISA on the command line. Depending on the values of these switches,
3470# different and often incompatable code will be generated.
3471#
3472# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3473# thus supply support for various ABI/ISA combinations. The MACHDEP
3474# variable is also adjusted.
3475#
3476
3477if test ! -z "$SGI_ABI"
3478then
3479 CC="cc $SGI_ABI"
3480 LDFLAGS="$SGI_ABI $LDFLAGS"
3481 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3484$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003485
Jack Jansen6b08a402004-06-03 12:41:45 +00003486# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3487# it may influence the way we can build extensions, so distutils
3488# needs to check it
3489
Thomas Wouters477c8d52006-05-27 19:21:47 +00003490
Jack Jansen6b08a402004-06-03 12:41:45 +00003491CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003492EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003493
Guido van Rossum627b2d71993-12-24 10:39:16 +00003494# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003495
3496# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3497# for debug/optimization stuff. BASECFLAGS is for flags that are required
3498# just to get things to compile and link. Users are free to override OPT
3499# when running configure or make. The build should not break if they do.
3500# BASECFLAGS should generally not be messed with, however.
3501
3502# XXX shouldn't some/most/all of this code be merged with the stuff later
3503# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3505$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003507# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003508if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003510 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003511 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003512 without_gcc=yes;;
3513 yes) CC=gcc
3514 without_gcc=no;;
3515 *) CC=$withval
3516 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003517 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003518else
Martin v. Löwis11437992002-04-12 09:54:03 +00003519
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003520 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003521 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003522 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003523 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003524 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525fi
3526
Matthias Kloseb9621712010-04-24 17:59:49 +00003527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3528$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003529
Guido van Rossum8b131c51995-03-09 14:10:13 +00003530# If the user switches compilers, we can't believe the cache
3531if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3532then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003533 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003534(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003535fi
3536
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003537# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3538# when the compiler supports them, but we don't always want -O2, and
3539# we set -g later.
3540if test -z "$CFLAGS"; then
3541 CFLAGS=
3542fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543
3544if test "$ac_sys_system" = "Darwin"
3545then
3546 # Compiler selection on MacOSX is more complicated than
3547 # AC_PROG_CC can handle, see Mac/README.txt for more
3548 # information
3549 if test -z "${CC}"
3550 then
3551 found_gcc=
3552 found_clang=
3553 as_save_IFS=$IFS; IFS=:
3554 for as_dir in $PATH
3555 do
3556 IFS=$as_save_IFS
3557 if test -x $as_dir/gcc; then
3558 if test -z "${found_gcc}"; then
3559 found_gcc=$as_dir/gcc
3560 fi
3561 fi
3562 if test -x $as_dir/clang; then
3563 if test -z "${found_clang}"; then
3564 found_clang=$as_dir/clang
3565 fi
3566 fi
3567 done
3568 IFS=$as_save_IFS
3569
3570 if test -n "$found_gcc" -a -n "$found_clang"
3571 then
3572 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3573 then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3575$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3576 CC="$found_clang"
3577 CXX="$found_clang++"
3578 fi
3579
3580
3581 elif test -z "$found_gcc" -a -n "$found_clang"
3582 then
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3584$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3585 CC="$found_clang"
3586 CXX="$found_clang++"
3587
3588 elif test -z "$found_gcc" -a -z "$found_clang"
3589 then
3590 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3591 if test -n "${found_clang}"
3592 then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3594$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3595 CC="${found_clang}"
3596 CXX="`/usr/bin/xcrun -find clang++`"
3597
3598 # else: use default behaviour
3599 fi
3600 fi
3601 fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603ac_ext=c
3604ac_cpp='$CPP $CPPFLAGS'
3605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3607ac_compiler_gnu=$ac_cv_c_compiler_gnu
3608if test -n "$ac_tool_prefix"; then
3609 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3610set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003613if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003615else
3616 if test -n "$CC"; then
3617 ac_cv_prog_CC="$CC" # Let the user override the test.
3618else
Martin v. Löwis11437992002-04-12 09:54:03 +00003619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $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 +00003628 break 2
3629 fi
3630done
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003633
Jack Jansendd19cf82001-12-06 22:36:17 +00003634fi
3635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003636CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003637if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003640else
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646fi
3647if test -z "$ac_cv_prog_CC"; then
3648 ac_ct_CC=$CC
3649 # Extract the first word of "gcc", so it can be a program name with args.
3650set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3652$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003653if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
3656 if test -n "$ac_ct_CC"; then
3657 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3658else
3659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3660for as_dir in $PATH
3661do
3662 IFS=$as_save_IFS
3663 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 $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 +00003668 break 2
3669 fi
3670done
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003673
3674fi
3675fi
3676ac_ct_CC=$ac_cv_prog_ac_ct_CC
3677if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3679$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3682$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 if test "x$ac_ct_CC" = x; then
3686 CC=""
3687 else
3688 case $cross_compiling:$ac_tool_warned in
3689yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692ac_tool_warned=yes ;;
3693esac
3694 CC=$ac_ct_CC
3695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
3697 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003698fi
3699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test -n "$ac_tool_prefix"; then
3702 # 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 +00003703set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003706if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003708else
3709 if test -n "$CC"; then
3710 ac_cv_prog_CC="$CC" # Let the user override the test.
3711else
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $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 +00003721 break 2
3722 fi
3723done
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003726
3727fi
3728fi
3729CC=$ac_cv_prog_CC
3730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741if test -z "$CC"; then
3742 # Extract the first word of "cc", so it can be a program name with args.
3743set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3745$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003746if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003748else
3749 if test -n "$CC"; then
3750 ac_cv_prog_CC="$CC" # Let the user override the test.
3751else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3754for as_dir in $PATH
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3761 ac_prog_rejected=yes
3762 continue
3763 fi
3764 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $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 +00003766 break 2
3767 fi
3768done
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003771
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772if test $ac_prog_rejected = yes; then
3773 # We found a bogon in the path, so make sure we never use it.
3774 set dummy $ac_cv_prog_CC
3775 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777 # We chose a different compiler from the bogus one.
3778 # However, it has the same basename, so the bogon will be chosen
3779 # first if we set CC to just the basename; use the full file name.
3780 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003781 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782 fi
3783fi
3784fi
3785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790else
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797if test -z "$CC"; then
3798 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 do
3801 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3804$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003805if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003807else
3808 if test -n "$CC"; then
3809 ac_cv_prog_CC="$CC" # Let the user override the test.
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3812for as_dir in $PATH
3813do
3814 IFS=$as_save_IFS
3815 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $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 +00003820 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822done
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826fi
3827fi
3828CC=$ac_cv_prog_CC
3829if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3831$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3834$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003835fi
3836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 test -n "$CC" && break
3839 done
3840fi
3841if test -z "$CC"; then
3842 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003844do
3845 # Extract the first word of "$ac_prog", so it can be a program name with args.
3846set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003849if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003851else
3852 if test -n "$ac_ct_CC"; then
3853 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3854else
3855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856for as_dir in $PATH
3857do
3858 IFS=$as_save_IFS
3859 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 $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 +00003864 break 2
3865 fi
3866done
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
3871fi
3872ac_ct_CC=$ac_cv_prog_ac_ct_CC
3873if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3875$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876else
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 test -n "$ac_ct_CC" && break
3883done
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 if test "x$ac_ct_CC" = x; then
3886 CC=""
3887 else
3888 case $cross_compiling:$ac_tool_warned in
3889yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892ac_tool_warned=yes ;;
3893esac
3894 CC=$ac_ct_CC
3895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003896fi
3897
3898fi
3899
3900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003903as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003904See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
3906# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003907$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3908set X $ac_compile
3909ac_compiler=$2
3910for ac_option in --version -v -V -qversion; do
3911 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912case "(($ac_try" in
3913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3914 *) ac_try_echo=$ac_try;;
3915esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3917$as_echo "$ac_try_echo"; } >&5
3918 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 if test -s conftest.err; then
3921 sed '10a\
3922... rest of stderr output deleted ...
3923 10q' conftest.err >conftest.er1
3924 cat conftest.er1 >&5
3925 fi
3926 rm -f conftest.er1 conftest.err
3927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3928 test $ac_status = 0; }
3929done
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003932/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003933
Martin v. Löwis11437992002-04-12 09:54:03 +00003934int
3935main ()
3936{
3937
3938 ;
3939 return 0;
3940}
3941_ACEOF
3942ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003943ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003944# Try to create an executable without -o first, disregard a.out.
3945# It will help us diagnose broken compilers, and finding out an intuition
3946# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3948$as_echo_n "checking whether the C compiler works... " >&6; }
3949ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3950
3951# The possible output files:
3952ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954ac_rmfiles=
3955for ac_file in $ac_files
3956do
3957 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3960 esac
3961done
3962rm -f $ac_rmfiles
3963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3976# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3977# in a Makefile. We should not override ac_cv_exeext if it was cached,
3978# so that the user can short-circuit this test for compilers unknown to
3979# Autoconf.
3980for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003981do
3982 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985 ;;
3986 [ab].out )
3987 # We found the default executable, but exeext='' is most
3988 # certainly right.
3989 break;;
3990 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 then :; else
3993 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3994 fi
3995 # We set ac_cv_exeext here because the later test for it is not
3996 # safe: cross compilers may not add the suffix if given an `-o'
3997 # argument, so we may need to know it at that point already.
3998 # Even if this section looks crufty: it has the advantage of
3999 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000 break;;
4001 * )
4002 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 esac
4004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005test "$ac_cv_exeext" = no && ac_cv_exeext=
4006
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004007else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_file=''
4009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004010if test -z "$ac_file"; then :
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4012$as_echo "no" >&6; }
4013$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004014sed 's/^/| /' conftest.$ac_ext >&5
4015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004018as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004019See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004020else
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4022$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4025$as_echo_n "checking for C compiler default output file name... " >&6; }
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4027$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4033$as_echo_n "checking for suffix of executables... " >&6; }
4034if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4046# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4047# work properly (i.e., refer to `conftest.exe'), while it won't with
4048# `rm'.
4049for ac_file in conftest.exe conftest conftest.*; do
4050 test -f "$ac_file" || continue
4051 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4054 break;;
4055 * ) break;;
4056 esac
4057done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058else
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004061as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004062See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004064rm -f conftest conftest$ac_cv_exeext
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4066$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067
4068rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004069EXEEXT=$ac_cv_exeext
4070ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072/* end confdefs.h. */
4073#include <stdio.h>
4074int
4075main ()
4076{
4077FILE *f = fopen ("conftest.out", "w");
4078 return ferror (f) || fclose (f) != 0;
4079
4080 ;
4081 return 0;
4082}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004084ac_clean_files="$ac_clean_files conftest.out"
4085# Check that the compiler produces executables we can run. If not, either
4086# the compiler is broken, or we cross compile.
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4088$as_echo_n "checking whether we are cross compiling... " >&6; }
4089if test "$cross_compiling" != yes; then
4090 { { ac_try="$ac_link"
4091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
4097 (eval "$ac_link") 2>&5
4098 ac_status=$?
4099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }
4101 if { ac_try='./conftest$ac_cv_exeext'
4102 { { case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
4106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107$as_echo "$ac_try_echo"; } >&5
4108 (eval "$ac_try") 2>&5
4109 ac_status=$?
4110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; }; then
4112 cross_compiling=no
4113 else
4114 if test "$cross_compiling" = maybe; then
4115 cross_compiling=yes
4116 else
4117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004119as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004120If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004121See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 fi
4123 fi
4124fi
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4126$as_echo "$cross_compiling" >&6; }
4127
4128rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4129ac_clean_files=$ac_clean_files_save
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4131$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004132if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo_n "(cached) " >&6
4134else
4135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136/* end confdefs.h. */
4137
4138int
4139main ()
4140{
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
4146rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004147if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148case "(($ac_try" in
4149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4150 *) ac_try_echo=$ac_try;;
4151esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4153$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4157 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 for ac_file in conftest.o conftest.obj conftest.*; do
4159 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4163 break;;
4164 esac
4165done
4166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004168sed 's/^/| /' conftest.$ac_ext >&5
4169
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4171$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004172as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004173See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004175rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4178$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004179OBJEXT=$ac_cv_objext
4180ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4182$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004183if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
4190main ()
4191{
4192#ifndef __GNUC__
4193 choke me
4194#endif
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 ac_compiler_gnu=yes
4202else
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_cv_c_compiler_gnu=$ac_compiler_gnu
4207
4208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4210$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4211if test $ac_compiler_gnu = yes; then
4212 GCC=yes
4213else
4214 GCC=
4215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004216ac_test_CFLAGS=${CFLAGS+set}
4217ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4219$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004220if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004222else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_save_c_werror_flag=$ac_c_werror_flag
4224 ac_c_werror_flag=yes
4225 ac_cv_prog_cc_g=no
4226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240else
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 CFLAGS=""
4242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243/* end confdefs.h. */
4244
4245int
4246main ()
4247{
4248
4249 ;
4250 return 0;
4251}
4252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004253if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254
Matthias Kloseb9621712010-04-24 17:59:49 +00004255else
4256 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
4262main ()
4263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4277 ac_c_werror_flag=$ac_save_c_werror_flag
4278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4280$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004281if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283elif test $ac_cv_prog_cc_g = yes; then
4284 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004285 CFLAGS="-g -O2"
4286 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288 fi
4289else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290 if test "$GCC" = yes; then
4291 CFLAGS="-O2"
4292 else
4293 CFLAGS=
4294 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4297$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004298if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004300else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004302ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
4305#include <stdarg.h>
4306#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004307struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4309struct buf { int x; };
4310FILE * (*rcsopen) (struct buf *, struct stat *, int);
4311static char *e (p, i)
4312 char **p;
4313 int i;
4314{
4315 return p[i];
4316}
4317static char *f (char * (*g) (char **, int), char **p, ...)
4318{
4319 char *s;
4320 va_list v;
4321 va_start (v,p);
4322 s = g (p, va_arg (v,int));
4323 va_end (v);
4324 return s;
4325}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004326
4327/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4328 function prototypes and stuff, but not '\xHH' hex character constants.
4329 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004331 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4332 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004334int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4337 inside strings and character constants. */
4338#define FOO(x) 'x'
4339int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4340
Skip Montanaro6dead952003-09-25 14:50:04 +00004341int test (int i, double x);
4342struct s1 {int (*f) (int a);};
4343struct s2 {int (*f) (double a);};
4344int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4345int argc;
4346char **argv;
4347int
4348main ()
4349{
4350return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4351 ;
4352 return 0;
4353}
4354_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4356 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004357do
4358 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f core conftest.err conftest.$ac_objext
4363 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004364done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004366CC=$ac_save_CC
4367
4368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369# AC_CACHE_VAL
4370case "x$ac_cv_prog_cc_c89" in
4371 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4373$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4376$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004377 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4380$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004381esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004382if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004383
Matthias Kloseb9621712010-04-24 17:59:49 +00004384fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386ac_ext=c
4387ac_cpp='$CPP $CPPFLAGS'
4388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004392
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004393
4394
Matthias Kloseb9621712010-04-24 17:59:49 +00004395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4396$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004399if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004400 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004401
4402 case $withval in
4403 no) with_cxx_main=no
4404 MAINCC='$(CC)';;
4405 yes) with_cxx_main=yes
4406 MAINCC='$(CXX)';;
4407 *) with_cxx_main=yes
4408 MAINCC=$withval
4409 if test -z "$CXX"
4410 then
4411 CXX=$withval
4412 fi;;
4413 esac
4414else
4415
4416 with_cxx_main=no
4417 MAINCC='$(CC)'
4418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004419fi
4420
Matthias Kloseb9621712010-04-24 17:59:49 +00004421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4422$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004423
4424preset_cxx="$CXX"
4425if test -z "$CXX"
4426then
4427 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004428 gcc) if test -n "$ac_tool_prefix"; then
4429 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4430set dummy ${ac_tool_prefix}g++; ac_word=$2
4431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4432$as_echo_n "checking for $ac_word... " >&6; }
4433if ${ac_cv_path_CXX+:} false; then :
4434 $as_echo_n "(cached) " >&6
4435else
4436 case $CXX in
4437 [\\/]* | ?:[\\/]*)
4438 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4439 ;;
4440 *)
4441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442for as_dir in notfound
4443do
4444 IFS=$as_save_IFS
4445 test -z "$as_dir" && as_dir=.
4446 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004447 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004448 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4450 break 2
4451 fi
4452done
4453 done
4454IFS=$as_save_IFS
4455
4456 ;;
4457esac
4458fi
4459CXX=$ac_cv_path_CXX
4460if test -n "$CXX"; then
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4462$as_echo "$CXX" >&6; }
4463else
4464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465$as_echo "no" >&6; }
4466fi
4467
4468
4469fi
4470if test -z "$ac_cv_path_CXX"; then
4471 ac_pt_CXX=$CXX
4472 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004473set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4475$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004476if ${ac_cv_path_ac_pt_CXX+:} false; then :
4477 $as_echo_n "(cached) " >&6
4478else
4479 case $ac_pt_CXX in
4480 [\\/]* | ?:[\\/]*)
4481 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4482 ;;
4483 *)
4484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4485for as_dir in notfound
4486do
4487 IFS=$as_save_IFS
4488 test -z "$as_dir" && as_dir=.
4489 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004490 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004491 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4492 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4493 break 2
4494 fi
4495done
4496 done
4497IFS=$as_save_IFS
4498
4499 ;;
4500esac
4501fi
4502ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4503if test -n "$ac_pt_CXX"; then
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4505$as_echo "$ac_pt_CXX" >&6; }
4506else
4507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4508$as_echo "no" >&6; }
4509fi
4510
4511 if test "x$ac_pt_CXX" = x; then
4512 CXX="g++"
4513 else
4514 case $cross_compiling:$ac_tool_warned in
4515yes:)
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4518ac_tool_warned=yes ;;
4519esac
4520 CXX=$ac_pt_CXX
4521 fi
4522else
4523 CXX="$ac_cv_path_CXX"
4524fi
4525 ;;
4526 cc) if test -n "$ac_tool_prefix"; then
4527 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4528set dummy ${ac_tool_prefix}c++; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004531if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004532 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004533else
4534 case $CXX in
4535 [\\/]* | ?:[\\/]*)
4536 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4537 ;;
4538 *)
4539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in notfound
4541do
4542 IFS=$as_save_IFS
4543 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004546 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004548 break 2
4549 fi
4550done
Matthias Kloseb9621712010-04-24 17:59:49 +00004551 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004552IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004553
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004554 ;;
4555esac
4556fi
4557CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004558if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4560$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004561else
Matthias Kloseb9621712010-04-24 17:59:49 +00004562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004565
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004566
4567fi
4568if test -z "$ac_cv_path_CXX"; then
4569 ac_pt_CXX=$CXX
4570 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004571set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4573$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004574if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004575 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004576else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004577 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004578 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004579 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 +00004580 ;;
4581 *)
4582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4583for as_dir in notfound
4584do
4585 IFS=$as_save_IFS
4586 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004587 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004589 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004591 break 2
4592 fi
4593done
Matthias Kloseb9621712010-04-24 17:59:49 +00004594 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004595IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004597 ;;
4598esac
4599fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004600ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4601if test -n "$ac_pt_CXX"; then
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4603$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004604else
Matthias Kloseb9621712010-04-24 17:59:49 +00004605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4606$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004608
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004609 if test "x$ac_pt_CXX" = x; then
4610 CXX="c++"
4611 else
4612 case $cross_compiling:$ac_tool_warned in
4613yes:)
4614{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4615$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4616ac_tool_warned=yes ;;
4617esac
4618 CXX=$ac_pt_CXX
4619 fi
4620else
4621 CXX="$ac_cv_path_CXX"
4622fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004623 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004624 clang|*/clang) if test -n "$ac_tool_prefix"; then
4625 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4626set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4628$as_echo_n "checking for $ac_word... " >&6; }
4629if ${ac_cv_path_CXX+:} false; then :
4630 $as_echo_n "(cached) " >&6
4631else
4632 case $CXX in
4633 [\\/]* | ?:[\\/]*)
4634 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4635 ;;
4636 *)
4637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638for as_dir in notfound
4639do
4640 IFS=$as_save_IFS
4641 test -z "$as_dir" && as_dir=.
4642 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004644 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646 break 2
4647 fi
4648done
4649 done
4650IFS=$as_save_IFS
4651
Ned Deilycbfb9a52012-06-23 16:02:19 -07004652 ;;
4653esac
4654fi
4655CXX=$ac_cv_path_CXX
4656if test -n "$CXX"; then
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4658$as_echo "$CXX" >&6; }
4659else
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661$as_echo "no" >&6; }
4662fi
4663
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664
4665fi
4666if test -z "$ac_cv_path_CXX"; then
4667 ac_pt_CXX=$CXX
4668 # Extract the first word of "clang++", so it can be a program name with args.
4669set dummy clang++; ac_word=$2
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671$as_echo_n "checking for $ac_word... " >&6; }
4672if ${ac_cv_path_ac_pt_CXX+:} false; then :
4673 $as_echo_n "(cached) " >&6
4674else
4675 case $ac_pt_CXX in
4676 [\\/]* | ?:[\\/]*)
4677 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4678 ;;
4679 *)
4680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4681for as_dir in notfound
4682do
4683 IFS=$as_save_IFS
4684 test -z "$as_dir" && as_dir=.
4685 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004687 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4689 break 2
4690 fi
4691done
4692 done
4693IFS=$as_save_IFS
4694
4695 ;;
4696esac
4697fi
4698ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4699if test -n "$ac_pt_CXX"; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4701$as_echo "$ac_pt_CXX" >&6; }
4702else
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707 if test "x$ac_pt_CXX" = x; then
4708 CXX="clang++"
4709 else
4710 case $cross_compiling:$ac_tool_warned in
4711yes:)
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4713$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4714ac_tool_warned=yes ;;
4715esac
4716 CXX=$ac_pt_CXX
4717 fi
4718else
4719 CXX="$ac_cv_path_CXX"
4720fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004721 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004722 esac
4723 if test "$CXX" = "notfound"
4724 then
4725 CXX=""
4726 fi
4727fi
4728if test -z "$CXX"
4729then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004730 if test -n "$ac_tool_prefix"; then
4731 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4732 do
4733 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4734set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4736$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004737if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739else
4740 if test -n "$CXX"; then
4741 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4742else
4743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4744for as_dir in $PATH
4745do
4746 IFS=$as_save_IFS
4747 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004749 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004750 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752 break 2
4753 fi
4754done
Matthias Kloseb9621712010-04-24 17:59:49 +00004755 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004756IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004757
4758fi
4759fi
4760CXX=$ac_cv_prog_CXX
4761if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4763$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764else
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767fi
4768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004769
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004770 test -n "$CXX" && break
4771 done
4772fi
4773if test -z "$CXX"; then
4774 ac_ct_CXX=$CXX
4775 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4776do
4777 # Extract the first word of "$ac_prog", so it can be a program name with args.
4778set dummy $ac_prog; ac_word=$2
4779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4780$as_echo_n "checking for $ac_word... " >&6; }
4781if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4782 $as_echo_n "(cached) " >&6
4783else
4784 if test -n "$ac_ct_CXX"; then
4785 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4786else
4787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in $PATH
4789do
4790 IFS=$as_save_IFS
4791 test -z "$as_dir" && as_dir=.
4792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004794 ac_cv_prog_ac_ct_CXX="$ac_prog"
4795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4796 break 2
4797 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799 done
4800IFS=$as_save_IFS
4801
4802fi
4803fi
4804ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4805if test -n "$ac_ct_CXX"; then
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4807$as_echo "$ac_ct_CXX" >&6; }
4808else
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4810$as_echo "no" >&6; }
4811fi
4812
4813
4814 test -n "$ac_ct_CXX" && break
4815done
4816
4817 if test "x$ac_ct_CXX" = x; then
4818 CXX="notfound"
4819 else
4820 case $cross_compiling:$ac_tool_warned in
4821yes:)
4822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4824ac_tool_warned=yes ;;
4825esac
4826 CXX=$ac_ct_CXX
4827 fi
4828fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829
4830 if test "$CXX" = "notfound"
4831 then
4832 CXX=""
4833 fi
4834fi
4835if test "$preset_cxx" != "$CXX"
4836then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004837 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838
4839 By default, distutils will build C++ extension modules with \"$CXX\".
4840 If this is not intended, then set CXX on the configure command line.
4841 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004842$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843
4844 By default, distutils will build C++ extension modules with \"$CXX\".
4845 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004846 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847fi
4848
4849
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4851$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4852save_LDFLAGS="$LDFLAGS"
4853LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004854
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4856/* end confdefs.h. */
4857
4858int
4859main ()
4860{
4861
4862 ;
4863 return 0;
4864}
4865_ACEOF
4866if ac_fn_c_try_link "$LINENO"; then :
4867 NO_AS_NEEDED="-Wl,--no-as-needed"
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4869$as_echo "yes" >&6; }
4870else
4871 NO_AS_NEEDED=""
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
4874fi
4875rm -f core conftest.err conftest.$ac_objext \
4876 conftest$ac_exeext conftest.$ac_ext
4877LDFLAGS="$save_LDFLAGS"
4878
4879
4880
4881# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004882ac_ext=c
4883ac_cpp='$CPP $CPPFLAGS'
4884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4886ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4888$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004889# On Suns, sometimes $CPP names a directory.
4890if test -n "$CPP" && test -d "$CPP"; then
4891 CPP=
4892fi
4893if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004894 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004895 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004896else
Martin v. Löwis11437992002-04-12 09:54:03 +00004897 # Double quotes because CPP needs to be expanded
4898 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4899 do
4900 ac_preproc_ok=false
4901for ac_c_preproc_warn_flag in '' yes
4902do
4903 # Use a header file that comes with gcc, so configuring glibc
4904 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004905 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4906 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004907 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004908 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004910/* end confdefs.h. */
4911#ifdef __STDC__
4912# include <limits.h>
4913#else
4914# include <assert.h>
4915#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004916 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004918if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004919
Matthias Kloseb9621712010-04-24 17:59:49 +00004920else
Martin v. Löwis11437992002-04-12 09:54:03 +00004921 # Broken: fails on valid input.
4922continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004923fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004924rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004926 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004927 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004930#include <ac_nonexistent.h>
4931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004932if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 # Broken: success on invalid input.
4934continue
4935else
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 # Passes both tests.
4937ac_preproc_ok=:
4938break
4939fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004940rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004941
4942done
4943# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004944rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004945if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 break
4947fi
4948
4949 done
4950 ac_cv_prog_CPP=$CPP
4951
4952fi
4953 CPP=$ac_cv_prog_CPP
4954else
4955 ac_cv_prog_CPP=$CPP
4956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4958$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004959ac_preproc_ok=false
4960for ac_c_preproc_warn_flag in '' yes
4961do
4962 # Use a header file that comes with gcc, so configuring glibc
4963 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004964 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4965 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004966 # On the NeXT, cc -E runs the code through the compiler's parser,
4967 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004969/* end confdefs.h. */
4970#ifdef __STDC__
4971# include <limits.h>
4972#else
4973# include <assert.h>
4974#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004975 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004977if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004978
Matthias Kloseb9621712010-04-24 17:59:49 +00004979else
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 # Broken: fails on valid input.
4981continue
4982fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004983rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004986 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004989#include <ac_nonexistent.h>
4990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004991if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 # Broken: success on invalid input.
4993continue
4994else
Martin v. Löwis11437992002-04-12 09:54:03 +00004995 # Passes both tests.
4996ac_preproc_ok=:
4997break
4998fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004999rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005000
5001done
5002# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005003rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005004if $ac_preproc_ok; then :
5005
Martin v. Löwis11437992002-04-12 09:54:03 +00005006else
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005009as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005010See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005011fi
5012
5013ac_ext=c
5014ac_cpp='$CPP $CPPFLAGS'
5015ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5016ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5017ac_compiler_gnu=$ac_cv_c_compiler_gnu
5018
5019
Matthias Kloseb9621712010-04-24 17:59:49 +00005020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5021$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005022if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005024else
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 # Loop through the user's path and test for each of PROGNAME-LIST
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005029for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 for ac_prog in grep ggrep; do
5034 for ac_exec_ext in '' $ac_executable_extensions; do
5035 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005036 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005037# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038 # Check for GNU $ac_path_GREP
5039case `"$ac_path_GREP" --version 2>&1` in
5040*GNU*)
5041 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5042*)
5043 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005045 while :
5046 do
5047 cat "conftest.in" "conftest.in" >"conftest.tmp"
5048 mv "conftest.tmp" "conftest.in"
5049 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005051 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5052 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5055 # Best one so far, save it but keep looking for a better one
5056 ac_cv_path_GREP="$ac_path_GREP"
5057 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005058 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059 # 10*(2^10) chars as input seems more than enough
5060 test $ac_count -gt 10 && break
5061 done
5062 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5063esac
5064
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 $ac_path_GREP_found && break 3
5066 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005067 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005071 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 +00005072 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073else
5074 ac_cv_path_GREP=$GREP
5075fi
5076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5079$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005080 GREP="$ac_cv_path_GREP"
5081
5082
Matthias Kloseb9621712010-04-24 17:59:49 +00005083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5084$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005085if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087else
5088 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5089 then ac_cv_path_EGREP="$GREP -E"
5090 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 # Loop through the user's path and test for each of PROGNAME-LIST
5094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005095for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5096do
5097 IFS=$as_save_IFS
5098 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 for ac_prog in egrep; do
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005102 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005103# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104 # Check for GNU $ac_path_EGREP
5105case `"$ac_path_EGREP" --version 2>&1` in
5106*GNU*)
5107 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5108*)
5109 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005111 while :
5112 do
5113 cat "conftest.in" "conftest.in" >"conftest.tmp"
5114 mv "conftest.tmp" "conftest.in"
5115 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005117 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5118 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5121 # Best one so far, save it but keep looking for a better one
5122 ac_cv_path_EGREP="$ac_path_EGREP"
5123 ac_path_EGREP_max=$ac_count
5124 fi
5125 # 10*(2^10) chars as input seems more than enough
5126 test $ac_count -gt 10 && break
5127 done
5128 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5129esac
5130
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 $ac_path_EGREP_found && break 3
5132 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005133 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005134 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005135IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005137 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 +00005138 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005139else
5140 ac_cv_path_EGREP=$EGREP
5141fi
5142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143 fi
5144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5146$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005147 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005148
5149
Matthias Kloseb9621712010-04-24 17:59:49 +00005150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5151$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005152if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005153 $as_echo_n "(cached) " >&6
5154else
5155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005156/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005157#include <stdlib.h>
5158#include <stdarg.h>
5159#include <string.h>
5160#include <float.h>
5161
5162int
5163main ()
5164{
5165
5166 ;
5167 return 0;
5168}
5169_ACEOF
5170if ac_fn_c_try_compile "$LINENO"; then :
5171 ac_cv_header_stdc=yes
5172else
5173 ac_cv_header_stdc=no
5174fi
5175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5176
5177if test $ac_cv_header_stdc = yes; then
5178 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5180/* end confdefs.h. */
5181#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005182
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005183_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005185 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005187else
Matthias Kloseb9621712010-04-24 17:59:49 +00005188 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005189fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005190rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191
Matthias Kloseb9621712010-04-24 17:59:49 +00005192fi
5193
5194if test $ac_cv_header_stdc = yes; then
5195 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5197/* end confdefs.h. */
5198#include <stdlib.h>
5199
5200_ACEOF
5201if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5202 $EGREP "free" >/dev/null 2>&1; then :
5203
5204else
5205 ac_cv_header_stdc=no
5206fi
5207rm -f conftest*
5208
5209fi
5210
5211if test $ac_cv_header_stdc = yes; then
5212 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5213 if test "$cross_compiling" = yes; then :
5214 :
5215else
5216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5217/* end confdefs.h. */
5218#include <ctype.h>
5219#include <stdlib.h>
5220#if ((' ' & 0x0FF) == 0x020)
5221# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5222# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5223#else
5224# define ISLOWER(c) \
5225 (('a' <= (c) && (c) <= 'i') \
5226 || ('j' <= (c) && (c) <= 'r') \
5227 || ('s' <= (c) && (c) <= 'z'))
5228# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5229#endif
5230
5231#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5232int
5233main ()
5234{
5235 int i;
5236 for (i = 0; i < 256; i++)
5237 if (XOR (islower (i), ISLOWER (i))
5238 || toupper (i) != TOUPPER (i))
5239 return 2;
5240 return 0;
5241}
5242_ACEOF
5243if ac_fn_c_try_run "$LINENO"; then :
5244
5245else
5246 ac_cv_header_stdc=no
5247fi
5248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5249 conftest.$ac_objext conftest.beam conftest.$ac_ext
5250fi
5251
5252fi
5253fi
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5255$as_echo "$ac_cv_header_stdc" >&6; }
5256if test $ac_cv_header_stdc = yes; then
5257
5258$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5259
5260fi
5261
5262# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5263for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5264 inttypes.h stdint.h unistd.h
5265do :
5266 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5267ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5268"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005269if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005270 cat >>confdefs.h <<_ACEOF
5271#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5272_ACEOF
5273
5274fi
5275
5276done
5277
5278
5279
5280 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 +02005281if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005282 MINIX=yes
5283else
5284 MINIX=
5285fi
5286
5287
5288 if test "$MINIX" = yes; then
5289
5290$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5291
5292
5293$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5294
5295
5296$as_echo "#define _MINIX 1" >>confdefs.h
5297
5298 fi
5299
5300
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5302$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005303if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005304 $as_echo_n "(cached) " >&6
5305else
5306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5307/* end confdefs.h. */
5308
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005309# define __EXTENSIONS__ 1
5310 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005311int
5312main ()
5313{
5314
5315 ;
5316 return 0;
5317}
5318_ACEOF
5319if ac_fn_c_try_compile "$LINENO"; then :
5320 ac_cv_safe_to_define___extensions__=yes
5321else
5322 ac_cv_safe_to_define___extensions__=no
5323fi
5324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5325fi
5326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5327$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5328 test $ac_cv_safe_to_define___extensions__ = yes &&
5329 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5330
5331 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5332
5333 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5334
5335 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5336
5337 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5338
5339
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341# Check for unsupported systems
5342case $ac_sys_system/$ac_sys_release in
5343atheos*|Linux*/1*)
5344 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5345 echo See README for details.
5346 exit 1;;
5347esac
5348
5349
Matthias Kloseb9621712010-04-24 17:59:49 +00005350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5351$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352
5353# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005354if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355 withval=$with_suffix;
5356 case $withval in
5357 no) EXEEXT=;;
5358 yes) EXEEXT=.exe;;
5359 *) EXEEXT=$withval;;
5360 esac
5361fi
5362
Matthias Kloseb9621712010-04-24 17:59:49 +00005363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5364$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365
5366# Test whether we're running on a non-case-sensitive system, in which
5367# case we give a warning if no ext is given
5368
Matthias Kloseb9621712010-04-24 17:59:49 +00005369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5370$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371if test ! -d CaseSensitiveTestDir; then
5372mkdir CaseSensitiveTestDir
5373fi
5374
5375if test -d casesensitivetestdir
5376then
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5378$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379 BUILDEXEEXT=.exe
5380else
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383 BUILDEXEEXT=$EXEEXT
5384fi
5385rmdir CaseSensitiveTestDir
5386
5387case $MACHDEP in
5388bsdos*)
5389 case $CC in
5390 gcc) CC="$CC -D_HAVE_BSDI";;
5391 esac;;
5392esac
5393
5394case $ac_sys_system in
5395hp*|HP*)
5396 case $CC in
5397 cc|*/cc) CC="$CC -Ae";;
5398 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399esac
5400
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005401MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5402
5403
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
5405
Matthias Kloseb9621712010-04-24 17:59:49 +00005406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5407$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408if test -z "$LIBRARY"
5409then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005410 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5413$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414
5415# LDLIBRARY is the name of the library to link against (as opposed to the
5416# name of the library into which to insert object files). BLDLIBRARY is also
5417# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5418# is blank as the main program is not linked directly against LDLIBRARY.
5419# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5420# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5421# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5422# DLLLIBRARY is the shared (i.e., DLL) library.
5423#
5424# RUNSHARED is used to run shared python without installed libraries
5425#
5426# INSTSONAME is the name of the shared library that will be use to install
5427# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005428#
5429# LDVERSION is the shared library version number, normally the Python version
5430# with the ABI build flags appended.
5431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432
5433
5434
5435
5436
5437
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005438
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439LDLIBRARY="$LIBRARY"
5440BLDLIBRARY='$(LDLIBRARY)'
5441INSTSONAME='$(LDLIBRARY)'
5442DLLLIBRARY=''
5443LDLIBRARYDIR=''
5444RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005445LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446
5447# LINKCC is the command that links the python executable -- default is $(CC).
5448# If CXX is set, and if it is needed to link a main function that was
5449# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5450# python might then depend on the C++ runtime
5451# This is altered for AIX in order to build the export list before
5452# linking.
5453
Matthias Kloseb9621712010-04-24 17:59:49 +00005454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5455$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456if test -z "$LINKCC"
5457then
5458 LINKCC='$(PURIFY) $(MAINCC)'
5459 case $ac_sys_system in
5460 AIX*)
5461 exp_extra="\"\""
5462 if test $ac_sys_release -ge 5 -o \
5463 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5464 exp_extra="."
5465 fi
5466 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005467 QNX*)
5468 # qcc must be used because the other compilers do not
5469 # support -N.
5470 LINKCC=qcc;;
5471 esac
5472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5474$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
5476# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5477# make sure we default having it set to "no": this is used by
5478# distutils.unixccompiler to know if it should add --enable-new-dtags
5479# to linker command lines, and failing to detect GNU ld simply results
5480# in the same bahaviour as before.
5481
Matthias Kloseb9621712010-04-24 17:59:49 +00005482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5483$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484ac_prog=ld
5485if test "$GCC" = yes; then
5486 ac_prog=`$CC -print-prog-name=ld`
5487fi
5488case `"$ac_prog" -V 2>&1 < /dev/null` in
5489 *GNU*)
5490 GNULD=yes;;
5491 *)
5492 GNULD=no;;
5493esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5495$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5498$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005499if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005500 $as_echo_n "(cached) " >&6
5501else
5502 ac_cv_c_inline=no
5503for ac_kw in inline __inline__ __inline; do
5504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5505/* end confdefs.h. */
5506#ifndef __cplusplus
5507typedef int foo_t;
5508static $ac_kw foo_t static_foo () {return 0; }
5509$ac_kw foo_t foo () {return 0; }
5510#endif
5511
5512_ACEOF
5513if ac_fn_c_try_compile "$LINENO"; then :
5514 ac_cv_c_inline=$ac_kw
5515fi
5516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5517 test "$ac_cv_c_inline" != no && break
5518done
5519
5520fi
5521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5522$as_echo "$ac_cv_c_inline" >&6; }
5523
5524case $ac_cv_c_inline in
5525 inline | yes) ;;
5526 *)
5527 case $ac_cv_c_inline in
5528 no) ac_val=;;
5529 *) ac_val=$ac_cv_c_inline;;
5530 esac
5531 cat >>confdefs.h <<_ACEOF
5532#ifndef __cplusplus
5533#define inline $ac_val
5534#endif
5535_ACEOF
5536 ;;
5537esac
5538
5539if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005540
5541$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005542
5543
5544fi
5545
5546
Matthias Kloseb9621712010-04-24 17:59:49 +00005547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5548$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005550if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551 enableval=$enable_shared;
5552fi
5553
5554
5555if test -z "$enable_shared"
5556then
5557 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005558 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559 enable_shared="yes";;
5560 *)
5561 enable_shared="no";;
5562 esac
5563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5565$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566
Matthias Kloseb9621712010-04-24 17:59:49 +00005567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5568$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005570if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005571 enableval=$enable_profiling;
5572fi
5573
5574if test "x$enable_profiling" = xyes; then
5575 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005576 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578/* end confdefs.h. */
5579int main() { return 0; }
5580_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005581if ac_fn_c_try_link "$LINENO"; then :
5582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005584 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005586rm -f core conftest.err conftest.$ac_objext \
5587 conftest$ac_exeext conftest.$ac_ext
5588 CC="$ac_save_cc"
5589else
5590 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5593$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594
doko@ubuntu.comba015832012-06-30 16:52:05 +02005595if test "x$enable_profiling" = xyes; then
5596 BASECFLAGS="-pg $BASECFLAGS"
5597 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598fi
5599
Matthias Kloseb9621712010-04-24 17:59:49 +00005600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5601$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602
5603# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5604# library that we build, but we do not want to link against it (we
5605# will find it with a -framework option). For this reason there is an
5606# extra variable BLDLIBRARY against which Python and the extension
5607# modules are linked, BLDLIBRARY. This is normally the same as
5608# LDLIBRARY, but empty for MacOSX framework builds.
5609if test "$enable_framework"
5610then
5611 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005612 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 BLDLIBRARY=''
5614else
5615 BLDLIBRARY='$(LDLIBRARY)'
5616fi
5617
5618# Other platforms follow
5619if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005620 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621
Matthias Kloseb9621712010-04-24 17:59:49 +00005622$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623
5624 case $ac_sys_system in
5625 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005626 LDLIBRARY='libpython$(LDVERSION).dll.a'
5627 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628 ;;
5629 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).so'
5631 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005632 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005634 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005635 then
5636 PY3LIBRARY=libpython3.so
5637 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005639 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005640 LDLIBRARY='libpython$(LDVERSION).so'
5641 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005642 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 case $ac_sys_system in
5644 FreeBSD*)
5645 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5646 ;;
5647 esac
5648 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005649 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005650 then
5651 PY3LIBRARY=libpython3.so
5652 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 ;;
5654 hp*|HP*)
5655 case `uname -m` in
5656 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005657 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 ;;
5659 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005660 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 ;;
5662 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005663 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005664 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005667 LDLIBRARY='libpython$(LDVERSION).dylib'
5668 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005669 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005671 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005672 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005673 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005674 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675
5676 esac
5677else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005678 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 case $ac_sys_system in
5680 CYGWIN*)
5681 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005682 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 ;;
5684 esac
5685fi
5686
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005687if test "$cross_compiling" = yes; then
5688 RUNSHARED=
5689fi
5690
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5692$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694if test -n "$ac_tool_prefix"; then
5695 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5696set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5698$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005699if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701else
5702 if test -n "$RANLIB"; then
5703 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5704else
5705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5706for as_dir in $PATH
5707do
5708 IFS=$as_save_IFS
5709 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714 break 2
5715 fi
5716done
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718IFS=$as_save_IFS
5719
5720fi
5721fi
5722RANLIB=$ac_cv_prog_RANLIB
5723if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5725$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726else
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729fi
5730
5731
5732fi
5733if test -z "$ac_cv_prog_RANLIB"; then
5734 ac_ct_RANLIB=$RANLIB
5735 # Extract the first word of "ranlib", so it can be a program name with args.
5736set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5738$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005739if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005740 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741else
5742 if test -n "$ac_ct_RANLIB"; then
5743 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5744else
5745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5746for as_dir in $PATH
5747do
5748 IFS=$as_save_IFS
5749 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754 break 2
5755 fi
5756done
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758IFS=$as_save_IFS
5759
5760fi
5761fi
5762ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5763if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5765$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766else
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769fi
5770
5771 if test "x$ac_ct_RANLIB" = x; then
5772 RANLIB=":"
5773 else
5774 case $cross_compiling:$ac_tool_warned in
5775yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778ac_tool_warned=yes ;;
5779esac
5780 RANLIB=$ac_ct_RANLIB
5781 fi
5782else
5783 RANLIB="$ac_cv_prog_RANLIB"
5784fi
5785
5786
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005787if test -n "$ac_tool_prefix"; then
5788 for ac_prog in ar aal
5789 do
5790 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5791set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005794if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005795 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796else
5797 if test -n "$AR"; then
5798 ac_cv_prog_AR="$AR" # Let the user override the test.
5799else
5800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5801for as_dir in $PATH
5802do
5803 IFS=$as_save_IFS
5804 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005805 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005807 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 break 2
5810 fi
5811done
Matthias Kloseb9621712010-04-24 17:59:49 +00005812 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813IFS=$as_save_IFS
5814
5815fi
5816fi
5817AR=$ac_cv_prog_AR
5818if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5820$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821else
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5823$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824fi
5825
5826
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005827 test -n "$AR" && break
5828 done
5829fi
5830if test -z "$AR"; then
5831 ac_ct_AR=$AR
5832 for ac_prog in ar aal
5833do
5834 # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_prog_ac_ct_AR+:} false; then :
5839 $as_echo_n "(cached) " >&6
5840else
5841 if test -n "$ac_ct_AR"; then
5842 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5843else
5844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847 IFS=$as_save_IFS
5848 test -z "$as_dir" && as_dir=.
5849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005851 ac_cv_prog_ac_ct_AR="$ac_prog"
5852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5853 break 2
5854 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005856 done
5857IFS=$as_save_IFS
5858
5859fi
5860fi
5861ac_ct_AR=$ac_cv_prog_ac_ct_AR
5862if test -n "$ac_ct_AR"; then
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5864$as_echo "$ac_ct_AR" >&6; }
5865else
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867$as_echo "no" >&6; }
5868fi
5869
5870
5871 test -n "$ac_ct_AR" && break
5872done
5873
5874 if test "x$ac_ct_AR" = x; then
5875 AR="ar"
5876 else
5877 case $cross_compiling:$ac_tool_warned in
5878yes:)
5879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5881ac_tool_warned=yes ;;
5882esac
5883 AR=$ac_ct_AR
5884 fi
5885fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887
5888# tweak ARFLAGS only if the user didn't set it on the command line
5889
5890if test -z "$ARFLAGS"
5891then
5892 ARFLAGS="rc"
5893fi
5894
doko@ubuntu.com58844492012-06-30 18:25:32 +02005895if test -n "$ac_tool_prefix"; then
5896 for ac_prog in readelf
5897 do
5898 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5899set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5901$as_echo_n "checking for $ac_word... " >&6; }
5902if ${ac_cv_prog_READELF+:} false; then :
5903 $as_echo_n "(cached) " >&6
5904else
5905 if test -n "$READELF"; then
5906 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5907else
5908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911 IFS=$as_save_IFS
5912 test -z "$as_dir" && as_dir=.
5913 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005915 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917 break 2
5918 fi
5919done
5920 done
5921IFS=$as_save_IFS
5922
5923fi
5924fi
5925READELF=$ac_cv_prog_READELF
5926if test -n "$READELF"; then
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5928$as_echo "$READELF" >&6; }
5929else
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931$as_echo "no" >&6; }
5932fi
5933
5934
5935 test -n "$READELF" && break
5936 done
5937fi
5938if test -z "$READELF"; then
5939 ac_ct_READELF=$READELF
5940 for ac_prog in readelf
5941do
5942 # Extract the first word of "$ac_prog", so it can be a program name with args.
5943set dummy $ac_prog; ac_word=$2
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945$as_echo_n "checking for $ac_word... " >&6; }
5946if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5947 $as_echo_n "(cached) " >&6
5948else
5949 if test -n "$ac_ct_READELF"; then
5950 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5951else
5952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5953for as_dir in $PATH
5954do
5955 IFS=$as_save_IFS
5956 test -z "$as_dir" && as_dir=.
5957 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005959 ac_cv_prog_ac_ct_READELF="$ac_prog"
5960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5961 break 2
5962 fi
5963done
5964 done
5965IFS=$as_save_IFS
5966
5967fi
5968fi
5969ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5970if test -n "$ac_ct_READELF"; then
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5972$as_echo "$ac_ct_READELF" >&6; }
5973else
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5975$as_echo "no" >&6; }
5976fi
5977
5978
5979 test -n "$ac_ct_READELF" && break
5980done
5981
5982 if test "x$ac_ct_READELF" = x; then
5983 READELF=":"
5984 else
5985 case $cross_compiling:$ac_tool_warned in
5986yes:)
5987{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5988$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5989ac_tool_warned=yes ;;
5990esac
5991 READELF=$ac_ct_READELF
5992 fi
5993fi
5994
5995if test "$cross_compiling" = yes; then
5996 case "$READELF" in
5997 readelf|:)
5998 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5999 ;;
6000 esac
6001fi
6002
6003
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004
Matthias Klosec4c48422012-10-21 23:05:35 +02006005for ac_prog in python$PACKAGE_VERSION python3 python
6006do
6007 # Extract the first word of "$ac_prog", so it can be a program name with args.
6008set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6010$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006011if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006012 $as_echo_n "(cached) " >&6
6013else
Matthias Klosec4c48422012-10-21 23:05:35 +02006014 if test -n "$PYTHON"; then
6015 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006016else
6017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6018for as_dir in $PATH
6019do
6020 IFS=$as_save_IFS
6021 test -z "$as_dir" && as_dir=.
6022 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006024 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6026 break 2
6027 fi
6028done
6029 done
6030IFS=$as_save_IFS
6031
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006032fi
6033fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006034PYTHON=$ac_cv_prog_PYTHON
6035if test -n "$PYTHON"; then
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6037$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006038else
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040$as_echo "no" >&6; }
6041fi
6042
6043
Matthias Klosec4c48422012-10-21 23:05:35 +02006044 test -n "$PYTHON" && break
6045done
6046test -n "$PYTHON" || PYTHON="not-found"
6047
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006048if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006049 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6050else
6051 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006052fi
6053
6054
Kushal Das02d23a22014-04-15 23:50:06 +05306055for ac_prog in python$PACKAGE_VERSION python3 python
6056do
6057 # Extract the first word of "$ac_prog", so it can be a program name with args.
6058set dummy $ac_prog; ac_word=$2
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6060$as_echo_n "checking for $ac_word... " >&6; }
6061if ${ac_cv_prog_PYTHON+:} false; then :
6062 $as_echo_n "(cached) " >&6
6063else
6064 if test -n "$PYTHON"; then
6065 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6066else
6067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6068for as_dir in $PATH
6069do
6070 IFS=$as_save_IFS
6071 test -z "$as_dir" && as_dir=.
6072 for ac_exec_ext in '' $ac_executable_extensions; do
6073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6074 ac_cv_prog_PYTHON="$ac_prog"
6075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6076 break 2
6077 fi
6078done
6079 done
6080IFS=$as_save_IFS
6081
6082fi
6083fi
6084PYTHON=$ac_cv_prog_PYTHON
6085if test -n "$PYTHON"; then
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6087$as_echo "$PYTHON" >&6; }
6088else
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090$as_echo "no" >&6; }
6091fi
6092
6093
6094 test -n "$PYTHON" && break
6095done
6096test -n "$PYTHON" || PYTHON="not-found"
6097
6098if test "$PYTHON" = not-found; then
6099 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6100else
6101 OPCODEHGEN="$PYTHON"
6102fi
6103
6104
6105
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106case $MACHDEP in
6107bsdos*|hp*|HP*)
6108 # install -d does not work on BSDI or HP-UX
6109 if test -z "$INSTALL"
6110 then
6111 INSTALL="${srcdir}/install-sh -c"
6112 fi
6113esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114# Find a good install program. We prefer a C program (faster),
6115# so one script is as good as another. But avoid the broken or
6116# incompatible versions:
6117# SysV /etc/install, /usr/sbin/install
6118# SunOS /usr/etc/install
6119# IRIX /sbin/install
6120# AIX /bin/install
6121# AmigaOS /C/install, which installs bootblocks on floppy discs
6122# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6123# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6124# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6125# OS/2's system install, which has a completely different semantic
6126# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006127# Reject install programs that cannot install multiple files.
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6129$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006131if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006132 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133else
6134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135for as_dir in $PATH
6136do
6137 IFS=$as_save_IFS
6138 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006139 # Account for people who put trailing slashes in PATH elements.
6140case $as_dir/ in #((
6141 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144 /usr/ucb/* ) ;;
6145 *)
6146 # OSF1 and SCO ODT 3.0 have their own names for install.
6147 # Don't use installbsd from OSF since it installs stuff as root
6148 # by default.
6149 for ac_prog in ginstall scoinst install; do
6150 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006151 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152 if test $ac_prog = install &&
6153 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6154 # AIX install. It has an incompatible calling convention.
6155 :
6156 elif test $ac_prog = install &&
6157 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6158 # program-specific install script used by HP pwplus--don't use.
6159 :
6160 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006161 rm -rf conftest.one conftest.two conftest.dir
6162 echo one > conftest.one
6163 echo two > conftest.two
6164 mkdir conftest.dir
6165 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6166 test -s conftest.one && test -s conftest.two &&
6167 test -s conftest.dir/conftest.one &&
6168 test -s conftest.dir/conftest.two
6169 then
6170 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6171 break 3
6172 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173 fi
6174 fi
6175 done
6176 done
6177 ;;
6178esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006179
6180 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181IFS=$as_save_IFS
6182
Matthias Kloseb9621712010-04-24 17:59:49 +00006183rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184
6185fi
6186 if test "${ac_cv_path_install+set}" = set; then
6187 INSTALL=$ac_cv_path_install
6188 else
6189 # As a last resort, use the slow shell script. Don't cache a
6190 # value for INSTALL within a source directory, because that will
6191 # break other packages using the cache if that directory is
6192 # removed, or if the value is a relative name.
6193 INSTALL=$ac_install_sh
6194 fi
6195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6197$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198
6199# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6200# It thinks the first close brace ends the variable substitution.
6201test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6202
6203test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6204
6205test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6206
Matthias Klose93a0ef12012-03-15 18:08:34 +01006207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6208$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6209if test -z "$MKDIR_P"; then
6210 if ${ac_cv_path_mkdir+:} false; then :
6211 $as_echo_n "(cached) " >&6
6212else
6213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6214for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6215do
6216 IFS=$as_save_IFS
6217 test -z "$as_dir" && as_dir=.
6218 for ac_prog in mkdir gmkdir; do
6219 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006220 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006221 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6222 'mkdir (GNU coreutils) '* | \
6223 'mkdir (coreutils) '* | \
6224 'mkdir (fileutils) '4.1*)
6225 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6226 break 3;;
6227 esac
6228 done
6229 done
6230 done
6231IFS=$as_save_IFS
6232
6233fi
6234
6235 test -d ./--version && rmdir ./--version
6236 if test "${ac_cv_path_mkdir+set}" = set; then
6237 MKDIR_P="$ac_cv_path_mkdir -p"
6238 else
6239 # As a last resort, use the slow shell script. Don't cache a
6240 # value for MKDIR_P within a source directory, because that will
6241 # break other packages using the cache if that directory is
6242 # removed, or if the value is a relative name.
6243 MKDIR_P="$ac_install_sh -d"
6244 fi
6245fi
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6247$as_echo "$MKDIR_P" >&6; }
6248
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249
6250# Not every filesystem supports hard links
6251
6252if test -z "$LN" ; then
6253 case $ac_sys_system in
6254 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006255 *) LN=ln;;
6256 esac
6257fi
6258
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006259# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006260
6261ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006262
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6265$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266
6267# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006268if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269 withval=$with_pydebug;
6270if test "$withval" != no
6271then
6272
Matthias Kloseb9621712010-04-24 17:59:49 +00006273$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274
Matthias Kloseb9621712010-04-24 17:59:49 +00006275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6276$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006278 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006279else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281fi
6282else
Matthias Kloseb9621712010-04-24 17:59:49 +00006283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6284$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285fi
6286
6287
6288# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6289# merged with this chunk of code?
6290
6291# Optimizer/debugger flags
6292# ------------------------
6293# (The following bit of code is complicated enough - please keep things
6294# indented properly. Just pretend you're editing Python code. ;-)
6295
6296# There are two parallel sets of case statements below, one that checks to
6297# see if OPT was set and one that does BASECFLAGS setting based upon
6298# compiler and platform. BASECFLAGS tweaks need to be made even if the
6299# user set OPT.
6300
6301# tweak OPT based on compiler and platform, only if the user didn't set
6302# it on the command line
6303
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006304if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305then
6306 case $GCC in
6307 yes)
6308 if test "$CC" != 'g++' ; then
6309 STRICT_PROTO="-Wstrict-prototypes"
6310 fi
6311 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6312 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6313 WRAP="-fwrapv"
6314 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006315
6316 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006317 case $CC in
6318 *clang*) WRAP="-fwrapv"
6319 ;;
6320 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006321
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 case $ac_cv_prog_cc_g in
6323 yes)
6324 if test "$Py_DEBUG" = 'true' ; then
6325 # Optimization messes up debuggers, so turn it off for
6326 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006327 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328 else
6329 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6330 fi
6331 ;;
6332 *)
6333 OPT="-O3 -Wall $STRICT_PROTO"
6334 ;;
6335 esac
6336 case $ac_sys_system in
6337 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6338 ;;
6339 esac
6340 ;;
6341
6342 *)
6343 OPT="-O"
6344 ;;
6345 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346fi
6347
6348
6349
6350# The -arch flags for universal builds on OSX
6351UNIVERSAL_ARCH_FLAGS=
6352
6353
6354# tweak BASECFLAGS based on compiler and platform
6355case $GCC in
6356yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006357 # Python doesn't violate C99 aliasing rules, but older versions of
6358 # GCC produce warnings for legal Python code. Enable
6359 # -fno-strict-aliasing on versions of GCC that support but produce
6360 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6362$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363 ac_save_cc="$CC"
6364 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006365 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006366 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006367 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006368else
Matthias Kloseb9621712010-04-24 17:59:49 +00006369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006370/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006371
Matthias Kloseb159a552010-04-25 21:00:44 +00006372
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006373int
6374main ()
6375{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006376
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006377 ;
6378 return 0;
6379}
Matthias Kloseb159a552010-04-25 21:00:44 +00006380
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006382if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006383
6384 CC="$ac_save_cc -fstrict-aliasing"
6385 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006387/* end confdefs.h. */
6388
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006389 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006390int
6391main ()
6392{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006393double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006394 ;
6395 return 0;
6396}
Matthias Kloseb159a552010-04-25 21:00:44 +00006397
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006399if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006400
6401 ac_cv_no_strict_aliasing=no
6402
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006403else
Matthias Kloseb159a552010-04-25 21:00:44 +00006404
6405 ac_cv_no_strict_aliasing=yes
6406
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006407fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006409
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006410else
Matthias Kloseb159a552010-04-25 21:00:44 +00006411
6412 ac_cv_no_strict_aliasing=no
6413
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006414fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006416fi
6417
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006418 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6421$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006422 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423 then
6424 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6425 fi
6426
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6428$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6429 ac_save_cc="$CC"
6430 CC="$CC -Wunused-result -Werror"
6431 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006432 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006433 $as_echo_n "(cached) " >&6
6434else
6435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6436/* end confdefs.h. */
6437
6438
6439int
6440main ()
6441{
6442
6443 ;
6444 return 0;
6445}
6446
6447_ACEOF
6448if ac_fn_c_try_compile "$LINENO"; then :
6449
6450 ac_cv_disable_unused_result_warning=yes
6451
6452else
6453
6454 ac_cv_disable_unused_result_warning=no
6455
6456fi
6457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6458fi
6459
6460 CFLAGS="$save_CFLAGS"
6461 CC="$ac_save_cc"
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6463$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6464
6465 if test $ac_cv_disable_unused_result_warning = yes
6466 then
6467 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6468 fi
6469
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6471$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6472 ac_save_cc="$CC"
6473 CC="$CC -Werror=declaration-after-statement"
6474 save_CFLAGS="$CFLAGS"
6475 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6476 $as_echo_n "(cached) " >&6
6477else
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479/* end confdefs.h. */
6480
6481
6482int
6483main ()
6484{
6485
6486 ;
6487 return 0;
6488}
6489
6490_ACEOF
6491if ac_fn_c_try_compile "$LINENO"; then :
6492
6493 ac_cv_declaration_after_statement_warning=yes
6494
6495else
6496
6497 ac_cv_declaration_after_statement_warning=no
6498
6499fi
6500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6501fi
6502
6503 CFLAGS="$save_CFLAGS"
6504 CC="$ac_save_cc"
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6506$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6507
6508 if test $ac_cv_declaration_after_statement_warning = yes
6509 then
6510 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6511 fi
6512
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6514 # support. Without this, treatment of subnormals doesn't follow
6515 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006516 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006517 alpha*)
6518 BASECFLAGS="$BASECFLAGS -mieee"
6519 ;;
6520 esac
6521
6522 case $ac_sys_system in
6523 SCO_SV*)
6524 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6525 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006526
6527 # is there any other compiler on Darwin besides gcc?
6528 Darwin*)
6529 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6530 # used to be here, but non-Apple gcc doesn't accept them.
6531 if test "${CC}" = gcc
6532 then
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006534$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006535 case "${UNIVERSALSDK}" in
6536 */MacOSX10.4u.sdk)
6537 # Build using 10.4 SDK, force usage of gcc when the
6538 # compiler is gcc, otherwise the user will get very
6539 # confusing error messages when building on OSX 10.6
6540 CC=gcc-4.0
6541 CPP=cpp-4.0
6542 ;;
6543 esac
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006545$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006546 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006547
Ned Deily87adb6e2013-10-18 21:09:56 -07006548 if test "${enable_universalsdk}"
6549 then
6550 case "$UNIVERSAL_ARCHS" in
6551 32-bit)
6552 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6553 LIPO_32BIT_FLAGS=""
6554 ARCH_RUN_32BIT=""
6555 ;;
6556 64-bit)
6557 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6558 LIPO_32BIT_FLAGS=""
6559 ARCH_RUN_32BIT="true"
6560 ;;
6561 all)
6562 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6563 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6564 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6565 ;;
6566 intel)
6567 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6568 LIPO_32BIT_FLAGS="-extract i386"
6569 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6570 ;;
6571 intel-32)
6572 UNIVERSAL_ARCH_FLAGS="-arch i386"
6573 LIPO_32BIT_FLAGS=""
6574 ARCH_RUN_32BIT=""
6575 ;;
6576 3-way)
6577 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6578 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6579 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6580 ;;
6581 *)
6582 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6583 ;;
6584 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006585
Ned Deily87adb6e2013-10-18 21:09:56 -07006586 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6587 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6588 if test "${UNIVERSALSDK}" != "/"
6589 then
6590 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6591 fi
6592 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006593
Ned Deily87adb6e2013-10-18 21:09:56 -07006594 # Calculate an appropriate deployment target for this build:
6595 # The deployment target value is used explicitly to enable certain
6596 # features are enabled (such as builtin libedit support for readline)
6597 # through the use of Apple's Availabiliy Macros and is used as a
6598 # component of the string returned by distutils.get_platform().
6599 #
6600 # Use the value from:
6601 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6602 # 2. the operating system version of the build machine if >= 10.6
6603 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6604 # below to pick either 10.3, 10.4, or 10.5 as the target.
6605 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006606
Ned Deily87adb6e2013-10-18 21:09:56 -07006607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6608$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006609 cur_target_major=`sw_vers -productVersion | \
6610 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6611 cur_target_minor=`sw_vers -productVersion | \
6612 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6613 cur_target="${cur_target_major}.${cur_target_minor}"
6614 if test ${cur_target_major} -eq 10 && \
6615 test ${cur_target_minor} -ge 3 && \
6616 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006617 then
Ned Deily36820b62014-06-25 13:44:22 -07006618 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006619 cur_target=10.3
6620 if test ${enable_universalsdk}
6621 then
6622 case "$UNIVERSAL_ARCHS" in
6623 all|3-way|intel|64-bit)
6624 # These configurations were first supported in 10.5
6625 cur_target='10.5'
6626 ;;
6627 esac
6628 else
6629 if test `/usr/bin/arch` = "i386"
6630 then
6631 # 10.4 was the first release to support Intel archs
6632 cur_target="10.4"
6633 fi
6634 fi
6635 fi
6636 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006637
Ned Deily87adb6e2013-10-18 21:09:56 -07006638 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6639 # environment with a value that is the same as what we'll use
6640 # in the Makefile to ensure that we'll get the same compiler
6641 # environment during configure and build time.
6642 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6643 export MACOSX_DEPLOYMENT_TARGET
6644 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6646$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006647
Ned Deily87adb6e2013-10-18 21:09:56 -07006648 # end of Darwin* tests
6649 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650 esac
6651 ;;
6652
6653*)
6654 case $ac_sys_system in
6655 OpenUNIX*|UnixWare*)
6656 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6657 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658 SCO_SV*)
6659 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6660 ;;
6661 esac
6662 ;;
6663esac
6664
6665if test "$Py_DEBUG" = 'true'; then
6666 :
6667else
6668 OPT="-DNDEBUG $OPT"
6669fi
6670
6671if test "$ac_arch_flags"
6672then
6673 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6674fi
6675
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006676# On some compilers, pthreads are available without further options
6677# (e.g. MacOS X). On some of these systems, the compiler will not
6678# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6679# So we have to see first whether pthreads are available without
6680# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6682$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006683if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006684 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006685else
Matthias Kloseb9621712010-04-24 17:59:49 +00006686 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006687 ac_cv_pthread_is_default=no
6688else
Matthias Kloseb9621712010-04-24 17:59:49 +00006689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006690/* end confdefs.h. */
6691
Stefan Krah7dba5942012-11-22 22:49:11 +01006692#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006693#include <pthread.h>
6694
6695void* routine(void* p){return NULL;}
6696
6697int main(){
6698 pthread_t p;
6699 if(pthread_create(&p,NULL,routine,NULL)!=0)
6700 return 1;
6701 (void)pthread_detach(p);
6702 return 0;
6703}
6704
6705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006706if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006707
6708 ac_cv_pthread_is_default=yes
6709 ac_cv_kthread=no
6710 ac_cv_pthread=no
6711
6712else
Matthias Kloseb9621712010-04-24 17:59:49 +00006713 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006717fi
6718
6719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006720fi
6721
Matthias Kloseb9621712010-04-24 17:59:49 +00006722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6723$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006724
6725
6726if test $ac_cv_pthread_is_default = yes
6727then
6728 ac_cv_kpthread=no
6729else
6730# -Kpthread, if available, provides the right #defines
6731# and linker options to make pthread_create available
6732# Some compilers won't report that they do not support -Kpthread,
6733# so we need to run a program to see whether it really made the
6734# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6736$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006737if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006738 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739else
6740 ac_save_cc="$CC"
6741CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006742if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743 ac_cv_kpthread=no
6744else
Matthias Kloseb9621712010-04-24 17:59:49 +00006745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746/* end confdefs.h. */
6747
Stefan Krah7dba5942012-11-22 22:49:11 +01006748#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749#include <pthread.h>
6750
6751void* routine(void* p){return NULL;}
6752
6753int main(){
6754 pthread_t p;
6755 if(pthread_create(&p,NULL,routine,NULL)!=0)
6756 return 1;
6757 (void)pthread_detach(p);
6758 return 0;
6759}
6760
6761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006762if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763 ac_cv_kpthread=yes
6764else
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6768 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769fi
6770
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006771CC="$ac_save_cc"
6772fi
6773
Matthias Kloseb9621712010-04-24 17:59:49 +00006774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6775$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006776fi
6777
6778if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6779then
6780# -Kthread, if available, provides the right #defines
6781# and linker options to make pthread_create available
6782# Some compilers won't report that they do not support -Kthread,
6783# so we need to run a program to see whether it really made the
6784# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6786$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006787if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006788 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006789else
6790 ac_save_cc="$CC"
6791CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006792if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793 ac_cv_kthread=no
6794else
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796/* end confdefs.h. */
6797
Stefan Krah7dba5942012-11-22 22:49:11 +01006798#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799#include <pthread.h>
6800
6801void* routine(void* p){return NULL;}
6802
6803int main(){
6804 pthread_t p;
6805 if(pthread_create(&p,NULL,routine,NULL)!=0)
6806 return 1;
6807 (void)pthread_detach(p);
6808 return 0;
6809}
6810
6811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006812if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813 ac_cv_kthread=yes
6814else
Matthias Kloseb9621712010-04-24 17:59:49 +00006815 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819fi
6820
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821CC="$ac_save_cc"
6822fi
6823
Matthias Kloseb9621712010-04-24 17:59:49 +00006824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6825$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826fi
6827
6828if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6829then
6830# -pthread, if available, provides the right #defines
6831# and linker options to make pthread_create available
6832# Some compilers won't report that they do not support -pthread,
6833# so we need to run a program to see whether it really made the
6834# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6836$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006837if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006838 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839else
6840 ac_save_cc="$CC"
6841CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006842if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843 ac_cv_pthread=no
6844else
Matthias Kloseb9621712010-04-24 17:59:49 +00006845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846/* end confdefs.h. */
6847
Stefan Krah7dba5942012-11-22 22:49:11 +01006848#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849#include <pthread.h>
6850
6851void* routine(void* p){return NULL;}
6852
6853int main(){
6854 pthread_t p;
6855 if(pthread_create(&p,NULL,routine,NULL)!=0)
6856 return 1;
6857 (void)pthread_detach(p);
6858 return 0;
6859}
6860
6861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006862if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863 ac_cv_pthread=yes
6864else
Matthias Kloseb9621712010-04-24 17:59:49 +00006865 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6868 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869fi
6870
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871CC="$ac_save_cc"
6872fi
6873
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6875$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876fi
6877
6878# If we have set a CC compiler flag for thread support then
6879# check if it works for CXX, too.
6880ac_cv_cxx_thread=no
6881if test ! -z "$CXX"
6882then
Matthias Kloseb9621712010-04-24 17:59:49 +00006883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6884$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885ac_save_cxx="$CXX"
6886
6887if test "$ac_cv_kpthread" = "yes"
6888then
6889 CXX="$CXX -Kpthread"
6890 ac_cv_cxx_thread=yes
6891elif test "$ac_cv_kthread" = "yes"
6892then
6893 CXX="$CXX -Kthread"
6894 ac_cv_cxx_thread=yes
6895elif test "$ac_cv_pthread" = "yes"
6896then
6897 CXX="$CXX -pthread"
6898 ac_cv_cxx_thread=yes
6899fi
6900
6901if test $ac_cv_cxx_thread = yes
6902then
6903 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6904 $CXX -c conftest.$ac_ext 2>&5
6905 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6906 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6907 then
6908 ac_cv_cxx_thread=yes
6909 else
6910 ac_cv_cxx_thread=no
6911 fi
6912 rm -fr conftest*
6913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6915$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006916fi
6917CXX="$ac_save_cxx"
6918
6919
6920# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6922$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006923if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925else
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006927/* end confdefs.h. */
6928#include <stdlib.h>
6929#include <stdarg.h>
6930#include <string.h>
6931#include <float.h>
6932
6933int
6934main ()
6935{
6936
6937 ;
6938 return 0;
6939}
6940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006941if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942 ac_cv_header_stdc=yes
6943else
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6947
6948if test $ac_cv_header_stdc = yes; then
6949 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006951/* end confdefs.h. */
6952#include <string.h>
6953
6954_ACEOF
6955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006956 $EGREP "memchr" >/dev/null 2>&1; then :
6957
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006958else
6959 ac_cv_header_stdc=no
6960fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006961rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962
6963fi
6964
6965if test $ac_cv_header_stdc = yes; then
6966 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006968/* end confdefs.h. */
6969#include <stdlib.h>
6970
6971_ACEOF
6972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006973 $EGREP "free" >/dev/null 2>&1; then :
6974
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975else
6976 ac_cv_header_stdc=no
6977fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006978rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006979
6980fi
6981
6982if test $ac_cv_header_stdc = yes; then
6983 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006984 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006985 :
6986else
Matthias Kloseb9621712010-04-24 17:59:49 +00006987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988/* end confdefs.h. */
6989#include <ctype.h>
6990#include <stdlib.h>
6991#if ((' ' & 0x0FF) == 0x020)
6992# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6993# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6994#else
6995# define ISLOWER(c) \
6996 (('a' <= (c) && (c) <= 'i') \
6997 || ('j' <= (c) && (c) <= 'r') \
6998 || ('s' <= (c) && (c) <= 'z'))
6999# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7000#endif
7001
7002#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7003int
7004main ()
7005{
7006 int i;
7007 for (i = 0; i < 256; i++)
7008 if (XOR (islower (i), ISLOWER (i))
7009 || toupper (i) != TOUPPER (i))
7010 return 2;
7011 return 0;
7012}
7013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007014if ac_fn_c_try_run "$LINENO"; then :
7015
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007016else
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7020 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007021fi
7022
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007023fi
7024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7026$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007027if test $ac_cv_header_stdc = yes; then
7028
Matthias Kloseb9621712010-04-24 17:59:49 +00007029$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007030
7031fi
7032
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007033for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007034fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007035ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007036sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007037unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007038poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007039sys/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 +01007040sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007041sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007042sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007043sys/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 -07007044libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007045bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7046sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007047do :
7048 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7049ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007050if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007051 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007052#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007053_ACEOF
7054
7055fi
7056
Guido van Rossum627b2d71993-12-24 10:39:16 +00007057done
7058
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007059ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007060for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7063$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007064if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007066else
Matthias Kloseb9621712010-04-24 17:59:49 +00007067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007068/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007069#include <sys/types.h>
7070#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007071
Martin v. Löwis11437992002-04-12 09:54:03 +00007072int
7073main ()
7074{
7075if ((DIR *) 0)
7076return 0;
7077 ;
7078 return 0;
7079}
7080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007081if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007082 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007083else
Matthias Kloseb9621712010-04-24 17:59:49 +00007084 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007088eval ac_res=\$$as_ac_Header
7089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7090$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007091if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007092 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007093#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007094_ACEOF
7095
7096ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007098
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007099done
7100# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7101if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7103$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007104if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007106else
Martin v. Löwis11437992002-04-12 09:54:03 +00007107 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007111/* Override any GCC internal prototype to avoid an error.
7112 Use char because int might match the return type of a GCC
7113 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007114#ifdef __cplusplus
7115extern "C"
7116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007117char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007118int
7119main ()
7120{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007121return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007122 ;
7123 return 0;
7124}
7125_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007126for ac_lib in '' dir; do
7127 if test -z "$ac_lib"; then
7128 ac_res="none required"
7129 else
7130 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007131 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007132 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007133 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007134 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007136rm -f core conftest.err conftest.$ac_objext \
7137 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007138 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007139 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007141done
Victor Stinnere0be4232011-10-25 13:06:09 +02007142if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007144else
7145 ac_cv_search_opendir=no
7146fi
7147rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007148LIBS=$ac_func_search_save_LIBS
7149fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7151$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007152ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007153if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007154 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007156fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007157
Michael W. Hudson54241132001-12-07 15:38:26 +00007158else
Matthias Kloseb9621712010-04-24 17:59:49 +00007159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7160$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007161if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007162 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007163else
7164 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007168/* Override any GCC internal prototype to avoid an error.
7169 Use char because int might match the return type of a GCC
7170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007171#ifdef __cplusplus
7172extern "C"
7173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007174char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007175int
7176main ()
7177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007178return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007179 ;
7180 return 0;
7181}
7182_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007183for ac_lib in '' x; do
7184 if test -z "$ac_lib"; then
7185 ac_res="none required"
7186 else
7187 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007188 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007189 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007190 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007191 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007193rm -f core conftest.err conftest.$ac_objext \
7194 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007195 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007196 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007198done
Victor Stinnere0be4232011-10-25 13:06:09 +02007199if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007201else
7202 ac_cv_search_opendir=no
7203fi
7204rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007205LIBS=$ac_func_search_save_LIBS
7206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7208$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007209ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007210if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007211 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007212
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007213fi
7214
7215fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007216
Matthias Kloseb9621712010-04-24 17:59:49 +00007217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7218$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007219if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007220 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007221else
Matthias Kloseb9621712010-04-24 17:59:49 +00007222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007223/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007224#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007225int
7226main ()
7227{
7228return makedev(0, 0);
7229 ;
7230 return 0;
7231}
7232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007233if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007234 ac_cv_header_sys_types_h_makedev=yes
7235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007238rm -f core conftest.err conftest.$ac_objext \
7239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007240
7241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7243$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007244
7245if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007246ac_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 +02007247if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007248
Matthias Kloseb9621712010-04-24 17:59:49 +00007249$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007250
7251fi
7252
7253
7254
7255 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 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 +02007257if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007258
Matthias Kloseb9621712010-04-24 17:59:49 +00007259$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007260
7261fi
7262
7263
7264 fi
7265fi
7266
Michael W. Hudson54241132001-12-07 15:38:26 +00007267
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007268# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7269for ac_header in net/if.h
7270do :
7271 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7272#ifdef STDC_HEADERS
7273# include <stdlib.h>
7274# include <stddef.h>
7275#else
7276# ifdef HAVE_STDLIB_H
7277# include <stdlib.h>
7278# endif
7279#endif
7280#ifdef HAVE_SYS_SOCKET_H
7281# include <sys/socket.h>
7282#endif
7283
7284"
Victor Stinnere0be4232011-10-25 13:06:09 +02007285if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007286 cat >>confdefs.h <<_ACEOF
7287#define HAVE_NET_IF_H 1
7288_ACEOF
7289
7290fi
7291
7292done
7293
7294
Martin v. Löwis11017b12006-01-14 18:12:57 +00007295# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007296for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007297do :
7298 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 +00007299#ifdef HAVE_ASM_TYPES_H
7300#include <asm/types.h>
7301#endif
7302#ifdef HAVE_SYS_SOCKET_H
7303#include <sys/socket.h>
7304#endif
7305
Matthias Kloseb9621712010-04-24 17:59:49 +00007306"
Victor Stinnere0be4232011-10-25 13:06:09 +02007307if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007308 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007309#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007310_ACEOF
7311
7312fi
7313
7314done
7315
7316
Charles-François Natali47413c12011-10-06 19:47:44 +02007317# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007318for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007319do :
7320 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7321ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7322#ifdef HAVE_SYS_SOCKET_H
7323#include <sys/socket.h>
7324#endif
7325
7326"
7327if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7328 cat >>confdefs.h <<_ACEOF
7329#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7330_ACEOF
7331
7332fi
7333
7334done
7335
7336
Guido van Rossum627b2d71993-12-24 10:39:16 +00007337# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007338was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7340$as_echo_n "checking for clock_t in time.h... " >&6; }
7341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007342/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007343#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007344
7345_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007347 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007348 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007349else
Martin v. Löwis11437992002-04-12 09:54:03 +00007350
7351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007353
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007354
Guido van Rossum627b2d71993-12-24 10:39:16 +00007355fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007356rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007357
Matthias Kloseb9621712010-04-24 17:59:49 +00007358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7359$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007360
Matthias Kloseb9621712010-04-24 17:59:49 +00007361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7362$as_echo_n "checking for makedev... " >&6; }
7363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007364/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007365
Jesus Cea740f53a2010-04-28 11:35:30 +00007366#if defined(MAJOR_IN_MKDEV)
7367#include <sys/mkdev.h>
7368#elif defined(MAJOR_IN_SYSMACROS)
7369#include <sys/sysmacros.h>
7370#else
7371#include <sys/types.h>
7372#endif
7373
Neal Norwitz11690112002-07-30 01:08:28 +00007374int
7375main ()
7376{
Jesus Cea740f53a2010-04-28 11:35:30 +00007377
7378 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007379 ;
7380 return 0;
7381}
Matthias Kloseb159a552010-04-25 21:00:44 +00007382
Neal Norwitz11690112002-07-30 01:08:28 +00007383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007384if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007385 ac_cv_has_makedev=yes
7386else
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007389rm -f core conftest.err conftest.$ac_objext \
7390 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7392$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007393if test "$ac_cv_has_makedev" = "yes"; then
7394
Matthias Kloseb9621712010-04-24 17:59:49 +00007395$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007396
7397fi
7398
Christian Heimes985ecdc2013-11-20 11:46:18 +01007399# byte swapping
7400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7401$as_echo_n "checking for le64toh... " >&6; }
7402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7403/* end confdefs.h. */
7404
7405#ifdef HAVE_ENDIAN_H
7406#include <endian.h>
7407#elif defined(HAVE_SYS_ENDIAN_H)
7408#include <sys/endian.h>
7409#endif
7410
7411int
7412main ()
7413{
7414
7415 le64toh(1)
7416 ;
7417 return 0;
7418}
7419
7420_ACEOF
7421if ac_fn_c_try_link "$LINENO"; then :
7422 ac_cv_has_le64toh=yes
7423else
7424 ac_cv_has_le64toh=no
7425fi
7426rm -f core conftest.err conftest.$ac_objext \
7427 conftest$ac_exeext conftest.$ac_ext
7428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7429$as_echo "$ac_cv_has_le64toh" >&6; }
7430if test "$ac_cv_has_le64toh" = "yes"; then
7431
7432$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7433
7434fi
7435
Martin v. Löwis399a6892002-10-04 10:22:02 +00007436# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7437# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7438# defined, but the compiler does not support pragma redefine_extname,
7439# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7440# structures (such as rlimit64) without declaring them. As a
7441# work-around, disable LFS on such configurations
7442
7443use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7445$as_echo_n "checking Solaris LFS bug... " >&6; }
7446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007447/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007448
7449#define _LARGEFILE_SOURCE 1
7450#define _FILE_OFFSET_BITS 64
7451#include <sys/resource.h>
7452
Martin v. Löwis399a6892002-10-04 10:22:02 +00007453int
7454main ()
7455{
7456struct rlimit foo;
7457 ;
7458 return 0;
7459}
7460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007461if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007462 sol_lfs_bug=no
7463else
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7468$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007469if test "$sol_lfs_bug" = "yes"; then
7470 use_lfs=no
7471fi
7472
7473if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007474# Two defines needed to enable largefile support on various platforms
7475# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007476case $ac_sys_system/$ac_sys_release in
7477AIX*)
7478
7479$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7480
7481 ;;
7482esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007485
7486
Matthias Kloseb9621712010-04-24 17:59:49 +00007487$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007488
Martin v. Löwis399a6892002-10-04 10:22:02 +00007489fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007490
Guido van Rossum84e7b241996-08-19 21:59:00 +00007491# Add some code to confdefs.h so that the test for off_t works on SCO
7492cat >> confdefs.h <<\EOF
7493#if defined(SCO_DS)
7494#undef _OFF_T
7495#endif
7496EOF
7497
Guido van Rossumef2255b2000-03-10 22:30:29 +00007498# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007499ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007500if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007501
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007502else
Martin v. Löwis11437992002-04-12 09:54:03 +00007503
7504cat >>confdefs.h <<_ACEOF
7505#define mode_t int
7506_ACEOF
7507
7508fi
7509
Matthias Kloseb9621712010-04-24 17:59:49 +00007510ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007511if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007512
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007513else
Martin v. Löwis11437992002-04-12 09:54:03 +00007514
7515cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007516#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007517_ACEOF
7518
7519fi
7520
Matthias Kloseb9621712010-04-24 17:59:49 +00007521ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007522if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007523
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007524else
Martin v. Löwis11437992002-04-12 09:54:03 +00007525
7526cat >>confdefs.h <<_ACEOF
7527#define pid_t int
7528_ACEOF
7529
7530fi
7531
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007532
Martin v. Löwis11437992002-04-12 09:54:03 +00007533cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007534#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007535_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007536
Matthias Kloseb9621712010-04-24 17:59:49 +00007537ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007538if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007539
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007540else
Martin v. Löwis11437992002-04-12 09:54:03 +00007541
7542cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007543#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007544_ACEOF
7545
7546fi
7547
Matthias Kloseb9621712010-04-24 17:59:49 +00007548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7549$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007550if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007551 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007552else
Matthias Kloseb9621712010-04-24 17:59:49 +00007553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007554/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007555#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007556
7557_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007559 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007560 ac_cv_type_uid_t=yes
7561else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007562 ac_cv_type_uid_t=no
7563fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007564rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007565
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7568$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007569if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007570
Matthias Kloseb9621712010-04-24 17:59:49 +00007571$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007572
7573
Matthias Kloseb9621712010-04-24 17:59:49 +00007574$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007575
7576fi
7577
Mark Dickinson983bc162012-12-02 12:11:38 +00007578
7579# There are two separate checks for each of the exact-width integer types we
7580# need. First we check whether the type is available using the usual
7581# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7582# and <stdint.h> where available). We then also use the special type checks of
7583# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7584# directly, #define's uint32_t to be a suitable type.
7585
7586ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7587if test "x$ac_cv_type_uint32_t" = xyes; then :
7588
7589$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7590
7591fi
7592
Matthias Kloseb9621712010-04-24 17:59:49 +00007593ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7594case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007595 no|yes) ;; #(
7596 *)
7597
Matthias Kloseb9621712010-04-24 17:59:49 +00007598$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007599
7600
7601cat >>confdefs.h <<_ACEOF
7602#define uint32_t $ac_cv_c_uint32_t
7603_ACEOF
7604;;
7605 esac
7606
Mark Dickinson983bc162012-12-02 12:11:38 +00007607
7608ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7609if test "x$ac_cv_type_uint64_t" = xyes; then :
7610
7611$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7612
7613fi
7614
Matthias Kloseb9621712010-04-24 17:59:49 +00007615ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7616case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007617 no|yes) ;; #(
7618 *)
7619
Matthias Kloseb9621712010-04-24 17:59:49 +00007620$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007621
7622
7623cat >>confdefs.h <<_ACEOF
7624#define uint64_t $ac_cv_c_uint64_t
7625_ACEOF
7626;;
7627 esac
7628
Mark Dickinson983bc162012-12-02 12:11:38 +00007629
7630ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7631if test "x$ac_cv_type_int32_t" = xyes; then :
7632
7633$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7634
7635fi
7636
Matthias Kloseb9621712010-04-24 17:59:49 +00007637ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7638case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007639 no|yes) ;; #(
7640 *)
7641
7642cat >>confdefs.h <<_ACEOF
7643#define int32_t $ac_cv_c_int32_t
7644_ACEOF
7645;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007646esac
7647
Mark Dickinson983bc162012-12-02 12:11:38 +00007648
7649ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7650if test "x$ac_cv_type_int64_t" = xyes; then :
7651
7652$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7653
7654fi
7655
Matthias Kloseb9621712010-04-24 17:59:49 +00007656ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7657case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007658 no|yes) ;; #(
7659 *)
7660
7661cat >>confdefs.h <<_ACEOF
7662#define int64_t $ac_cv_c_int64_t
7663_ACEOF
7664;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007665esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007666
Mark Dickinson983bc162012-12-02 12:11:38 +00007667
Matthias Kloseb9621712010-04-24 17:59:49 +00007668ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007669if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670
Matthias Kloseb9621712010-04-24 17:59:49 +00007671$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007672
7673fi
7674
Stefan Krah1919b7e2012-03-21 18:25:23 +01007675ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7676if test "x$ac_cv_type___uint128_t" = xyes; then :
7677
7678$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7679
7680fi
7681
Jack Jansendd19cf82001-12-06 22:36:17 +00007682
Michael W. Hudson54241132001-12-07 15:38:26 +00007683# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007684# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685# The cast to long int works around a bug in the HP C Compiler
7686# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7687# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7688# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7690$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007691if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007693else
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 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 +00007695
Martin v. Löwis11437992002-04-12 09:54:03 +00007696else
Matthias Kloseb9621712010-04-24 17:59:49 +00007697 if test "$ac_cv_type_int" = yes; then
7698 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007700as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007701See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702 else
7703 ac_cv_sizeof_int=0
7704 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007706
Martin v. Löwis11437992002-04-12 09:54:03 +00007707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7709$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710
7711
7712
Martin v. Löwis11437992002-04-12 09:54:03 +00007713cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007714#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007715_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007716
7717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007718# The cast to long int works around a bug in the HP C Compiler
7719# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7720# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7721# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7723$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007724if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007726else
Matthias Kloseb9621712010-04-24 17:59:49 +00007727 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 +00007728
Martin v. Löwis11437992002-04-12 09:54:03 +00007729else
Matthias Kloseb9621712010-04-24 17:59:49 +00007730 if test "$ac_cv_type_long" = yes; then
7731 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007733as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007734See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735 else
7736 ac_cv_sizeof_long=0
7737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007739
Martin v. Löwis11437992002-04-12 09:54:03 +00007740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7742$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007743
7744
7745
Martin v. Löwis11437992002-04-12 09:54:03 +00007746cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007747#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007748_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007749
7750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751# The cast to long int works around a bug in the HP C Compiler
7752# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7753# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7754# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7756$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007757if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007759else
Matthias Kloseb9621712010-04-24 17:59:49 +00007760 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 +00007761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 if test "$ac_cv_type_void_p" = yes; then
7764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007766as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007767See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768 else
7769 ac_cv_sizeof_void_p=0
7770 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007772
Martin v. Löwis11437992002-04-12 09:54:03 +00007773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7775$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776
7777
7778
Martin v. Löwis11437992002-04-12 09:54:03 +00007779cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007780#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007781_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007782
7783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784# The cast to long int works around a bug in the HP C Compiler
7785# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7786# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7787# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7789$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007790if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007792else
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 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 +00007794
Martin v. Löwis11437992002-04-12 09:54:03 +00007795else
Matthias Kloseb9621712010-04-24 17:59:49 +00007796 if test "$ac_cv_type_short" = yes; then
7797 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007799as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007800See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801 else
7802 ac_cv_sizeof_short=0
7803 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007805
Martin v. Löwis11437992002-04-12 09:54:03 +00007806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7808$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809
7810
7811
Martin v. Löwis11437992002-04-12 09:54:03 +00007812cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007813#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007814_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007815
7816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817# The cast to long int works around a bug in the HP C Compiler
7818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7820# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7822$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007823if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007825else
Matthias Kloseb9621712010-04-24 17:59:49 +00007826 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 +00007827
Martin v. Löwis11437992002-04-12 09:54:03 +00007828else
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 if test "$ac_cv_type_float" = yes; then
7830 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007832as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007833See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834 else
7835 ac_cv_sizeof_float=0
7836 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007838
Martin v. Löwis11437992002-04-12 09:54:03 +00007839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7841$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842
7843
7844
Martin v. Löwis11437992002-04-12 09:54:03 +00007845cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007846#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007847_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007848
7849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850# The cast to long int works around a bug in the HP C Compiler
7851# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7852# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7853# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7855$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007856if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007857 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007858else
Matthias Kloseb9621712010-04-24 17:59:49 +00007859 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 +00007860
Martin v. Löwis11437992002-04-12 09:54:03 +00007861else
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 if test "$ac_cv_type_double" = yes; then
7863 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7864$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007865as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007866See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867 else
7868 ac_cv_sizeof_double=0
7869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007871
Martin v. Löwis11437992002-04-12 09:54:03 +00007872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7874$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875
7876
7877
Martin v. Löwis11437992002-04-12 09:54:03 +00007878cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007879#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007880_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007881
7882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883# The cast to long int works around a bug in the HP C Compiler
7884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7886# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7888$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007889if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 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 +00007893
Martin v. Löwis11437992002-04-12 09:54:03 +00007894else
Matthias Kloseb9621712010-04-24 17:59:49 +00007895 if test "$ac_cv_type_fpos_t" = yes; then
7896 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007898as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007899See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900 else
7901 ac_cv_sizeof_fpos_t=0
7902 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007904
Martin v. Löwis11437992002-04-12 09:54:03 +00007905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7907$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908
7909
7910
Martin v. Löwis11437992002-04-12 09:54:03 +00007911cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007912#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007913_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007914
Michael W. Hudson54241132001-12-07 15:38:26 +00007915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916# The cast to long int works around a bug in the HP C Compiler
7917# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7918# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7919# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7921$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007922if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007923 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007924else
Matthias Kloseb9621712010-04-24 17:59:49 +00007925 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 +00007926
Martin v. Löwis18e16552006-02-15 17:27:45 +00007927else
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 if test "$ac_cv_type_size_t" = yes; then
7929 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007931as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007932See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933 else
7934 ac_cv_sizeof_size_t=0
7935 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937
Martin v. Löwis18e16552006-02-15 17:27:45 +00007938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7940$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941
7942
7943
Martin v. Löwis18e16552006-02-15 17:27:45 +00007944cat >>confdefs.h <<_ACEOF
7945#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7946_ACEOF
7947
7948
Christian Heimes400adb02008-02-01 08:12:03 +00007949# The cast to long int works around a bug in the HP C Compiler
7950# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7951# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7952# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7954$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007955if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007956 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007957else
Matthias Kloseb9621712010-04-24 17:59:49 +00007958 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 +00007959
Christian Heimes400adb02008-02-01 08:12:03 +00007960else
Matthias Kloseb9621712010-04-24 17:59:49 +00007961 if test "$ac_cv_type_pid_t" = yes; then
7962 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007964as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007965See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007966 else
7967 ac_cv_sizeof_pid_t=0
7968 fi
7969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970
Christian Heimes400adb02008-02-01 08:12:03 +00007971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7973$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007974
7975
7976
7977cat >>confdefs.h <<_ACEOF
7978#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7979_ACEOF
7980
7981
Michael W. Hudson54241132001-12-07 15:38:26 +00007982
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7984$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007985have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007987/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007988
Martin v. Löwis11437992002-04-12 09:54:03 +00007989int
7990main ()
7991{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007992long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ;
7994 return 0;
7995}
7996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007997if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007998
7999
Matthias Kloseb9621712010-04-24 17:59:49 +00008000$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008001
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008002 have_long_long=yes
8003
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8007$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008008if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009# The cast to long int works around a bug in the HP C Compiler
8010# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8011# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8012# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8014$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008015if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008017else
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 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 +00008019
Martin v. Löwis11437992002-04-12 09:54:03 +00008020else
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 if test "$ac_cv_type_long_long" = yes; then
8022 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008024as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008025See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026 else
8027 ac_cv_sizeof_long_long=0
8028 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008030
Martin v. Löwis11437992002-04-12 09:54:03 +00008031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8033$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034
8035
8036
Martin v. Löwis11437992002-04-12 09:54:03 +00008037cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008038#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008039_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008040
Michael W. Hudson54241132001-12-07 15:38:26 +00008041
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008042fi
8043
Matthias Kloseb9621712010-04-24 17:59:49 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8045$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008046have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008048/* end confdefs.h. */
8049
8050int
8051main ()
8052{
8053long double x; x = (long double)0;
8054 ;
8055 return 0;
8056}
8057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008058if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008059
8060
Matthias Kloseb9621712010-04-24 17:59:49 +00008061$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008062
8063 have_long_double=yes
8064
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008065fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8068$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008069if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008070# The cast to long int works around a bug in the HP C Compiler
8071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8073# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8075$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008076if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008078else
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 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 +00008080
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008081else
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 if test "$ac_cv_type_long_double" = yes; then
8083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008085as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008086See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008087 else
8088 ac_cv_sizeof_long_double=0
8089 fi
8090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008091
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8094$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008095
8096
8097
8098cat >>confdefs.h <<_ACEOF
8099#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8100_ACEOF
8101
8102
8103fi
8104
8105
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8107$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008108have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008110/* end confdefs.h. */
8111
8112int
8113main ()
8114{
8115_Bool x; x = (_Bool)0;
8116 ;
8117 return 0;
8118}
8119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008120if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008121
8122
Matthias Kloseb9621712010-04-24 17:59:49 +00008123$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008124
8125 have_c99_bool=yes
8126
Thomas Woutersb2137042007-02-01 18:02:27 +00008127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8130$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008131if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132# The cast to long int works around a bug in the HP C Compiler
8133# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8134# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8135# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8137$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008138if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008140else
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 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 +00008142
Thomas Woutersb2137042007-02-01 18:02:27 +00008143else
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 if test "$ac_cv_type__Bool" = yes; then
8145 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8146$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008147as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008148See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149 else
8150 ac_cv_sizeof__Bool=0
8151 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008153
Thomas Woutersb2137042007-02-01 18:02:27 +00008154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8156$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157
8158
8159
Thomas Woutersb2137042007-02-01 18:02:27 +00008160cat >>confdefs.h <<_ACEOF
8161#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8162_ACEOF
8163
8164
8165fi
8166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008168 #include <stdint.h>
8169 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008170 #ifdef HAVE_INTTYPES_H
8171 #include <inttypes.h>
8172 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008173"
Victor Stinnere0be4232011-10-25 13:06:09 +02008174if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008175
8176cat >>confdefs.h <<_ACEOF
8177#define HAVE_UINTPTR_T 1
8178_ACEOF
8179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180# The cast to long int works around a bug in the HP C Compiler
8181# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8182# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8183# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8185$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008186if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008188else
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 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 +00008190
Martin v. Löwis11437992002-04-12 09:54:03 +00008191else
Matthias Kloseb9621712010-04-24 17:59:49 +00008192 if test "$ac_cv_type_uintptr_t" = yes; then
8193 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8194$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008195as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008196See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008197 else
8198 ac_cv_sizeof_uintptr_t=0
8199 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008201
Martin v. Löwis11437992002-04-12 09:54:03 +00008202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8204$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205
8206
8207
Martin v. Löwis11437992002-04-12 09:54:03 +00008208cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008209#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008210_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008211
Michael W. Hudson54241132001-12-07 15:38:26 +00008212
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008213fi
8214
Thomas Wouters89f507f2006-12-13 04:49:30 +00008215
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008216# The cast to long int works around a bug in the HP C Compiler
8217# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8218# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8219# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8221$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008222if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008223 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008224else
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008226#ifdef HAVE_SYS_TYPES_H
8227#include <sys/types.h>
8228#endif
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008231
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008232else
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 if test "$ac_cv_type_off_t" = yes; then
8234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008236as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008237See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008238 else
8239 ac_cv_sizeof_off_t=0
8240 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008242
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8245$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008247
8248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008250#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008251_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008252
Michael W. Hudson54241132001-12-07 15:38:26 +00008253
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008254
Matthias Kloseb9621712010-04-24 17:59:49 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8256$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008257if test "$have_long_long" = yes
8258then
8259if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008260 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008261
Matthias Kloseb9621712010-04-24 17:59:49 +00008262$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008263
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8265$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008266else
Matthias Kloseb9621712010-04-24 17:59:49 +00008267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8268$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008269fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008270else
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8272$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008273fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008275# The cast to long int works around a bug in the HP C Compiler
8276# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8277# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8278# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8280$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008281if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008283else
Matthias Kloseb9621712010-04-24 17:59:49 +00008284 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008285#ifdef HAVE_SYS_TYPES_H
8286#include <sys/types.h>
8287#endif
8288#ifdef HAVE_TIME_H
8289#include <time.h>
8290#endif
8291
Matthias Kloseb9621712010-04-24 17:59:49 +00008292"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008293
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008294else
Matthias Kloseb9621712010-04-24 17:59:49 +00008295 if test "$ac_cv_type_time_t" = yes; then
8296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008298as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008299See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008300 else
8301 ac_cv_sizeof_time_t=0
8302 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008304
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8307$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008308
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008309
8310
Martin v. Löwis11437992002-04-12 09:54:03 +00008311cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008312#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008313_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008314
Michael W. Hudson54241132001-12-07 15:38:26 +00008315
8316
Trent Mick635f6fb2000-08-23 21:33:05 +00008317# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008318ac_save_cc="$CC"
8319if test "$ac_cv_kpthread" = "yes"
8320then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008321elif test "$ac_cv_kthread" = "yes"
8322then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008323elif test "$ac_cv_pthread" = "yes"
8324then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008325fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8328$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008329have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008331/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008332
8333 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008334int
8335main ()
8336{
Guido van Rossum12580492000-09-24 16:47:19 +00008337pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008338 ;
8339 return 0;
8340}
Matthias Kloseb159a552010-04-25 21:00:44 +00008341
Martin v. Löwis11437992002-04-12 09:54:03 +00008342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008343if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008344 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8348$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008349if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8353# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8355$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008356if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008358else
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008360#ifdef HAVE_PTHREAD_H
8361#include <pthread.h>
8362#endif
8363
Matthias Kloseb9621712010-04-24 17:59:49 +00008364"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008365
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008366else
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 if test "$ac_cv_type_pthread_t" = yes; then
8368 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8369$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008370as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008371See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008372 else
8373 ac_cv_sizeof_pthread_t=0
8374 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008376
Trent Mick635f6fb2000-08-23 21:33:05 +00008377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8379$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008380
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008381
8382
Martin v. Löwis11437992002-04-12 09:54:03 +00008383cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008384#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008385_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008386
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008387
Trent Mick635f6fb2000-08-23 21:33:05 +00008388fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008389CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008390
Michael W. Hudson54241132001-12-07 15:38:26 +00008391
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008392case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008393 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008394 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8395 ;;
8396 Darwin/*)
8397 OTHER_LIBTOOL_OPT=""
8398 ;;
8399esac
8400
8401
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008402
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008403case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008404 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008405 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8406 if test "${enable_universalsdk}"; then
8407 :
8408 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008409 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008410 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008411 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008412 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008413 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008414 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008415 if test ${gcc_version} '<' 4.0
8416 then
8417 LIBTOOL_CRUFT="-lcc_dynamic"
8418 else
8419 LIBTOOL_CRUFT=""
8420 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008422 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008423else
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008425/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008426
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008427 #include <unistd.h>
8428 int main(int argc, char*argv[])
8429 {
8430 if (sizeof(long) == 4) {
8431 return 0;
8432 } else {
8433 return 1;
8434 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008435 }
8436
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008438if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008439 ac_osx_32bit=yes
8440else
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8444 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008445fi
8446
8447
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008448 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008449 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008450 i386)
8451 MACOSX_DEFAULT_ARCH="i386"
8452 ;;
8453 ppc)
8454 MACOSX_DEFAULT_ARCH="ppc"
8455 ;;
8456 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008457 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008458 ;;
8459 esac
8460 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008461 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008462 i386)
8463 MACOSX_DEFAULT_ARCH="x86_64"
8464 ;;
8465 ppc)
8466 MACOSX_DEFAULT_ARCH="ppc64"
8467 ;;
8468 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008469 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008470 ;;
8471 esac
8472
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008473 fi
8474
8475 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008476 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008477 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008478esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8480$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008481if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008482then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008483 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008485 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008486
Matthias Kloseb9621712010-04-24 17:59:49 +00008487$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008488
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8490$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008491 if test $enable_shared = "yes"
8492 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008493 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 +00008494 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008495else
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8497$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008498fi
8499
Matthias Kloseb9621712010-04-24 17:59:49 +00008500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8501$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008502case $ac_sys_system/$ac_sys_release in
8503 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008504
Matthias Kloseb9621712010-04-24 17:59:49 +00008505$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008506
Matthias Kloseb9621712010-04-24 17:59:49 +00008507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8508$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008509 ;;
8510 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8512$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008513 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008514esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008515
Guido van Rossum0a516c91994-09-12 10:58:40 +00008516# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008517
Michael W. Hudson54241132001-12-07 15:38:26 +00008518
8519
8520
8521
Benjamin Peterson99f03762010-04-11 22:15:28 +00008522
Thomas Wouters477c8d52006-05-27 19:21:47 +00008523
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008524# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8525# -- usually .so, .sl on HP-UX, .dll on Cygwin
8526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8527$as_echo_n "checking the extension of shared libraries... " >&6; }
8528if test -z "$SHLIB_SUFFIX"; then
8529 case $ac_sys_system in
8530 hp*|HP*)
8531 case `uname -m` in
8532 ia64) SHLIB_SUFFIX=.so;;
8533 *) SHLIB_SUFFIX=.sl;;
8534 esac
8535 ;;
8536 CYGWIN*) SHLIB_SUFFIX=.dll;;
8537 *) SHLIB_SUFFIX=.so;;
8538 esac
8539fi
8540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8541$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008542
Guido van Rossum0a516c91994-09-12 10:58:40 +00008543# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008544# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008545# (Shared libraries in this instance are shared modules to be loaded into
8546# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8548$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008549if test -z "$LDSHARED"
8550then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008551 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008552 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008553 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008554 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008555 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008556 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008557 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008558 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008559 if test "$GCC" = "yes" ; then
8560 LDSHARED='$(CC) -shared'
8561 LDCXXSHARED='$(CXX) -shared'
8562 else
8563 LDSHARED='$(CC) -G'
8564 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008565 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008566 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008567 if test "$GCC" = "yes" ; then
8568 LDSHARED='$(CC) -shared'
8569 LDCXXSHARED='$(CXX) -shared'
8570 else
8571 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008572 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008573 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008574 LDSHARED='$(CC) -bundle'
8575 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008576 if test "$enable_framework" ; then
8577 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008578 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8579 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008580 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008581 else
8582 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008583 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008584 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008585 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008586 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008587 LDSHARED='$(CC) -bundle'
8588 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008589 if test "$enable_framework" ; then
8590 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008591 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8592 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008593 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008594 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008595 # No framework, use the Python app as bundle-loader
8596 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008597 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008598 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008599 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008600 Darwin/*)
8601 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8602 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008603
Ned Deily36820b62014-06-25 13:44:22 -07008604 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8605 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8606 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8607 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8608 if test ${dep_target_major} -eq 10 && \
8609 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008610 then
Ned Deily36820b62014-06-25 13:44:22 -07008611 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008612 LDSHARED='$(CC) -bundle'
8613 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008614 if test "$enable_framework" ; then
8615 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008616 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8617 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008618 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008619 else
8620 # No framework, use the Python app as bundle-loader
8621 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8622 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008623 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008624 fi
Ned Deily36820b62014-06-25 13:44:22 -07008625 else
8626 # building for OS X 10.3 and later
8627 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8628 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8629 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008630 fi
8631 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008632 Linux*|GNU*|QNX*)
8633 LDSHARED='$(CC) -shared'
8634 LDCXXSHARED='$(CXX) -shared';;
8635 BSD/OS*/4*)
8636 LDSHARED="gcc -shared"
8637 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008638 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008639 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008640 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008641 LDSHARED='$(CC) -shared'
8642 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008643 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008644 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008645 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008646 OpenBSD*)
8647 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8648 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008649 LDSHARED='$(CC) -shared $(CCSHARED)'
8650 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008651 else
8652 case `uname -r` in
8653 [01].* | 2.[0-7] | 2.[0-7].*)
8654 LDSHARED="ld -Bshareable ${LDFLAGS}"
8655 ;;
8656 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008657 LDSHARED='$(CC) -shared $(CCSHARED)'
8658 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008659 ;;
8660 esac
8661 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008662 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008663 LDSHARED='$(CC) -shared'
8664 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008665 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008666 if test "$GCC" = "yes" ; then
8667 LDSHARED='$(CC) -shared'
8668 LDCXXSHARED='$(CXX) -shared'
8669 else
8670 LDSHARED='$(CC) -G'
8671 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008672 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008673 SCO_SV*)
8674 LDSHARED='$(CC) -Wl,-G,-Bexport'
8675 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8676 CYGWIN*)
8677 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8678 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008679 *) LDSHARED="ld";;
8680 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8683$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008684LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008685BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008686# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008687# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8689$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008690if test -z "$CCSHARED"
8691then
Guido van Rossum07397971997-04-29 21:49:50 +00008692 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008693 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008694 then CCSHARED="-fPIC";
8695 elif test `uname -p` = sparc;
8696 then CCSHARED="-xcode=pic32";
8697 else CCSHARED="-Kpic";
8698 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008699 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008700 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008701 else CCSHARED="+z";
8702 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008703 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008704 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008705 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008706 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008707 if test "$GCC" = "yes"
8708 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008709 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008710 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008711 SCO_SV*)
8712 if test "$GCC" = "yes"
8713 then CCSHARED="-fPIC"
8714 else CCSHARED="-Kpic -belf"
8715 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008716 IRIX*/6*) case $CC in
8717 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008718 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008719 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008720 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8723$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008724# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008725# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8727$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008728if test -z "$LINKFORSHARED"
8729then
Guido van Rossum07397971997-04-29 21:49:50 +00008730 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008731 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008732 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008733 LINKFORSHARED="-Wl,-E -Wl,+s";;
8734# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008735 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008736 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008737 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008739 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008740
8741 # Issue #18075: the default maximum stack size (8MBytes) is too
8742 # small for the default recursion limit. Increase the stack size
8743 # to ensure that tests don't crash
8744 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8745
Jack Jansene578a632001-08-15 01:27:14 +00008746 if test "$enable_framework"
8747 then
Jack Jansenda49e192005-01-07 13:08:22 +00008748 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008749 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008750 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008751 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008752 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008753 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008754 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008755 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8756 then
8757 LINKFORSHARED="-Wl,--export-dynamic"
8758 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008759 SunOS/5*) case $CC in
8760 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008761 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008762 then
8763 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008764 fi;;
8765 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008766 CYGWIN*)
8767 if test $enable_shared = "no"
8768 then
8769 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8770 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008771 QNX*)
8772 # -Wl,-E causes the symbols to be added to the dynamic
8773 # symbol table so that they can be found when a module
8774 # is loaded. -N 2048K causes the stack size to be set
8775 # to 2048 kilobytes so that the stack doesn't overflow
8776 # when running test_compile.py.
8777 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008778 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8781$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008782
Michael W. Hudson54241132001-12-07 15:38:26 +00008783
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008784
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8786$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008787if test ! "$LIBRARY" = "$LDLIBRARY"
8788then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008789 case $ac_sys_system in
8790 CYGWIN*)
8791 # Cygwin needs CCSHARED when building extension DLLs
8792 # but not when building the interpreter DLL.
8793 CFLAGSFORSHARED='';;
8794 *)
8795 CFLAGSFORSHARED='$(CCSHARED)'
8796 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8799$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008800
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008801# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8802# library (with --enable-shared).
8803# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008804# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8805# if it is not required, since it creates a dependency of the shared library
8806# to LIBS. This, in turn, means that applications linking the shared libpython
8807# don't need to link LIBS explicitly. The default should be only changed
8808# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008809
Matthias Kloseb9621712010-04-24 17:59:49 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8811$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008812case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008813 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008814 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008815esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8817$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008818
8819
Guido van Rossum627b2d71993-12-24 10:39:16 +00008820# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8822$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008823if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008824 $as_echo_n "(cached) " >&6
8825else
8826 ac_check_lib_save_LIBS=$LIBS
8827LIBS="-lsendfile $LIBS"
8828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8829/* end confdefs.h. */
8830
8831/* Override any GCC internal prototype to avoid an error.
8832 Use char because int might match the return type of a GCC
8833 builtin and then its argument prototype would still apply. */
8834#ifdef __cplusplus
8835extern "C"
8836#endif
8837char sendfile ();
8838int
8839main ()
8840{
8841return sendfile ();
8842 ;
8843 return 0;
8844}
8845_ACEOF
8846if ac_fn_c_try_link "$LINENO"; then :
8847 ac_cv_lib_sendfile_sendfile=yes
8848else
8849 ac_cv_lib_sendfile_sendfile=no
8850fi
8851rm -f core conftest.err conftest.$ac_objext \
8852 conftest$ac_exeext conftest.$ac_ext
8853LIBS=$ac_check_lib_save_LIBS
8854fi
8855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8856$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008857if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008858 cat >>confdefs.h <<_ACEOF
8859#define HAVE_LIBSENDFILE 1
8860_ACEOF
8861
8862 LIBS="-lsendfile $LIBS"
8863
8864fi
8865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8867$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008868if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008870else
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008872LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876/* Override any GCC internal prototype to avoid an error.
8877 Use char because int might match the return type of a GCC
8878 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008879#ifdef __cplusplus
8880extern "C"
8881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008882char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008883int
8884main ()
8885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008887 ;
8888 return 0;
8889}
8890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008893else
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008896rm -f core conftest.err conftest.$ac_objext \
8897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008898LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8901$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008902if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 cat >>confdefs.h <<_ACEOF
8904#define HAVE_LIBDL 1
8905_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008906
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008907 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008908
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008909fi
8910 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8912$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008913if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008914 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008915else
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008917LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008921/* Override any GCC internal prototype to avoid an error.
8922 Use char because int might match the return type of a GCC
8923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008924#ifdef __cplusplus
8925extern "C"
8926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008927char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008928int
8929main ()
8930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008932 ;
8933 return 0;
8934}
8935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008936if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008937 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008938else
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008941rm -f core conftest.err conftest.$ac_objext \
8942 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008943LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8946$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008947if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008948 cat >>confdefs.h <<_ACEOF
8949#define HAVE_LIBDLD 1
8950_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008951
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008952 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008953
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008954fi
8955 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008956
Georg Brandlb1441c72009-01-03 22:33:39 +00008957# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008958if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8960$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008961if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008963else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008964 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008968/* Override any GCC internal prototype to avoid an error.
8969 Use char because int might match the return type of a GCC
8970 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008971#ifdef __cplusplus
8972extern "C"
8973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008974char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008975int
8976main ()
8977{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 ;
8980 return 0;
8981}
8982_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983for ac_lib in '' pthread rt posix4; do
8984 if test -z "$ac_lib"; then
8985 ac_res="none required"
8986 else
8987 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008988 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008989 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008991 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008993rm -f core conftest.err conftest.$ac_objext \
8994 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008995 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998done
Victor Stinnere0be4232011-10-25 13:06:09 +02008999if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001else
9002 ac_cv_search_sem_init=no
9003fi
9004rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009005LIBS=$ac_func_search_save_LIBS
9006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9008$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009009ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009010if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009012
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009013fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009014 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009015 # posix4 on Solaris 2.6
9016 # pthread (first!) on Linux
9017fi
9018
Martin v. Löwis19d17342003-06-14 21:03:05 +00009019# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9021$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009022if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009024else
9025 ac_check_lib_save_LIBS=$LIBS
9026LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009028/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009030/* Override any GCC internal prototype to avoid an error.
9031 Use char because int might match the return type of a GCC
9032 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009033#ifdef __cplusplus
9034extern "C"
9035#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009036char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009037int
9038main ()
9039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009041 ;
9042 return 0;
9043}
9044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009045if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009046 ac_cv_lib_intl_textdomain=yes
9047else
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009050rm -f core conftest.err conftest.$ac_objext \
9051 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009052LIBS=$ac_check_lib_save_LIBS
9053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9055$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009056if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009057
Matthias Kloseb9621712010-04-24 17:59:49 +00009058$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009059
Brett Cannonc6d936e2009-06-07 20:09:53 +00009060 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009061fi
9062
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009063
9064# checks for system dependent C++ extensions support
9065case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9067$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009069/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009070
Georg Brandl59e87bd2011-02-15 19:48:59 +00009071 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009072int
9073main ()
9074{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009075loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 ;
9077 return 0;
9078}
Matthias Kloseb159a552010-04-25 21:00:44 +00009079
Martin v. Löwis11437992002-04-12 09:54:03 +00009080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009081if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009082
Matthias Kloseb159a552010-04-25 21:00:44 +00009083
Matthias Kloseb9621712010-04-24 17:59:49 +00009084$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009085
Matthias Kloseb159a552010-04-25 21:00:44 +00009086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009087$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009088
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009089else
Matthias Kloseb159a552010-04-25 21:00:44 +00009090
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009092$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009093
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009095rm -f core conftest.err conftest.$ac_objext \
9096 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009097 *) ;;
9098esac
9099
Christian Heimes985ecdc2013-11-20 11:46:18 +01009100# check for systems that require aligned memory access
9101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9102$as_echo_n "checking aligned memory access is required... " >&6; }
9103if test "$cross_compiling" = yes; then :
9104 aligned_required=yes
9105else
9106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9107/* end confdefs.h. */
9108
9109int main()
9110{
9111 char s[16];
9112 int i, *p1, *p2;
9113 for (i=0; i < 16; i++)
9114 s[i] = i;
9115 p1 = (int*)(s+1);
9116 p2 = (int*)(s+2);
9117 if (*p1 == *p2)
9118 return 1;
9119 return 0;
9120}
9121
9122_ACEOF
9123if ac_fn_c_try_run "$LINENO"; then :
9124 aligned_required=no
9125else
9126 aligned_required=yes
9127fi
9128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9129 conftest.$ac_objext conftest.beam conftest.$ac_ext
9130fi
9131
9132
9133if test "$aligned_required" = yes ; then
9134
9135$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9136
9137fi
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9139$as_echo "$aligned_required" >&6; }
9140
9141
9142# str, bytes and memoryview hash algorithm
9143
9144
9145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9146$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9147
9148# Check whether --with-hash_algorithm was given.
9149if test "${with_hash_algorithm+set}" = set; then :
9150 withval=$with_hash_algorithm;
9151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9152$as_echo "$withval" >&6; }
9153case "$withval" in
9154 siphash24)
9155 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9156
9157 ;;
9158 fnv)
9159 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9160
9161 ;;
9162 *)
9163 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9164 ;;
9165esac
9166
9167else
9168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9169$as_echo "default" >&6; }
9170fi
9171
9172
Charles-François Natalid30b0222014-05-08 23:08:51 +01009173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9174$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9175
9176# Check whether --with-address_sanitizer was given.
9177if test "${with_address_sanitizer+set}" = set; then :
9178 withval=$with_address_sanitizer;
9179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9180$as_echo "$withval" >&6; }
9181BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9182LDFLAGS="-fsanitize=address $LDFLAGS"
9183
9184else
9185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9186$as_echo "no" >&6; }
9187fi
9188
9189
Guido van Rossum70c7f481998-03-26 18:44:10 +00009190# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9192$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009193if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009194 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009195else
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009197LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009201/* Override any GCC internal prototype to avoid an error.
9202 Use char because int might match the return type of a GCC
9203 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009204#ifdef __cplusplus
9205extern "C"
9206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009207char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009208int
9209main ()
9210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 ;
9213 return 0;
9214}
9215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009216if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009218else
Matthias Kloseb9621712010-04-24 17:59:49 +00009219 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009221rm -f core conftest.err conftest.$ac_objext \
9222 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009223LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9226$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009227if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009228 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009229fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009230 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9232$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009233if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009234 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009235else
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009237LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009241/* Override any GCC internal prototype to avoid an error.
9242 Use char because int might match the return type of a GCC
9243 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009244#ifdef __cplusplus
9245extern "C"
9246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009247char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009248int
9249main ()
9250{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009251return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009252 ;
9253 return 0;
9254}
9255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009256if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009258else
Matthias Kloseb9621712010-04-24 17:59:49 +00009259 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009261rm -f core conftest.err conftest.$ac_objext \
9262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009263LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9266$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009267if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009268 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009269fi
9270 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009271
Matthias Kloseb9621712010-04-24 17:59:49 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9273$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009276if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009277 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9279$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009280LIBS="$withval $LIBS"
9281
9282else
Matthias Kloseb9621712010-04-24 17:59:49 +00009283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9284$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009285fi
9286
Guido van Rossum7f43da71994-08-01 12:15:30 +00009287
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009288if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009289 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9290set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9292$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009293if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009294 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009295else
9296 case $PKG_CONFIG in
9297 [\\/]* | ?:[\\/]*)
9298 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9299 ;;
9300 *)
9301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9302for as_dir in $PATH
9303do
9304 IFS=$as_save_IFS
9305 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009306 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009307 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009308 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009309 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009310 break 2
9311 fi
9312done
Matthias Kloseb9621712010-04-24 17:59:49 +00009313 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009314IFS=$as_save_IFS
9315
9316 ;;
9317esac
9318fi
9319PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9320if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9322$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009323else
Matthias Kloseb9621712010-04-24 17:59:49 +00009324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9325$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009326fi
9327
9328
9329fi
9330if test -z "$ac_cv_path_PKG_CONFIG"; then
9331 ac_pt_PKG_CONFIG=$PKG_CONFIG
9332 # Extract the first word of "pkg-config", so it can be a program name with args.
9333set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9335$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009336if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009337 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009338else
9339 case $ac_pt_PKG_CONFIG in
9340 [\\/]* | ?:[\\/]*)
9341 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9342 ;;
9343 *)
9344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9345for as_dir in $PATH
9346do
9347 IFS=$as_save_IFS
9348 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009349 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009350 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009351 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009353 break 2
9354 fi
9355done
Matthias Kloseb9621712010-04-24 17:59:49 +00009356 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009357IFS=$as_save_IFS
9358
9359 ;;
9360esac
9361fi
9362ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9363if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9365$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009366else
Matthias Kloseb9621712010-04-24 17:59:49 +00009367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9368$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009369fi
9370
9371 if test "x$ac_pt_PKG_CONFIG" = x; then
9372 PKG_CONFIG=""
9373 else
9374 case $cross_compiling:$ac_tool_warned in
9375yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9377$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009378ac_tool_warned=yes ;;
9379esac
9380 PKG_CONFIG=$ac_pt_PKG_CONFIG
9381 fi
9382else
9383 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9384fi
9385
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009386
9387# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9389$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009390
9391# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009392if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009393 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009394else
9395 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009396fi
9397
9398
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9400$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009401
9402# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9404$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009405
9406# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009407if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009408 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009409else
9410 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009411fi
9412
9413
9414if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009415 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9416else
9417 LIBFFI_INCLUDEDIR=""
9418fi
9419
9420
Matthias Kloseb9621712010-04-24 17:59:49 +00009421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9422$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009423
Stefan Krah60187b52012-03-23 19:06:27 +01009424# Check for use of the system libmpdec library
9425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9426$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9427
9428# Check whether --with-system_libmpdec was given.
9429if test "${with_system_libmpdec+set}" = set; then :
9430 withval=$with_system_libmpdec;
9431else
9432 with_system_libmpdec="no"
9433fi
9434
9435
9436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9437$as_echo "$with_system_libmpdec" >&6; }
9438
Benjamin Peterson076ed002010-10-31 17:11:02 +00009439# Check for support for loadable sqlite extensions
9440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9441$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9442# Check whether --enable-loadable-sqlite-extensions was given.
9443if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9444 enableval=$enable_loadable_sqlite_extensions;
9445else
9446 enable_loadable_sqlite_extensions="no"
9447fi
9448
9449
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9451$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9452
Ned Deilyd819b932013-09-06 01:07:05 -07009453# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9454
9455
9456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9457$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9458
9459# Check whether --with-tcltk-includes was given.
9460if test "${with_tcltk_includes+set}" = set; then :
9461 withval=$with_tcltk_includes;
9462else
9463 with_tcltk_includes="default"
9464fi
9465
9466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9467$as_echo "$with_tcltk_includes" >&6; }
9468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9469$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9470
9471# Check whether --with-tcltk-libs was given.
9472if test "${with_tcltk_libs+set}" = set; then :
9473 withval=$with_tcltk_libs;
9474else
9475 with_tcltk_libs="default"
9476fi
9477
9478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9479$as_echo "$with_tcltk_libs" >&6; }
9480if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9481then
9482 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9483 then
9484 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9485 fi
9486 TCLTK_INCLUDES=""
9487 TCLTK_LIBS=""
9488else
9489 TCLTK_INCLUDES="$with_tcltk_includes"
9490 TCLTK_LIBS="$with_tcltk_libs"
9491fi
9492
Matthias Klose55708cc2009-04-30 08:06:49 +00009493# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9495$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009496
9497# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009498if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009499 withval=$with_dbmliborder;
9500if test x$with_dbmliborder = xyes
9501then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009502as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009503else
9504 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9505 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9506 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009507 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009508 fi
9509 done
9510fi
9511fi
9512
Matthias Kloseb9621712010-04-24 17:59:49 +00009513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9514$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009515
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009516# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009517
9518
Matthias Kloseb9621712010-04-24 17:59:49 +00009519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9520$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009523if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009524 withval=$with_signal_module;
9525fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009526
9527
9528if test -z "$with_signal_module"
9529then with_signal_module="yes"
9530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9532$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009533
9534if test "${with_signal_module}" = "yes"; then
9535 USE_SIGNAL_MODULE=""
9536 SIGNAL_OBJS=""
9537else
9538 USE_SIGNAL_MODULE="#"
9539 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9540fi
9541
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009542# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009543
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009544USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009546
Martin v. Löwis11437992002-04-12 09:54:03 +00009547
9548# Templates for things AC_DEFINEd more than once.
9549# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009550
9551
Martin v. Löwis11437992002-04-12 09:54:03 +00009552
Matthias Kloseb9621712010-04-24 17:59:49 +00009553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9554$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009557if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558 withval=$with_threads;
9559fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009560
9561
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009562# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009565if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566 withval=$with_thread; with_threads=$with_thread
9567fi
9568
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009569
9570if test -z "$with_threads"
9571then with_threads="yes"
9572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9574$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009575
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009576
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009577if test "$with_threads" = "no"
9578then
9579 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009580elif test "$ac_cv_pthread_is_default" = yes
9581then
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009583
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009584 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009585 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009586
9587 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009589elif test "$ac_cv_kpthread" = "yes"
9590then
9591 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009592 if test "$ac_cv_cxx_thread" = "yes"; then
9593 CXX="$CXX -Kpthread"
9594 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009596
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009597 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009598 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009599elif test "$ac_cv_kthread" = "yes"
9600then
9601 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009602 if test "$ac_cv_cxx_thread" = "yes"; then
9603 CXX="$CXX -Kthread"
9604 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009605 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009606
9607 posix_threads=yes
9608 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009609elif test "$ac_cv_pthread" = "yes"
9610then
9611 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009612 if test "$ac_cv_cxx_thread" = "yes"; then
9613 CXX="$CXX -pthread"
9614 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009615 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009616
9617 posix_threads=yes
9618 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009619else
9620 if test ! -z "$with_threads" -a -d "$with_threads"
9621 then LDFLAGS="$LDFLAGS -L$with_threads"
9622 fi
9623 if test ! -z "$withval" -a -d "$withval"
9624 then LDFLAGS="$LDFLAGS -L$withval"
9625 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009626
9627 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009628 # define _POSIX_THREADS in unistd.h. Some apparently don't
9629 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9631$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009633/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009634
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009635#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009636#ifdef _POSIX_THREADS
9637yes
9638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009639
9640_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009643 unistd_defines_pthreads=yes
9644else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009645 unistd_defines_pthreads=no
9646fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009647rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009648
Matthias Kloseb9621712010-04-24 17:59:49 +00009649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9650$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009651
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009653
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009654 # Just looking for pthread_create in libpthread is not enough:
9655 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9656 # So we really have to include pthread.h, and then link.
9657 _libs=$LIBS
9658 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9660$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009662/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009663
9664#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009665#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009666
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009667void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009668int
9669main ()
9670{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009671
9672pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ;
9674 return 0;
9675}
9676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009677if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009678
Matthias Kloseb9621712010-04-24 17:59:49 +00009679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9680$as_echo "yes" >&6; }
9681 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009682
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009683 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009684 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009685else
Martin v. Löwis11437992002-04-12 09:54:03 +00009686
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009687 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009688 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009689if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009690 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009691
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009692 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009693 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009694else
Guido van Rossumad678af1998-10-02 14:42:15 +00009695
Matthias Kloseb9621712010-04-24 17:59:49 +00009696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9697$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009698if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009700else
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009702LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706/* Override any GCC internal prototype to avoid an error.
9707 Use char because int might match the return type of a GCC
9708 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009709#ifdef __cplusplus
9710extern "C"
9711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009712char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009713int
9714main ()
9715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 ;
9718 return 0;
9719}
9720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009721if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009723else
Matthias Kloseb9621712010-04-24 17:59:49 +00009724 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009726rm -f core conftest.err conftest.$ac_objext \
9727 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009728LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9731$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009732if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009733 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009734
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009735 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009736 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009737 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009738else
Greg Steinadf63d62000-07-05 10:38:09 +00009739
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9741$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009742if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009743 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009744else
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009746LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009750/* Override any GCC internal prototype to avoid an error.
9751 Use char because int might match the return type of a GCC
9752 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009753#ifdef __cplusplus
9754extern "C"
9755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009756char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009757int
9758main ()
9759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009760return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 ;
9762 return 0;
9763}
9764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009767else
Matthias Kloseb9621712010-04-24 17:59:49 +00009768 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009770rm -f core conftest.err conftest.$ac_objext \
9771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009772LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9775$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009776if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009778
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009779 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009780 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009781 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009782else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009783
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9785$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009786if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009788else
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009790LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794/* Override any GCC internal prototype to avoid an error.
9795 Use char because int might match the return type of a GCC
9796 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797#ifdef __cplusplus
9798extern "C"
9799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009800char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009801int
9802main ()
9803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009804return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009805 ;
9806 return 0;
9807}
9808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009809if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009811else
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009814rm -f core conftest.err conftest.$ac_objext \
9815 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009816LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9819$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009820if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009822
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009823 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009824 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009825 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009826else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009827
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9829$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009830if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009832else
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009834LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838/* Override any GCC internal prototype to avoid an error.
9839 Use char because int might match the return type of a GCC
9840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009841#ifdef __cplusplus
9842extern "C"
9843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009844char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ;
9850 return 0;
9851}
9852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009855else
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858rm -f core conftest.err conftest.$ac_objext \
9859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009860LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9863$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009864if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009865 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009866
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009867 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009868 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009869 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009870else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009871
Martin v. Löwis130fb172001-07-19 11:00:41 +00009872 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009873fi
9874
Guido van Rossum627b2d71993-12-24 10:39:16 +00009875
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009876fi
9877
Guido van Rossum0be3e491997-05-22 20:33:33 +00009878fi
9879
Guido van Rossum49545951997-12-02 19:28:29 +00009880fi
9881
Guido van Rossumb93a8621998-05-07 13:27:32 +00009882fi
9883
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009885rm -f core conftest.err conftest.$ac_objext \
9886 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009887
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9889$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009890if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009891 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009892else
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009894LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898/* Override any GCC internal prototype to avoid an error.
9899 Use char because int might match the return type of a GCC
9900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009901#ifdef __cplusplus
9902extern "C"
9903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009904char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009905int
9906main ()
9907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 ;
9910 return 0;
9911}
9912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009913if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009915else
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009918rm -f core conftest.err conftest.$ac_objext \
9919 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009920LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9923$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009924if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009926
Martin v. Löwis130fb172001-07-19 11:00:41 +00009927 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009928 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009929 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009930fi
9931
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009932
Neal Norwitza978ab02002-11-02 16:58:05 +00009933 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9935$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009936if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009938else
Martin v. Löwis11437992002-04-12 09:54:03 +00009939 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009940LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944/* Override any GCC internal prototype to avoid an error.
9945 Use char because int might match the return type of a GCC
9946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009947#ifdef __cplusplus
9948extern "C"
9949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009950char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009951int
9952main ()
9953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 ;
9956 return 0;
9957}
9958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009960 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009961else
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009964rm -f core conftest.err conftest.$ac_objext \
9965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009966LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9969$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009970if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009971 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009972
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009973 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009974 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009975 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009976fi
9977
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009978 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009979fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009980
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009981if test "$posix_threads" = "yes"; then
9982 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009983
Matthias Kloseb9621712010-04-24 17:59:49 +00009984$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009985
9986 fi
9987
9988 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9989 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009990 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009991$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009992
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009993 ;;
9994 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009995$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009996
9997 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009998 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009999$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010000
10001 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010002 esac
10003
Matthias Kloseb9621712010-04-24 17:59:49 +000010004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10005$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010006 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010008else
Matthias Kloseb9621712010-04-24 17:59:49 +000010009 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010010 ac_cv_pthread_system_supported=no
10011else
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010013/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010014
10015 #include <stdio.h>
10016 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010017 void *foo(void *parm) {
10018 return NULL;
10019 }
10020 main() {
10021 pthread_attr_t attr;
10022 pthread_t id;
10023 if (pthread_attr_init(&attr)) exit(-1);
10024 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10025 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10026 exit(0);
10027 }
10028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010029if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010030 ac_cv_pthread_system_supported=yes
10031else
Matthias Kloseb9621712010-04-24 17:59:49 +000010032 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10035 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010036fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038
Guido van Rossum627b2d71993-12-24 10:39:16 +000010039fi
10040
Matthias Kloseb9621712010-04-24 17:59:49 +000010041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10042$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010043 if test "$ac_cv_pthread_system_supported" = "yes"; then
10044
Matthias Kloseb9621712010-04-24 17:59:49 +000010045$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010046
10047 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010048 for ac_func in pthread_sigmask
10049do :
10050 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010051if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010052 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010053#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010054_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010055 case $ac_sys_system in
10056 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010059
10060 ;;
10061 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010062fi
10063done
10064
Christian Heimesf77b4b22013-08-21 13:26:05 +020010065 for ac_func in pthread_atfork
10066do :
10067 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10068if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10069 cat >>confdefs.h <<_ACEOF
10070#define HAVE_PTHREAD_ATFORK 1
10071_ACEOF
10072
10073fi
10074done
10075
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010076fi
10077
10078
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010079# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010080
Matthias Kloseb9621712010-04-24 17:59:49 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10082$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010083# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010084if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010086 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10088$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010089 ipv6=no
10090 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010091 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10092$as_echo "yes" >&6; }
10093 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010094
10095 ipv6=yes
10096 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010097 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010098else
Martin v. Löwis11437992002-04-12 09:54:03 +000010099
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öwisa2ac6022001-08-09 11:40:14 +000010102 /* AF_INET6 available check */
10103#include <sys/types.h>
10104#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010105int
10106main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010107{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010108int domain = AF_INET6;
10109 ;
10110 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010111}
Martin v. Löwis11437992002-04-12 09:54:03 +000010112_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010113if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010114
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10116$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010117 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010118
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010119else
Matthias Kloseb159a552010-04-25 21:00:44 +000010120
Matthias Kloseb9621712010-04-24 17:59:49 +000010121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10122$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010123 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010124
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010125fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010128if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10130$as_echo_n "checking if RFC2553 API is available... " >&6; }
10131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010132/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010133
10134 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010135#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010136int
10137main ()
10138{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010139struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010140 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ;
10142 return 0;
10143}
Matthias Kloseb159a552010-04-25 21:00:44 +000010144
Martin v. Löwis11437992002-04-12 09:54:03 +000010145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010146if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010147
10148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010149$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010150 ipv6=yes
10151
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010152else
Matthias Kloseb159a552010-04-25 21:00:44 +000010153
10154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010155$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010156 ipv6=no
10157
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010160fi
10161
10162if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010164
10165fi
10166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167fi
10168
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010169
10170ipv6type=unknown
10171ipv6lib=none
10172ipv6trylibc=no
10173
10174if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10176$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010177 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10178 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010179 case $i in
10180 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010182/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010183
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010184#include <netinet/in.h>
10185#ifdef IPV6_INRIA_VERSION
10186yes
10187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010188_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010191 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010192fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010193rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010194
10195 ;;
10196 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010198/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010199
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010200#include <netinet/in.h>
10201#ifdef __KAME__
10202yes
10203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010204_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010207 ipv6type=$i;
10208 ipv6lib=inet6
10209 ipv6libdir=/usr/local/v6/lib
10210 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010211fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010212rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010213
10214 ;;
10215 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010217/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010218
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010219#include <features.h>
10220#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10221yes
10222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010223_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010226 ipv6type=$i;
10227 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010228fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010229rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010230
10231 ;;
10232 linux-inet6)
10233 if test -d /usr/inet6; then
10234 ipv6type=$i
10235 ipv6lib=inet6
10236 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010237 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010238 fi
10239 ;;
10240 solaris)
10241 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010242 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010243 ipv6type=$i
10244 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010245 fi
10246 fi
10247 ;;
10248 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010250/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010251
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010252#include <sys/param.h>
10253#ifdef _TOSHIBA_INET6
10254yes
10255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010256_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010259 ipv6type=$i;
10260 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010261 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010262fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010263rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010264
10265 ;;
10266 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010269
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010270#include </usr/local/v6/include/sys/v6config.h>
10271#ifdef __V6D__
10272yes
10273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010274_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010275if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010276 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010277 ipv6type=$i;
10278 ipv6lib=v6;
10279 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010280 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010281fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010282rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010283
10284 ;;
10285 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010287/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010288
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010289#include <sys/param.h>
10290#ifdef _ZETA_MINAMI_INET6
10291yes
10292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010293_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010296 ipv6type=$i;
10297 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010298 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010299fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010300rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010301
10302 ;;
10303 esac
10304 if test "$ipv6type" != "unknown"; then
10305 break
10306 fi
10307 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10309$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010310fi
10311
10312if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10313 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10314 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10315 echo "using lib$ipv6lib"
10316 else
10317 if test $ipv6trylibc = "yes"; then
10318 echo "using libc"
10319 else
10320 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10321 echo "You need to fetch lib$ipv6lib.a from appropriate"
10322 echo 'ipv6 kit and compile beforehand.'
10323 exit 1
10324 fi
10325 fi
10326fi
10327
Matthias Kloseb9621712010-04-24 17:59:49 +000010328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10329$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010331/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010332
10333 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010334int
10335main ()
10336{
10337FSIORefNum fRef = 0
10338 ;
10339 return 0;
10340}
Matthias Kloseb159a552010-04-25 21:00:44 +000010341
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010343if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010344
Matthias Kloseb159a552010-04-25 21:00:44 +000010345
Matthias Kloseb9621712010-04-24 17:59:49 +000010346$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10349$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010350
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010351else
Matthias Kloseb159a552010-04-25 21:00:44 +000010352
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010355
10356fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10358
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010359# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10361$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010364if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010365 withval=$with_doc_strings;
10366fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010367
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010368
10369if test -z "$with_doc_strings"
10370then with_doc_strings="yes"
10371fi
10372if test "$with_doc_strings" != "no"
10373then
10374
Matthias Kloseb9621712010-04-24 17:59:49 +000010375$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010376
10377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10379$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010380
Antoine Pitrou042b1282010-08-13 21:15:58 +000010381# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10383$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010386if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010387 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010388if test "$withval" != no
10389then
10390
Matthias Kloseb9621712010-04-24 17:59:49 +000010391$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010392
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10394$as_echo "yes" >&6; }
10395else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10396$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010397fi
10398else
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10400$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010401fi
10402
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010403
10404# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10406$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010409if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010410 withval=$with_pymalloc;
10411fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010412
Neil Schemenauera35c6882001-02-27 04:45:05 +000010413
Neil Schemenauer16c22972002-03-22 15:34:49 +000010414if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010415then
10416 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010417fi
10418if test "$with_pymalloc" != "no"
10419then
Martin v. Löwis11437992002-04-12 09:54:03 +000010420
Matthias Kloseb9621712010-04-24 17:59:49 +000010421$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010422
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010423 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10426$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010427
Benjamin Peterson05159c42009-12-03 03:01:27 +000010428# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10430$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010431
10432# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010433if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010434 withval=$with_valgrind;
10435else
10436 with_valgrind=no
10437fi
10438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10440$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010441if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 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 +020010443if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010444
Matthias Kloseb9621712010-04-24 17:59:49 +000010445$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010446
10447else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010448 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010449
10450fi
10451
10452
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010453 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010454fi
10455
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010456# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010457
Guido van Rossum98935bf2001-09-05 19:13:16 +000010458DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010459
Guido van Rossume97ee181999-12-20 21:27:22 +000010460# the dlopen() function means we might want to use dynload_shlib.o. some
10461# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010462for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010463do :
10464 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010465if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010466 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010467#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010468_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010469
Guido van Rossume97ee181999-12-20 21:27:22 +000010470fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010471done
Guido van Rossume97ee181999-12-20 21:27:22 +000010472
Michael W. Hudson54241132001-12-07 15:38:26 +000010473
Guido van Rossume97ee181999-12-20 21:27:22 +000010474# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10475# loading of modules.
10476
Matthias Kloseb9621712010-04-24 17:59:49 +000010477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10478$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010479if test -z "$DYNLOADFILE"
10480then
10481 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010482 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10483 if test "$ac_cv_func_dlopen" = yes
10484 then DYNLOADFILE="dynload_shlib.o"
10485 else DYNLOADFILE="dynload_aix.o"
10486 fi
10487 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010488 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010489 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10490 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010491 *)
10492 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10493 # out any dynamic loading
10494 if test "$ac_cv_func_dlopen" = yes
10495 then DYNLOADFILE="dynload_shlib.o"
10496 else DYNLOADFILE="dynload_stub.o"
10497 fi
10498 ;;
10499 esac
10500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10502$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010503if test "$DYNLOADFILE" != "dynload_stub.o"
10504then
Martin v. Löwis11437992002-04-12 09:54:03 +000010505
Matthias Kloseb9621712010-04-24 17:59:49 +000010506$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010507
10508fi
10509
Neil Schemenauer4e425612001-06-19 15:44:15 +000010510# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10511
Michael W. Hudson54241132001-12-07 15:38:26 +000010512
Matthias Kloseb9621712010-04-24 17:59:49 +000010513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10514$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010515if test -z "$MACHDEP_OBJS"
10516then
Jack Jansene578a632001-08-15 01:27:14 +000010517 MACHDEP_OBJS=$extra_machdep_objs
10518else
10519 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010520fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010521if test -z "$MACHDEP_OBJS"; then
10522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10523$as_echo "none" >&6; }
10524else
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10526$as_echo "$MACHDEP_OBJS" >&6; }
10527fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010528
Guido van Rossum627b2d71993-12-24 10:39:16 +000010529# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010530for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010531 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010532 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010533 futimens futimes gai_strerror \
10534 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010535 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010536 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010537 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10538 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010539 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010540 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010541 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010542 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010543 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010544 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010545 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10546 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010547 sigaction sigaltstack siginterrupt sigpending sigrelse \
10548 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010549 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010550 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010551 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010552do :
10553 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10554ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010555if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010556 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010557#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010558_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010559
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010560fi
10561done
10562
Michael W. Hudson54241132001-12-07 15:38:26 +000010563
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010564ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10565 #include <dirent.h>
10566"
10567if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10568
10569$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10570
10571fi
10572
10573
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010574# For some functions, having a definition is not sufficient, since
10575# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10577$as_echo_n "checking for chroot... " >&6; }
10578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010579/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010580#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010581int
10582main ()
10583{
10584void *x=chroot
10585 ;
10586 return 0;
10587}
10588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010590
Matthias Kloseb9621712010-04-24 17:59:49 +000010591$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010592
Matthias Kloseb159a552010-04-25 21:00:44 +000010593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010594$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010595else
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10597$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010598
10599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10602$as_echo_n "checking for link... " >&6; }
10603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010604/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010605#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010606int
10607main ()
10608{
10609void *x=link
10610 ;
10611 return 0;
10612}
10613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010615
Matthias Kloseb9621712010-04-24 17:59:49 +000010616$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010617
Matthias Kloseb159a552010-04-25 21:00:44 +000010618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010619$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010620else
Matthias Kloseb9621712010-04-24 17:59:49 +000010621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10622$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010623
10624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10627$as_echo_n "checking for symlink... " >&6; }
10628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010629/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010630#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010631int
10632main ()
10633{
10634void *x=symlink
10635 ;
10636 return 0;
10637}
10638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010640
Matthias Kloseb9621712010-04-24 17:59:49 +000010641$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010642
Matthias Kloseb159a552010-04-25 21:00:44 +000010643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010644$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010645else
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10647$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010648
10649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10652$as_echo_n "checking for fchdir... " >&6; }
10653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010654/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010655#include <unistd.h>
10656int
10657main ()
10658{
10659void *x=fchdir
10660 ;
10661 return 0;
10662}
10663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010664if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010665
Matthias Kloseb9621712010-04-24 17:59:49 +000010666$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010667
Matthias Kloseb159a552010-04-25 21:00:44 +000010668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010669$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010670else
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10672$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010673
10674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10677$as_echo_n "checking for fsync... " >&6; }
10678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010679/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010680#include <unistd.h>
10681int
10682main ()
10683{
10684void *x=fsync
10685 ;
10686 return 0;
10687}
10688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010689if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010690
Matthias Kloseb9621712010-04-24 17:59:49 +000010691$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010692
Matthias Kloseb159a552010-04-25 21:00:44 +000010693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010694$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010695else
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010698
10699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10702$as_echo_n "checking for fdatasync... " >&6; }
10703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010704/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010705#include <unistd.h>
10706int
10707main ()
10708{
10709void *x=fdatasync
10710 ;
10711 return 0;
10712}
10713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010714if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010717
Matthias Kloseb159a552010-04-25 21:00:44 +000010718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010719$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010720else
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10722$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010723
10724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10727$as_echo_n "checking for epoll... " >&6; }
10728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010729/* end confdefs.h. */
10730#include <sys/epoll.h>
10731int
10732main ()
10733{
10734void *x=epoll_create
10735 ;
10736 return 0;
10737}
10738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010740
Matthias Kloseb9621712010-04-24 17:59:49 +000010741$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010742
Matthias Kloseb159a552010-04-25 21:00:44 +000010743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010744$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010745else
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10747$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010748
10749fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10752$as_echo_n "checking for epoll_create1... " >&6; }
10753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10754/* end confdefs.h. */
10755#include <sys/epoll.h>
10756int
10757main ()
10758{
10759void *x=epoll_create1
10760 ;
10761 return 0;
10762}
10763_ACEOF
10764if ac_fn_c_try_compile "$LINENO"; then :
10765
10766$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10767
10768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10769$as_echo "yes" >&6; }
10770else
10771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10772$as_echo "no" >&6; }
10773
10774fi
10775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10777$as_echo_n "checking for kqueue... " >&6; }
10778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010779/* end confdefs.h. */
10780
10781#include <sys/types.h>
10782#include <sys/event.h>
10783
10784int
10785main ()
10786{
10787int x=kqueue()
10788 ;
10789 return 0;
10790}
10791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010792if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010793
Matthias Kloseb9621712010-04-24 17:59:49 +000010794$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010795
Matthias Kloseb159a552010-04-25 21:00:44 +000010796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010797$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010798else
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10800$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010801
10802fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10805$as_echo_n "checking for prlimit... " >&6; }
10806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10807/* end confdefs.h. */
10808
10809#include <sys/time.h>
10810#include <sys/resource.h>
10811
10812int
10813main ()
10814{
10815void *x=prlimit
10816 ;
10817 return 0;
10818}
10819_ACEOF
10820if ac_fn_c_try_compile "$LINENO"; then :
10821
10822$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10823
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10825$as_echo "yes" >&6; }
10826else
10827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10828$as_echo "no" >&6; }
10829
10830fi
10831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10832
Martin v. Löwisd5843682002-11-21 20:41:28 +000010833# On some systems (eg. FreeBSD 5), we would find a definition of the
10834# functions ctermid_r, setgroups in the library, but no prototype
10835# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10836# address to avoid compiler warnings and potential miscompilations
10837# because of the missing prototypes.
10838
Matthias Kloseb9621712010-04-24 17:59:49 +000010839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10840$as_echo_n "checking for ctermid_r... " >&6; }
10841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010842/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010843
Martin v. Löwisd5843682002-11-21 20:41:28 +000010844#include <stdio.h>
10845
Martin v. Löwisd5843682002-11-21 20:41:28 +000010846int
10847main ()
10848{
10849void* p = ctermid_r
10850 ;
10851 return 0;
10852}
10853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010854if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010855
Matthias Kloseb9621712010-04-24 17:59:49 +000010856$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010857
Matthias Kloseb159a552010-04-25 21:00:44 +000010858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010859$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010860else
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10862$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010863
10864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10866
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10868$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010869if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010870 $as_echo_n "(cached) " >&6
10871else
10872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010873/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010874#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010875int
10876main ()
10877{
10878void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010879
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010880 ;
10881 return 0;
10882}
10883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010884if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010885 ac_cv_flock_decl=yes
10886else
10887 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010888
10889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010891
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010892fi
10893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10894$as_echo "$ac_cv_flock_decl" >&6; }
10895if test "x${ac_cv_flock_decl}" = xyes; then
10896 for ac_func in flock
10897do :
10898 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010899if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010900 cat >>confdefs.h <<_ACEOF
10901#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010902_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010903
Antoine Pitroua3000072010-09-07 14:52:42 +000010904else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010906$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010907if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010908 $as_echo_n "(cached) " >&6
10909else
10910 ac_check_lib_save_LIBS=$LIBS
10911LIBS="-lbsd $LIBS"
10912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10913/* end confdefs.h. */
10914
10915/* Override any GCC internal prototype to avoid an error.
10916 Use char because int might match the return type of a GCC
10917 builtin and then its argument prototype would still apply. */
10918#ifdef __cplusplus
10919extern "C"
10920#endif
10921char flock ();
10922int
10923main ()
10924{
10925return flock ();
10926 ;
10927 return 0;
10928}
10929_ACEOF
10930if ac_fn_c_try_link "$LINENO"; then :
10931 ac_cv_lib_bsd_flock=yes
10932else
10933 ac_cv_lib_bsd_flock=no
10934fi
10935rm -f core conftest.err conftest.$ac_objext \
10936 conftest$ac_exeext conftest.$ac_ext
10937LIBS=$ac_check_lib_save_LIBS
10938fi
10939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10940$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010941if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010942 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010943
10944
10945$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10946
10947
10948fi
10949
10950
10951fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010952done
10953
Antoine Pitroua3000072010-09-07 14:52:42 +000010954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10957$as_echo_n "checking for getpagesize... " >&6; }
10958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010959/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010960
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010961#include <unistd.h>
10962
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010963int
10964main ()
10965{
10966void* p = getpagesize
10967 ;
10968 return 0;
10969}
10970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010972
Matthias Kloseb9621712010-04-24 17:59:49 +000010973$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010974
Matthias Kloseb159a552010-04-25 21:00:44 +000010975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010976$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010977else
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10979$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010980
10981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010983
Victor Stinner984890f2011-11-24 13:53:38 +010010984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10985$as_echo_n "checking for broken unsetenv... " >&6; }
10986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10987/* end confdefs.h. */
10988
10989#include <stdlib.h>
10990
10991int
10992main ()
10993{
10994int res = unsetenv("DUMMY")
10995 ;
10996 return 0;
10997}
10998_ACEOF
10999if ac_fn_c_try_compile "$LINENO"; then :
11000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11001$as_echo "no" >&6; }
11002else
11003
11004$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11005
11006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11007$as_echo "yes" >&6; }
11008
11009fi
11010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11011
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011012for ac_prog in true
11013do
11014 # Extract the first word of "$ac_prog", so it can be a program name with args.
11015set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11017$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011018if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011020else
11021 if test -n "$TRUE"; then
11022 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11023else
11024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11025for as_dir in $PATH
11026do
11027 IFS=$as_save_IFS
11028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011031 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 $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 +000011033 break 2
11034 fi
11035done
Matthias Kloseb9621712010-04-24 17:59:49 +000011036 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011038
11039fi
11040fi
11041TRUE=$ac_cv_prog_TRUE
11042if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11044$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011045else
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11047$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011048fi
11049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011050
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011051 test -n "$TRUE" && break
11052done
11053test -n "$TRUE" || TRUE="/bin/true"
11054
11055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11057$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011058if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011060else
11061 ac_check_lib_save_LIBS=$LIBS
11062LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011064/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011066/* Override any GCC internal prototype to avoid an error.
11067 Use char because int might match the return type of a GCC
11068 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011069#ifdef __cplusplus
11070extern "C"
11071#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011072char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011073int
11074main ()
11075{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011076return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011077 ;
11078 return 0;
11079}
11080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011081if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011082 ac_cv_lib_c_inet_aton=yes
11083else
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011086rm -f core conftest.err conftest.$ac_objext \
11087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011088LIBS=$ac_check_lib_save_LIBS
11089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11091$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011092if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011093 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011094else
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11096$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011097if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011099else
11100 ac_check_lib_save_LIBS=$LIBS
11101LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011105/* Override any GCC internal prototype to avoid an error.
11106 Use char because int might match the return type of a GCC
11107 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011108#ifdef __cplusplus
11109extern "C"
11110#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011111char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011112int
11113main ()
11114{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011115return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011116 ;
11117 return 0;
11118}
11119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011120if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011121 ac_cv_lib_resolv_inet_aton=yes
11122else
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011125rm -f core conftest.err conftest.$ac_objext \
11126 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011127LIBS=$ac_check_lib_save_LIBS
11128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11130$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011131if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011132 cat >>confdefs.h <<_ACEOF
11133#define HAVE_LIBRESOLV 1
11134_ACEOF
11135
11136 LIBS="-lresolv $LIBS"
11137
11138fi
11139
11140
11141fi
11142
11143
Christian Heimesd0764e22007-12-04 15:00:33 +000011144# On Tru64, chflags seems to be present, but calling it will
11145# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11147$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011148if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011149 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011150else
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011152 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011153else
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011155/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011156
Christian Heimesd0764e22007-12-04 15:00:33 +000011157#include <sys/stat.h>
11158#include <unistd.h>
11159int main(int argc, char*argv[])
11160{
11161 if(chflags(argv[0], 0) != 0)
11162 return 1;
11163 return 0;
11164}
Ned Deily3eb67d52011-06-28 00:00:28 -070011165
Christian Heimesd0764e22007-12-04 15:00:33 +000011166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011167if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011168 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011169else
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11173 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011174fi
11175
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011176
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11179$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011180if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011182if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011183 ac_cv_have_chflags="yes"
11184else
11185 ac_cv_have_chflags="no"
11186fi
11187
11188fi
11189if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011190
Matthias Kloseb9621712010-04-24 17:59:49 +000011191$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011192
11193fi
11194
Matthias Kloseb9621712010-04-24 17:59:49 +000011195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11196$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011197if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011198 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011199else
Matthias Kloseb9621712010-04-24 17:59:49 +000011200 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011201 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011202else
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011204/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011205
Christian Heimesd0764e22007-12-04 15:00:33 +000011206#include <sys/stat.h>
11207#include <unistd.h>
11208int main(int argc, char*argv[])
11209{
11210 if(lchflags(argv[0], 0) != 0)
11211 return 1;
11212 return 0;
11213}
Ned Deily3eb67d52011-06-28 00:00:28 -070011214
Christian Heimesd0764e22007-12-04 15:00:33 +000011215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011216if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011217 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011218else
Matthias Kloseb9621712010-04-24 17:59:49 +000011219 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11222 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011223fi
11224
11225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11228$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011229if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011230 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011231if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011232 ac_cv_have_lchflags="yes"
11233else
11234 ac_cv_have_lchflags="no"
11235fi
11236
11237fi
11238if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011241
11242fi
11243
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011244case $ac_sys_system/$ac_sys_release in
11245Darwin/*)
11246 _CUR_CFLAGS="${CFLAGS}"
11247 _CUR_LDFLAGS="${LDFLAGS}"
11248 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11249 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11250 ;;
11251esac
11252
Matthias Kloseb9621712010-04-24 17:59:49 +000011253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11254$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011255if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011256 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011257else
11258 ac_check_lib_save_LIBS=$LIBS
11259LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011261/* end confdefs.h. */
11262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263/* Override any GCC internal prototype to avoid an error.
11264 Use char because int might match the return type of a GCC
11265 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011266#ifdef __cplusplus
11267extern "C"
11268#endif
11269char inflateCopy ();
11270int
11271main ()
11272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011273return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011274 ;
11275 return 0;
11276}
11277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011279 ac_cv_lib_z_inflateCopy=yes
11280else
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011283rm -f core conftest.err conftest.$ac_objext \
11284 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011285LIBS=$ac_check_lib_save_LIBS
11286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11288$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011289if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011290
Matthias Kloseb9621712010-04-24 17:59:49 +000011291$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011292
11293fi
11294
11295
11296case $ac_sys_system/$ac_sys_release in
11297Darwin/*)
11298 CFLAGS="${_CUR_CFLAGS}"
11299 LDFLAGS="${_CUR_LDFLAGS}"
11300 ;;
11301esac
11302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11304$as_echo_n "checking for hstrerror... " >&6; }
11305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011306/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011307
Martin v. Löwise9416172003-05-03 10:12:45 +000011308#include <netdb.h>
11309
Martin v. Löwise9416172003-05-03 10:12:45 +000011310int
11311main ()
11312{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011313void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011314 ;
11315 return 0;
11316}
11317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011318if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011319
Matthias Kloseb9621712010-04-24 17:59:49 +000011320$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011321
Matthias Kloseb159a552010-04-25 21:00:44 +000011322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011324else
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11326$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011327
11328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011329rm -f core conftest.err conftest.$ac_objext \
11330 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011331
Matthias Kloseb9621712010-04-24 17:59:49 +000011332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11333$as_echo_n "checking for inet_aton... " >&6; }
11334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011335/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011336
Martin v. Löwis86d66262006-02-17 08:40:11 +000011337#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011338#include <sys/socket.h>
11339#include <netinet/in.h>
11340#include <arpa/inet.h>
11341
Martin v. Löwise9416172003-05-03 10:12:45 +000011342int
11343main ()
11344{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011345void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011346 ;
11347 return 0;
11348}
11349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011350if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011351
Matthias Kloseb9621712010-04-24 17:59:49 +000011352$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011353
Matthias Kloseb159a552010-04-25 21:00:44 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011355$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011356else
Matthias Kloseb9621712010-04-24 17:59:49 +000011357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11358$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011359
11360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011361rm -f core conftest.err conftest.$ac_objext \
11362 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363
Matthias Kloseb9621712010-04-24 17:59:49 +000011364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11365$as_echo_n "checking for inet_pton... " >&6; }
11366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011368
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011369#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011370#include <sys/socket.h>
11371#include <netinet/in.h>
11372#include <arpa/inet.h>
11373
Martin v. Löwise9416172003-05-03 10:12:45 +000011374int
11375main ()
11376{
11377void* p = inet_pton
11378 ;
11379 return 0;
11380}
11381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011382if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011383
Matthias Kloseb9621712010-04-24 17:59:49 +000011384$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011385
Matthias Kloseb159a552010-04-25 21:00:44 +000011386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011387$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011388else
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11390$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011391
11392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011394
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011395# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11397$as_echo_n "checking for setgroups... " >&6; }
11398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011399/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011400
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011401#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011402#ifdef HAVE_GRP_H
11403#include <grp.h>
11404#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011405
Martin v. Löwisd5843682002-11-21 20:41:28 +000011406int
11407main ()
11408{
11409void* p = setgroups
11410 ;
11411 return 0;
11412}
11413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011415
Matthias Kloseb9621712010-04-24 17:59:49 +000011416$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011417
Matthias Kloseb159a552010-04-25 21:00:44 +000011418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011419$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011420else
Matthias Kloseb9621712010-04-24 17:59:49 +000011421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11422$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011423
11424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011426
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011427# check for openpty and forkpty
11428
11429for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011430do :
11431 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011432if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011434#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011435_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011436
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011437else
Matthias Kloseb9621712010-04-24 17:59:49 +000011438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11439$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011440if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011441 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011442else
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011444LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448/* Override any GCC internal prototype to avoid an error.
11449 Use char because int might match the return type of a GCC
11450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011451#ifdef __cplusplus
11452extern "C"
11453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011454char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011455int
11456main ()
11457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011458return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011459 ;
11460 return 0;
11461}
11462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011463if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011465else
Matthias Kloseb9621712010-04-24 17:59:49 +000011466 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011468rm -f core conftest.err conftest.$ac_objext \
11469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011470LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11473$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011474if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011475 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011476 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011477else
Matthias Kloseb9621712010-04-24 17:59:49 +000011478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11479$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011480if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011482else
11483 ac_check_lib_save_LIBS=$LIBS
11484LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011486/* end confdefs.h. */
11487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488/* Override any GCC internal prototype to avoid an error.
11489 Use char because int might match the return type of a GCC
11490 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011491#ifdef __cplusplus
11492extern "C"
11493#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011494char openpty ();
11495int
11496main ()
11497{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011499 ;
11500 return 0;
11501}
11502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011503if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011504 ac_cv_lib_bsd_openpty=yes
11505else
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011508rm -f core conftest.err conftest.$ac_objext \
11509 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011510LIBS=$ac_check_lib_save_LIBS
11511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11513$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011514if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011515 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011516 LIBS="$LIBS -lbsd"
11517fi
11518
11519
11520fi
11521
Fred Drake8cef4cf2000-06-28 16:40:38 +000011522
11523fi
11524done
11525
11526for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011527do :
11528 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011529if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011530 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011531#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011532_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011533
Fred Drake8cef4cf2000-06-28 16:40:38 +000011534else
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11536$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011537if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011538 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011539else
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011541LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545/* Override any GCC internal prototype to avoid an error.
11546 Use char because int might match the return type of a GCC
11547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011548#ifdef __cplusplus
11549extern "C"
11550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011551char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011552int
11553main ()
11554{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 ;
11557 return 0;
11558}
11559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011560if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011562else
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011565rm -f core conftest.err conftest.$ac_objext \
11566 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011567LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11570$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011571if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011573 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011574else
Matthias Kloseb9621712010-04-24 17:59:49 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11576$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011577if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011578 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011579else
11580 ac_check_lib_save_LIBS=$LIBS
11581LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011583/* end confdefs.h. */
11584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585/* Override any GCC internal prototype to avoid an error.
11586 Use char because int might match the return type of a GCC
11587 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011588#ifdef __cplusplus
11589extern "C"
11590#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011591char forkpty ();
11592int
11593main ()
11594{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011596 ;
11597 return 0;
11598}
11599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011600if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011601 ac_cv_lib_bsd_forkpty=yes
11602else
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011605rm -f core conftest.err conftest.$ac_objext \
11606 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011607LIBS=$ac_check_lib_save_LIBS
11608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11610$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011611if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011613 LIBS="$LIBS -lbsd"
11614fi
11615
11616
11617fi
11618
Fred Drake8cef4cf2000-06-28 16:40:38 +000011619
11620fi
11621done
11622
Jack Jansendd19cf82001-12-06 22:36:17 +000011623
Christian Heimesb186d002008-03-18 15:15:01 +000011624# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011625for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011626do :
11627 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011628if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011629 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011630#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011631_ACEOF
11632
11633fi
11634done
11635
11636
Michael W. Hudson54241132001-12-07 15:38:26 +000011637# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011638for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011639do :
11640 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11641ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011642if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011643 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011644#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011645_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011646
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011647fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011648done
11649
Michael W. Hudson54241132001-12-07 15:38:26 +000011650
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011651ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011652if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011653 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011654
Martin v. Löwis1142de32002-03-29 16:28:31 +000011655else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011657 *" dup2.$ac_objext "* ) ;;
11658 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011659 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011660esac
11661
Martin v. Löwis1142de32002-03-29 16:28:31 +000011662fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011663
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011664ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011665if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011666 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11667
11668else
11669 case " $LIBOBJS " in
11670 *" strdup.$ac_objext "* ) ;;
11671 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11672 ;;
11673esac
11674
11675fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011676
11677
11678for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011679do :
11680 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011681if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011682 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011683#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011686/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011687#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011688int
11689main ()
11690{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011691getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011692 ;
11693 return 0;
11694}
11695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011696if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011697
Matthias Kloseb9621712010-04-24 17:59:49 +000011698$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011699
Guido van Rossum627b2d71993-12-24 10:39:16 +000011700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011702
Guido van Rossum627b2d71993-12-24 10:39:16 +000011703fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011704done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011705
Jack Jansen150753c2003-03-29 22:07:47 +000011706for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011707do :
11708 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011709if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011710 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011711#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011714/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011715#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011716int
11717main ()
11718{
11719setpgrp(0,0);
11720 ;
11721 return 0;
11722}
11723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011727
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011730
11731fi
11732done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011733
Thomas Wouters3a584202000-08-05 23:28:51 +000011734for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011735do :
11736 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011737if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011739#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011742/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011743#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011744int
11745main ()
11746{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011747gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 ;
11749 return 0;
11750}
11751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011752if ac_fn_c_try_compile "$LINENO"; then :
11753
Guido van Rossum627b2d71993-12-24 10:39:16 +000011754else
Skip Montanaro6dead952003-09-25 14:50:04 +000011755
Matthias Kloseb9621712010-04-24 17:59:49 +000011756$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011757
Martin v. Löwis11437992002-04-12 09:54:03 +000011758
Guido van Rossum627b2d71993-12-24 10:39:16 +000011759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011762fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011763done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011764
Michael W. Hudson54241132001-12-07 15:38:26 +000011765
Victor Stinnere0be4232011-10-25 13:06:09 +020011766for ac_func in clock_gettime
11767do :
11768 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11769if test "x$ac_cv_func_clock_gettime" = xyes; then :
11770 cat >>confdefs.h <<_ACEOF
11771#define HAVE_CLOCK_GETTIME 1
11772_ACEOF
11773
11774else
11775
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11777$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11778if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11779 $as_echo_n "(cached) " >&6
11780else
11781 ac_check_lib_save_LIBS=$LIBS
11782LIBS="-lrt $LIBS"
11783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11784/* end confdefs.h. */
11785
11786/* Override any GCC internal prototype to avoid an error.
11787 Use char because int might match the return type of a GCC
11788 builtin and then its argument prototype would still apply. */
11789#ifdef __cplusplus
11790extern "C"
11791#endif
11792char clock_gettime ();
11793int
11794main ()
11795{
11796return clock_gettime ();
11797 ;
11798 return 0;
11799}
11800_ACEOF
11801if ac_fn_c_try_link "$LINENO"; then :
11802 ac_cv_lib_rt_clock_gettime=yes
11803else
11804 ac_cv_lib_rt_clock_gettime=no
11805fi
11806rm -f core conftest.err conftest.$ac_objext \
11807 conftest$ac_exeext conftest.$ac_ext
11808LIBS=$ac_check_lib_save_LIBS
11809fi
11810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11811$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11812if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11813
11814 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11815
11816
11817$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11818
11819
11820fi
11821
11822
11823fi
11824done
11825
11826
11827for ac_func in clock_getres
11828do :
11829 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11830if test "x$ac_cv_func_clock_getres" = xyes; then :
11831 cat >>confdefs.h <<_ACEOF
11832#define HAVE_CLOCK_GETRES 1
11833_ACEOF
11834
11835else
11836
11837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11838$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11839if ${ac_cv_lib_rt_clock_getres+:} false; then :
11840 $as_echo_n "(cached) " >&6
11841else
11842 ac_check_lib_save_LIBS=$LIBS
11843LIBS="-lrt $LIBS"
11844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11845/* end confdefs.h. */
11846
11847/* Override any GCC internal prototype to avoid an error.
11848 Use char because int might match the return type of a GCC
11849 builtin and then its argument prototype would still apply. */
11850#ifdef __cplusplus
11851extern "C"
11852#endif
11853char clock_getres ();
11854int
11855main ()
11856{
11857return clock_getres ();
11858 ;
11859 return 0;
11860}
11861_ACEOF
11862if ac_fn_c_try_link "$LINENO"; then :
11863 ac_cv_lib_rt_clock_getres=yes
11864else
11865 ac_cv_lib_rt_clock_getres=no
11866fi
11867rm -f core conftest.err conftest.$ac_objext \
11868 conftest$ac_exeext conftest.$ac_ext
11869LIBS=$ac_check_lib_save_LIBS
11870fi
11871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11872$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11873if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11874
11875 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11876
11877
11878fi
11879
11880
11881fi
11882done
11883
11884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11886$as_echo_n "checking for major... " >&6; }
11887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011888/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011889
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011890#if defined(MAJOR_IN_MKDEV)
11891#include <sys/mkdev.h>
11892#elif defined(MAJOR_IN_SYSMACROS)
11893#include <sys/sysmacros.h>
11894#else
11895#include <sys/types.h>
11896#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011897
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011898int
11899main ()
11900{
11901
11902 makedev(major(0),minor(0));
11903
11904 ;
11905 return 0;
11906}
11907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011908if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011909
11910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011912
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11914$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011915
11916else
Skip Montanaro6dead952003-09-25 14:50:04 +000011917
Matthias Kloseb9621712010-04-24 17:59:49 +000011918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11919$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011920
11921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011922rm -f core conftest.err conftest.$ac_objext \
11923 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011924
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011925# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011926# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11928$as_echo_n "checking for getaddrinfo... " >&6; }
11929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011930/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011931
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011932#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011933#include <sys/socket.h>
11934#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011935#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011936
Martin v. Löwis11437992002-04-12 09:54:03 +000011937int
11938main ()
11939{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011940getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011941 ;
11942 return 0;
11943}
11944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011945if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011946 have_getaddrinfo=yes
11947else
Matthias Kloseb9621712010-04-24 17:59:49 +000011948 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011950rm -f core conftest.err conftest.$ac_objext \
11951 conftest$ac_exeext conftest.$ac_ext
11952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11953$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011954if test $have_getaddrinfo = yes
11955then
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11957$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011958 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011960else
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011962
11963if test "${enable_ipv6+set}" = set; then
11964 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11965else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011966 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011967fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011968else
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011970/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011971
Stefan Krah19c21392012-11-22 23:47:32 +010011972#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011973#include <sys/types.h>
11974#include <netdb.h>
11975#include <string.h>
11976#include <sys/socket.h>
11977#include <netinet/in.h>
11978
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011979int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011980{
11981 int passive, gaierr, inet4 = 0, inet6 = 0;
11982 struct addrinfo hints, *ai, *aitop;
11983 char straddr[INET6_ADDRSTRLEN], strport[16];
11984
11985 for (passive = 0; passive <= 1; passive++) {
11986 memset(&hints, 0, sizeof(hints));
11987 hints.ai_family = AF_UNSPEC;
11988 hints.ai_flags = passive ? AI_PASSIVE : 0;
11989 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011990 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011991 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11992 (void)gai_strerror(gaierr);
11993 goto bad;
11994 }
11995 for (ai = aitop; ai; ai = ai->ai_next) {
11996 if (ai->ai_addr == NULL ||
11997 ai->ai_addrlen == 0 ||
11998 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11999 straddr, sizeof(straddr), strport, sizeof(strport),
12000 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12001 goto bad;
12002 }
12003 switch (ai->ai_family) {
12004 case AF_INET:
12005 if (strcmp(strport, "54321") != 0) {
12006 goto bad;
12007 }
12008 if (passive) {
12009 if (strcmp(straddr, "0.0.0.0") != 0) {
12010 goto bad;
12011 }
12012 } else {
12013 if (strcmp(straddr, "127.0.0.1") != 0) {
12014 goto bad;
12015 }
12016 }
12017 inet4++;
12018 break;
12019 case AF_INET6:
12020 if (strcmp(strport, "54321") != 0) {
12021 goto bad;
12022 }
12023 if (passive) {
12024 if (strcmp(straddr, "::") != 0) {
12025 goto bad;
12026 }
12027 } else {
12028 if (strcmp(straddr, "::1") != 0) {
12029 goto bad;
12030 }
12031 }
12032 inet6++;
12033 break;
12034 case AF_UNSPEC:
12035 goto bad;
12036 break;
12037 default:
12038 /* another family support? */
12039 break;
12040 }
12041 }
12042 }
12043
12044 if (!(inet4 == 0 || inet4 == 2))
12045 goto bad;
12046 if (!(inet6 == 0 || inet6 == 2))
12047 goto bad;
12048
12049 if (aitop)
12050 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012051 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012052
12053 bad:
12054 if (aitop)
12055 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012056 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012057}
12058
Martin v. Löwis11437992002-04-12 09:54:03 +000012059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012060if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012061 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12066 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012069fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012070
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012072
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12074$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12075
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012076if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012077then
12078 if test $ipv6 = yes
12079 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012080 echo 'Fatal: You must get working getaddrinfo() function.'
12081 echo ' or you can specify "--disable-ipv6"'.
12082 exit 1
12083 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012084else
Martin v. Löwis11437992002-04-12 09:54:03 +000012085
Matthias Kloseb9621712010-04-24 17:59:49 +000012086$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012087
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012088fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012089
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012090for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012091do :
12092 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012093if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012094 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012095#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012096_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012097
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012098fi
12099done
12100
Michael W. Hudson54241132001-12-07 15:38:26 +000012101
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012102# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12104$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012105if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012107else
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012109/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012110#include <sys/types.h>
12111#include <sys/time.h>
12112#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012113
Martin v. Löwis11437992002-04-12 09:54:03 +000012114int
12115main ()
12116{
12117if ((struct tm *) 0)
12118return 0;
12119 ;
12120 return 0;
12121}
12122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012123if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012124 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012125else
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12131$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012132if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012133
Matthias Kloseb9621712010-04-24 17:59:49 +000012134$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012135
12136fi
12137
Matthias Kloseb9621712010-04-24 17:59:49 +000012138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12139$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012140if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012142else
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012144/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012145#include <sys/types.h>
12146#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012147
Martin v. Löwis11437992002-04-12 09:54:03 +000012148int
12149main ()
12150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012151struct tm tm;
12152 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012154 ;
12155 return 0;
12156}
12157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012158if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012159 ac_cv_struct_tm=time.h
12160else
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12166$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012167if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012168
Matthias Kloseb9621712010-04-24 17:59:49 +000012169$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012170
12171fi
12172
Matthias Kloseb9621712010-04-24 17:59:49 +000012173ac_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 +000012174#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012175
Matthias Kloseb9621712010-04-24 17:59:49 +000012176"
Victor Stinnere0be4232011-10-25 13:06:09 +020012177if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012178
12179cat >>confdefs.h <<_ACEOF
12180#define HAVE_STRUCT_TM_TM_ZONE 1
12181_ACEOF
12182
12183
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012184fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012185
Martin v. Löwis11437992002-04-12 09:54:03 +000012186if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12187
Matthias Kloseb9621712010-04-24 17:59:49 +000012188$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012189
12190else
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12192"
Victor Stinnere0be4232011-10-25 13:06:09 +020012193if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195else
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197fi
12198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012199cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012200#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201_ACEOF
12202
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12204$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012205if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012207else
Matthias Kloseb9621712010-04-24 17:59:49 +000012208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012209/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012210#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012211#if !HAVE_DECL_TZNAME
12212extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012214
Martin v. Löwis11437992002-04-12 09:54:03 +000012215int
12216main ()
12217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 ;
12220 return 0;
12221}
12222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012223if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012224 ac_cv_var_tzname=yes
12225else
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012228rm -f core conftest.err conftest.$ac_objext \
12229 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12232$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012233 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012234
Matthias Kloseb9621712010-04-24 17:59:49 +000012235$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012236
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012237 fi
12238fi
12239
Matthias Kloseb9621712010-04-24 17:59:49 +000012240ac_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 +020012241if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012242
12243cat >>confdefs.h <<_ACEOF
12244#define HAVE_STRUCT_STAT_ST_RDEV 1
12245_ACEOF
12246
12247
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012248fi
12249
Matthias Kloseb9621712010-04-24 17:59:49 +000012250ac_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 +020012251if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012252
Martin v. Löwis11437992002-04-12 09:54:03 +000012253cat >>confdefs.h <<_ACEOF
12254#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12255_ACEOF
12256
12257
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012258fi
12259
Matthias Kloseb9621712010-04-24 17:59:49 +000012260ac_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 +020012261if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012262
12263cat >>confdefs.h <<_ACEOF
12264#define HAVE_STRUCT_STAT_ST_FLAGS 1
12265_ACEOF
12266
12267
12268fi
12269
Matthias Kloseb9621712010-04-24 17:59:49 +000012270ac_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 +020012271if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012272
12273cat >>confdefs.h <<_ACEOF
12274#define HAVE_STRUCT_STAT_ST_GEN 1
12275_ACEOF
12276
12277
12278fi
12279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280ac_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 +020012281if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012282
12283cat >>confdefs.h <<_ACEOF
12284#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12285_ACEOF
12286
12287
12288fi
12289
Matthias Kloseb9621712010-04-24 17:59:49 +000012290ac_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 +020012291if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012292
Martin v. Löwis11437992002-04-12 09:54:03 +000012293cat >>confdefs.h <<_ACEOF
12294#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12295_ACEOF
12296
12297
Matthias Kloseb9621712010-04-24 17:59:49 +000012298$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012299
12300else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012302 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12304 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012305esac
12306
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012307fi
12308
Michael W. Hudson54241132001-12-07 15:38:26 +000012309
Martin v. Löwis11437992002-04-12 09:54:03 +000012310
Matthias Kloseb9621712010-04-24 17:59:49 +000012311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12312$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012313if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012315else
Matthias Kloseb159a552010-04-25 21:00:44 +000012316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012318/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012319#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012320int
12321main ()
12322{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012323return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012324 ;
12325 return 0;
12326}
12327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012328if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012329 ac_cv_header_time_altzone=yes
12330else
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335fi
12336
Matthias Kloseb9621712010-04-24 17:59:49 +000012337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12338$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012339if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012342
12343fi
12344
Guido van Rossumda88dad1995-01-26 00:46:29 +000012345was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12347$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012349/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012350
12351#include <sys/types.h>
12352#include <sys/select.h>
12353#include <sys/time.h>
12354
Martin v. Löwis11437992002-04-12 09:54:03 +000012355int
12356main ()
12357{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012358;
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 ;
12360 return 0;
12361}
12362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
12365
Matthias Kloseb9621712010-04-24 17:59:49 +000012366$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012367
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012368 was_it_defined=yes
12369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12373$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374
Matthias Kloseb9621712010-04-24 17:59:49 +000012375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12376$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012377if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012381/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012382#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012383int
12384main ()
12385{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012386struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012387 ;
12388 return 0;
12389}
12390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012391if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012392 ac_cv_struct_addrinfo=yes
12393else
Matthias Kloseb9621712010-04-24 17:59:49 +000012394 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12397fi
12398
Matthias Kloseb9621712010-04-24 17:59:49 +000012399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12400$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012401if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012402
Matthias Kloseb9621712010-04-24 17:59:49 +000012403$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012404
12405fi
12406
Matthias Kloseb9621712010-04-24 17:59:49 +000012407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12408$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012409if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012411else
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012413/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012414
12415# include <sys/types.h>
12416# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012417int
12418main ()
12419{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012420struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 ;
12422 return 0;
12423}
12424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012426 ac_cv_struct_sockaddr_storage=yes
12427else
Matthias Kloseb9621712010-04-24 17:59:49 +000012428 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12431fi
12432
Matthias Kloseb9621712010-04-24 17:59:49 +000012433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12434$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012435if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012436
Matthias Kloseb9621712010-04-24 17:59:49 +000012437$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012438
12439fi
12440
Guido van Rossum627b2d71993-12-24 10:39:16 +000012441# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012442
Matthias Kloseb9621712010-04-24 17:59:49 +000012443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12444$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012445if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012447else
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012450$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012451int
12452main ()
12453{
12454static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012455test_array [0] = 0;
12456return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012457
12458 ;
12459 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012460}
Martin v. Löwis11437992002-04-12 09:54:03 +000012461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012462if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012463 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012464else
Matthias Kloseb9621712010-04-24 17:59:49 +000012465 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12470$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012471if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012472 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012473
12474fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012475
Matthias Kloseb9621712010-04-24 17:59:49 +000012476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12477$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012478if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012480else
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012482/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012483
Martin v. Löwis11437992002-04-12 09:54:03 +000012484int
12485main ()
12486{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012487
Martin v. Löwis11437992002-04-12 09:54:03 +000012488#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012489 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012490 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012491 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493 char const *const *pcpcc;
12494 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012495 /* NEC SVR4.0.2 mips cc rejects this. */
12496 struct point {int x, y;};
12497 static struct point const zero = {0,0};
12498 /* AIX XL C 1.02.0.0 rejects this.
12499 It does not let you subtract one const X* pointer from another in
12500 an arm of an if-expression whose if-part is not a constant
12501 expression */
12502 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012503 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012504 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012505 ++pcpcc;
12506 ppc = (char**) pcpcc;
12507 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012508 { /* SCO 3.2v4 cc rejects this sort of thing. */
12509 char tx;
12510 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012511 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012512
Martin v. Löwis11437992002-04-12 09:54:03 +000012513 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012514 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 }
12516 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12517 int x[] = {25, 17};
12518 const int *foo = &x[0];
12519 ++foo;
12520 }
12521 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12522 typedef const int *iptr;
12523 iptr p = 0;
12524 ++p;
12525 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012526 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012528 struct s { int j; const int *ap[3]; } bx;
12529 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012530 }
12531 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12532 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012536#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012537
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 ;
12539 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012540}
Martin v. Löwis11437992002-04-12 09:54:03 +000012541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012542if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012543 ac_cv_c_const=yes
12544else
Matthias Kloseb9621712010-04-24 17:59:49 +000012545 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12550$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012551if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012552
Matthias Kloseb9621712010-04-24 17:59:49 +000012553$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012554
12555fi
12556
Michael W. Hudson54241132001-12-07 15:38:26 +000012557
Guido van Rossumda88dad1995-01-26 00:46:29 +000012558works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12560$as_echo_n "checking for working volatile... " >&6; }
12561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012562/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012563
Martin v. Löwis11437992002-04-12 09:54:03 +000012564int
12565main ()
12566{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012567volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 ;
12569 return 0;
12570}
12571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012572if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012573 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012574else
Skip Montanaro6dead952003-09-25 14:50:04 +000012575
Matthias Kloseb9621712010-04-24 17:59:49 +000012576$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012577
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012578
Guido van Rossum627b2d71993-12-24 10:39:16 +000012579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12582$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012583
Guido van Rossumda88dad1995-01-26 00:46:29 +000012584works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12586$as_echo_n "checking for working signed char... " >&6; }
12587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012588/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012589
Martin v. Löwis11437992002-04-12 09:54:03 +000012590int
12591main ()
12592{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012593signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012594 ;
12595 return 0;
12596}
12597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012598if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012599 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012600else
Skip Montanaro6dead952003-09-25 14:50:04 +000012601
Matthias Kloseb9621712010-04-24 17:59:49 +000012602$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012603
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012604
Guido van Rossum7f43da71994-08-01 12:15:30 +000012605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12608$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012609
Guido van Rossumda88dad1995-01-26 00:46:29 +000012610have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12612$as_echo_n "checking for prototypes... " >&6; }
12613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012614/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012615int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012616int
12617main ()
12618{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012619return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012620 ;
12621 return 0;
12622}
12623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012624if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012625
Matthias Kloseb9621712010-04-24 17:59:49 +000012626$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012627
Matthias Kloseb159a552010-04-25 21:00:44 +000012628 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12632$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012633
Guido van Rossumda88dad1995-01-26 00:46:29 +000012634works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12636$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012638/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012639
12640#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012641int foo(int x, ...) {
12642 va_list va;
12643 va_start(va, x);
12644 va_arg(va, int);
12645 va_arg(va, char *);
12646 va_arg(va, double);
12647 return 0;
12648}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012649
Martin v. Löwis11437992002-04-12 09:54:03 +000012650int
12651main ()
12652{
Guido van Rossum90eea071996-08-30 20:58:57 +000012653return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012654 ;
12655 return 0;
12656}
12657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012658if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012659
12660
Matthias Kloseb9621712010-04-24 17:59:49 +000012661$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012662
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012663 works=yes
12664
Guido van Rossum627b2d71993-12-24 10:39:16 +000012665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12668$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012669
Martin v. Löwisd6320502004-08-12 13:45:08 +000012670# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12672$as_echo_n "checking for socketpair... " >&6; }
12673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012674/* end confdefs.h. */
12675
12676#include <sys/types.h>
12677#include <sys/socket.h>
12678
12679int
12680main ()
12681{
12682void *x=socketpair
12683 ;
12684 return 0;
12685}
12686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012687if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012688
Matthias Kloseb9621712010-04-24 17:59:49 +000012689$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012690
Matthias Kloseb159a552010-04-25 21:00:44 +000012691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012692$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012693else
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12695$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012696
12697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012699
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012700# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12702$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012704/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012705#include <sys/types.h>
12706#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012707int
12708main ()
12709{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012710struct sockaddr x;
12711x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 ;
12713 return 0;
12714}
12715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012716if ac_fn_c_try_compile "$LINENO"; then :
12717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12718$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012719
Matthias Kloseb9621712010-04-24 17:59:49 +000012720$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012721
12722else
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12724$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012725
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012728
Guido van Rossumda88dad1995-01-26 00:46:29 +000012729va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12731$as_echo_n "checking whether va_list is an array... " >&6; }
12732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012733/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012734
12735#ifdef HAVE_STDARG_PROTOTYPES
12736#include <stdarg.h>
12737#else
12738#include <varargs.h>
12739#endif
12740
Martin v. Löwis11437992002-04-12 09:54:03 +000012741int
12742main ()
12743{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012744va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012745 ;
12746 return 0;
12747}
12748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012749if ac_fn_c_try_compile "$LINENO"; then :
12750
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751else
Skip Montanaro6dead952003-09-25 14:50:04 +000012752
Martin v. Löwis11437992002-04-12 09:54:03 +000012753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
Guido van Rossumda88dad1995-01-26 00:46:29 +000012756 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012757
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12761$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012763# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012764
12765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012767if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012768
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12772$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012773 OLD_CFLAGS=$CFLAGS
12774 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012776/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012777
12778# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012779
Martin v. Löwis11437992002-04-12 09:54:03 +000012780int
12781main ()
12782{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012783
12784 char *name;
12785 struct hostent *he, *res;
12786 char buffer[2048];
12787 int buflen = 2048;
12788 int h_errnop;
12789
12790 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012791
12792 ;
12793 return 0;
12794}
12795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012796if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012799
Martin v. Löwis11437992002-04-12 09:54:03 +000012800
Matthias Kloseb9621712010-04-24 17:59:49 +000012801$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012802
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12804$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012805
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012806else
Skip Montanaro6dead952003-09-25 14:50:04 +000012807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12809$as_echo "no" >&6; }
12810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12811$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012813/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012814
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012815# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012816
Martin v. Löwis11437992002-04-12 09:54:03 +000012817int
12818main ()
12819{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012820
12821 char *name;
12822 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012823 char buffer[2048];
12824 int buflen = 2048;
12825 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012826
Matthias Kloseb159a552010-04-25 21:00:44 +000012827 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012828
12829 ;
12830 return 0;
12831}
12832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012833if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012834
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012836
Martin v. Löwis11437992002-04-12 09:54:03 +000012837
Matthias Kloseb159a552010-04-25 21:00:44 +000012838$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012839
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12841$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012842
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012843else
Skip Montanaro6dead952003-09-25 14:50:04 +000012844
Matthias Kloseb9621712010-04-24 17:59:49 +000012845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12846$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12848$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12850/* end confdefs.h. */
12851
12852# include <netdb.h>
12853
12854int
12855main ()
12856{
12857
12858 char *name;
12859 struct hostent *he;
12860 struct hostent_data data;
12861
12862 (void) gethostbyname_r(name, he, &data);
12863
12864 ;
12865 return 0;
12866}
12867_ACEOF
12868if ac_fn_c_try_compile "$LINENO"; then :
12869
12870 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12871
12872
12873$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12874
12875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12876$as_echo "yes" >&6; }
12877
12878else
12879
12880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12881$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012882
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012888
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012891 CFLAGS=$OLD_CFLAGS
12892
12893else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012894
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 for ac_func in gethostbyname
12896do :
12897 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012898if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012899 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012900#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012901_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012902
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012903fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012904done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012905
Michael W. Hudson54241132001-12-07 15:38:26 +000012906
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012907fi
12908
Michael W. Hudson54241132001-12-07 15:38:26 +000012909
12910
12911
12912
12913
12914
Guido van Rossum627b2d71993-12-24 10:39:16 +000012915# checks for system services
12916# (none yet)
12917
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012918# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012919ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012920if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012921
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012922else
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12924$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012925if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927else
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012929LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933/* Override any GCC internal prototype to avoid an error.
12934 Use char because int might match the return type of a GCC
12935 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012936#ifdef __cplusplus
12937extern "C"
12938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012939char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012940int
12941main ()
12942{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 ;
12945 return 0;
12946}
12947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012950else
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012953rm -f core conftest.err conftest.$ac_objext \
12954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012955LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12958$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012959if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 cat >>confdefs.h <<_ACEOF
12961#define HAVE_LIBIEEE 1
12962_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012963
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012964 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012965
Guido van Rossum627b2d71993-12-24 10:39:16 +000012966fi
12967
Michael W. Hudson54241132001-12-07 15:38:26 +000012968
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012969fi
12970
Michael W. Hudson54241132001-12-07 15:38:26 +000012971
Guido van Rossum7f253911997-05-09 02:42:48 +000012972# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12974$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012976# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012977if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012979if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012980then
12981
Matthias Kloseb9621712010-04-24 17:59:49 +000012982$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012983
Matthias Kloseb9621712010-04-24 17:59:49 +000012984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12985$as_echo "yes" >&6; }
12986else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12987$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012988fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012989else
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12991$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012992fi
12993
Guido van Rossum7f253911997-05-09 02:42:48 +000012994
Guido van Rossum7f43da71994-08-01 12:15:30 +000012995# check for --with-libm=...
12996
Guido van Rossum563e7081996-09-10 18:20:48 +000012997case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012998Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012999*) LIBM=-lm
13000esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13002$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013004# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013005if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013007if test "$withval" = no
13008then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13010$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013011elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013012then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13014$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013015else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013016fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013017else
Matthias Kloseb9621712010-04-24 17:59:49 +000013018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13019$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020fi
13021
Guido van Rossum7f43da71994-08-01 12:15:30 +000013022
13023# check for --with-libc=...
13024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13026$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013028# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013029if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013030 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013031if test "$withval" = no
13032then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13034$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013035elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013036then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13038$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013039else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013040fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013041else
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13043$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044fi
13045
Guido van Rossum7f43da71994-08-01 12:15:30 +000013046
Stefan Krah1919b7e2012-03-21 18:25:23 +010013047# **************************************
13048# * Check for gcc x64 inline assembler *
13049# **************************************
13050
13051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13052$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13054/* end confdefs.h. */
13055
13056int
13057main ()
13058{
13059
13060 __asm__ __volatile__ ("movq %rcx, %rax");
13061
13062 ;
13063 return 0;
13064}
13065_ACEOF
13066if ac_fn_c_try_compile "$LINENO"; then :
13067 have_gcc_asm_for_x64=yes
13068else
13069 have_gcc_asm_for_x64=no
13070fi
13071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13073$as_echo "$have_gcc_asm_for_x64" >&6; }
13074if test "$have_gcc_asm_for_x64" = yes
13075then
13076
13077$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13078
13079fi
13080
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013081# **************************************************
13082# * Check for various properties of floating point *
13083# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13086$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013087if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013088 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013089else
13090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013092 ac_cv_little_endian_double=no
13093else
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013095/* end confdefs.h. */
13096
13097#include <string.h>
13098int main() {
13099 double x = 9006104071832581.0;
13100 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13101 return 0;
13102 else
13103 return 1;
13104}
13105
13106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013107if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013108 ac_cv_little_endian_double=yes
13109else
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13113 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013114fi
13115
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013116fi
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13119$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013120if test "$ac_cv_little_endian_double" = yes
13121then
13122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013124
13125fi
13126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13128$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013129if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013131else
13132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013134 ac_cv_big_endian_double=no
13135else
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013137/* end confdefs.h. */
13138
13139#include <string.h>
13140int main() {
13141 double x = 9006104071832581.0;
13142 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13143 return 0;
13144 else
13145 return 1;
13146}
13147
13148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013149if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013150 ac_cv_big_endian_double=yes
13151else
Matthias Kloseb9621712010-04-24 17:59:49 +000013152 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13155 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013156fi
13157
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013158fi
13159
Matthias Kloseb9621712010-04-24 17:59:49 +000013160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13161$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013162if test "$ac_cv_big_endian_double" = yes
13163then
13164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013166
13167fi
13168
13169# Some ARM platforms use a mixed-endian representation for doubles.
13170# While Python doesn't currently have full support for these platforms
13171# (see e.g., issue 1762561), we can at least make sure that float <-> string
13172# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13174$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013175if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013177else
13178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013180 ac_cv_mixed_endian_double=no
13181else
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013183/* end confdefs.h. */
13184
13185#include <string.h>
13186int main() {
13187 double x = 9006104071832581.0;
13188 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13189 return 0;
13190 else
13191 return 1;
13192}
13193
13194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013195if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013196 ac_cv_mixed_endian_double=yes
13197else
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13201 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013202fi
13203
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013204fi
13205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13207$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013208if test "$ac_cv_mixed_endian_double" = yes
13209then
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013212
13213fi
13214
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013215# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013216# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013217# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013218# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013219# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013220# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013221
13222# This inline assembler syntax may also work for suncc and icc,
13223# so we try it on all platforms.
13224
Matthias Kloseb9621712010-04-24 17:59:49 +000013225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13226$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013228/* end confdefs.h. */
13229
13230int
13231main ()
13232{
13233
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013234 unsigned short cw;
13235 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13236 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013237
13238 ;
13239 return 0;
13240}
13241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013242if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013243 have_gcc_asm_for_x87=yes
13244else
Matthias Kloseb9621712010-04-24 17:59:49 +000013245 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013246fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13249$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013250if test "$have_gcc_asm_for_x87" = yes
13251then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013254
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013255fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013256
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13258$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13260/* end confdefs.h. */
13261
13262int
13263main ()
13264{
13265
13266 unsigned int fpcr;
13267 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13268 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13269
13270 ;
13271 return 0;
13272}
13273_ACEOF
13274if ac_fn_c_try_compile "$LINENO"; then :
13275 have_gcc_asm_for_mc68881=yes
13276else
13277 have_gcc_asm_for_mc68881=no
13278fi
13279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13281$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13282if test "$have_gcc_asm_for_mc68881" = yes
13283then
13284
13285$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13286
13287fi
13288
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013289# Detect whether system arithmetic is subject to x87-style double
13290# rounding issues. The result of this test has little meaning on non
13291# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13292# mode is round-to-nearest and double rounding issues are present, and
13293# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13295$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013296# $BASECFLAGS may affect the result
13297ac_save_cc="$CC"
13298CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013299if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013300 ac_cv_x87_double_rounding=no
13301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013303/* end confdefs.h. */
13304
13305#include <stdlib.h>
13306#include <math.h>
13307int main() {
13308 volatile double x, y, z;
13309 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13310 x = 0.99999999999999989; /* 1-2**-53 */
13311 y = 1./x;
13312 if (y != 1.)
13313 exit(0);
13314 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13315 x = 1e16;
13316 y = 2.99999;
13317 z = x + y;
13318 if (z != 1e16+4.)
13319 exit(0);
13320 /* both tests show evidence of double rounding */
13321 exit(1);
13322}
13323
13324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013325if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013326 ac_cv_x87_double_rounding=no
13327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13331 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013332fi
13333
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013334CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13336$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013337if test "$ac_cv_x87_double_rounding" = yes
13338then
13339
Matthias Kloseb9621712010-04-24 17:59:49 +000013340$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013341
13342fi
13343
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013344# ************************************
13345# * Check for mathematical functions *
13346# ************************************
13347
13348LIBS_SAVE=$LIBS
13349LIBS="$LIBS $LIBM"
13350
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013351for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13352do :
13353 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13354ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013355if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013356 cat >>confdefs.h <<_ACEOF
13357#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13358_ACEOF
13359
13360fi
13361done
13362
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013363for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013364do :
13365 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13366ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013367if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013368 cat >>confdefs.h <<_ACEOF
13369#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13370_ACEOF
13371
13372fi
13373done
13374
13375ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13376"
Victor Stinnere0be4232011-10-25 13:06:09 +020013377if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013378 ac_have_decl=1
13379else
13380 ac_have_decl=0
13381fi
13382
13383cat >>confdefs.h <<_ACEOF
13384#define HAVE_DECL_ISINF $ac_have_decl
13385_ACEOF
13386ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13387"
Victor Stinnere0be4232011-10-25 13:06:09 +020013388if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013389 ac_have_decl=1
13390else
13391 ac_have_decl=0
13392fi
13393
13394cat >>confdefs.h <<_ACEOF
13395#define HAVE_DECL_ISNAN $ac_have_decl
13396_ACEOF
13397ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13398"
Victor Stinnere0be4232011-10-25 13:06:09 +020013399if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013400 ac_have_decl=1
13401else
13402 ac_have_decl=0
13403fi
13404
13405cat >>confdefs.h <<_ACEOF
13406#define HAVE_DECL_ISFINITE $ac_have_decl
13407_ACEOF
13408
13409
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013410# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13411# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13413$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013414if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013416else
13417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013419 ac_cv_tanh_preserves_zero_sign=no
13420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013422/* end confdefs.h. */
13423
13424#include <math.h>
13425#include <stdlib.h>
13426int main() {
13427 /* return 0 if either negative zeros don't exist
13428 on this platform or if negative zeros exist
13429 and tanh(-0.) == -0. */
13430 if (atan2(0., -1.) == atan2(-0., -1.) ||
13431 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13432 else exit(1);
13433}
13434
13435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013436if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013437 ac_cv_tanh_preserves_zero_sign=yes
13438else
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013440fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13442 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013443fi
13444
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013445fi
13446
Matthias Kloseb9621712010-04-24 17:59:49 +000013447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13448$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013449if test "$ac_cv_tanh_preserves_zero_sign" = yes
13450then
13451
Matthias Kloseb9621712010-04-24 17:59:49 +000013452$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013453
13454fi
13455
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013456if test "$ac_cv_func_log1p" = yes
13457then
13458 # On some versions of AIX, log1p(-0.) returns 0. instead of
13459 # -0. See issue #9920.
13460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13461$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013462 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013463 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013464else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013465
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013466 if test "$cross_compiling" = yes; then :
13467 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013468else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13470/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013471
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013472 #include <math.h>
13473 #include <stdlib.h>
13474 int main() {
13475 /* Fail if the signs of log1p(-0.) and -0. can be
13476 distinguished. */
13477 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13478 return 0;
13479 else
13480 return 1;
13481 }
13482
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013483_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013484if ac_fn_c_try_run "$LINENO"; then :
13485 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013486else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013487 ac_cv_log1p_drops_zero_sign=yes
13488fi
13489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013491fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013492
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013493fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013494
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13496$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13497fi
13498if test "$ac_cv_log1p_drops_zero_sign" = yes
13499then
13500
13501$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13502
13503fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013504
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013505LIBS=$LIBS_SAVE
13506
Mark Dickinsona614f042009-11-28 12:48:43 +000013507# For multiprocessing module, check that sem_open
13508# actually works. For FreeBSD versions <= 7.2,
13509# the kernel module that provides POSIX semaphores
13510# isn't loaded by default, so an attempt to call
13511# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13513$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013514if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013516else
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013518 ac_cv_posix_semaphores_enabled=yes
13519else
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013521/* end confdefs.h. */
13522
13523#include <unistd.h>
13524#include <fcntl.h>
13525#include <stdio.h>
13526#include <semaphore.h>
13527#include <sys/stat.h>
13528
13529int main(void) {
13530 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13531 if (a == SEM_FAILED) {
13532 perror("sem_open");
13533 return 1;
13534 }
13535 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013536 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013537 return 0;
13538}
13539
13540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013541if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013542 ac_cv_posix_semaphores_enabled=yes
13543else
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13547 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013548fi
13549
13550
Mark Dickinsona614f042009-11-28 12:48:43 +000013551fi
13552
Matthias Kloseb9621712010-04-24 17:59:49 +000013553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13554$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013555if test $ac_cv_posix_semaphores_enabled = no
13556then
13557
Matthias Kloseb9621712010-04-24 17:59:49 +000013558$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013559
13560fi
13561
Mark Dickinson10683072009-04-18 21:18:19 +000013562# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13564$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013565if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013567else
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013569 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013570else
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013572/* end confdefs.h. */
13573
13574#include <unistd.h>
13575#include <fcntl.h>
13576#include <stdio.h>
13577#include <semaphore.h>
13578#include <sys/stat.h>
13579
13580int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013581 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013582 int count;
13583 int res;
13584 if(a==SEM_FAILED){
13585 perror("sem_open");
13586 return 1;
13587
13588 }
13589 res = sem_getvalue(a, &count);
13590 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013591 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013592 return res==-1 ? 1 : 0;
13593}
13594
Mark Dickinson10683072009-04-18 21:18:19 +000013595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013597 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013598else
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13602 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013603fi
13604
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013605
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013606fi
13607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13609$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013610if test $ac_cv_broken_sem_getvalue = yes
13611then
13612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013614
13615fi
13616
Mark Dickinsonbd792642009-03-18 20:06:12 +000013617# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13619$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013620# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013621if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013622 enableval=$enable_big_digits; case $enable_big_digits in
13623yes)
13624 enable_big_digits=30 ;;
13625no)
13626 enable_big_digits=15 ;;
1362715|30)
13628 ;;
13629*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013630 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 +000013631esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13633$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013634
13635cat >>confdefs.h <<_ACEOF
13636#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13637_ACEOF
13638
13639
13640else
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13642$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013643fi
13644
13645
Guido van Rossumef2255b2000-03-10 22:30:29 +000013646# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013647ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013648if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
13650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013653 wchar_h="yes"
13654
Guido van Rossumef2255b2000-03-10 22:30:29 +000013655else
Martin v. Löwis11437992002-04-12 09:54:03 +000013656 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013657
13658fi
13659
Michael W. Hudson54241132001-12-07 15:38:26 +000013660
Martin v. Löwis11437992002-04-12 09:54:03 +000013661
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013662# determine wchar_t size
13663if test "$wchar_h" = yes
13664then
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013666# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13667# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13668# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13670$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013671if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013673else
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13675"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013676
Martin v. Löwis11437992002-04-12 09:54:03 +000013677else
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 if test "$ac_cv_type_wchar_t" = yes; then
13679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013681as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013682See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013683 else
13684 ac_cv_sizeof_wchar_t=0
13685 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013687
Martin v. Löwis11437992002-04-12 09:54:03 +000013688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13690$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013691
13692
13693
Martin v. Löwis11437992002-04-12 09:54:03 +000013694cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013695#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013696_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013697
Michael W. Hudson54241132001-12-07 15:38:26 +000013698
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013699fi
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13702$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013703have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013705/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013706
13707#include <tcl.h>
13708#if TCL_UTF_MAX != 6
13709# error "NOT UCS4_TCL"
13710#endif
13711int
13712main ()
13713{
13714
13715 ;
13716 return 0;
13717}
13718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013719if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013720
13721
Matthias Kloseb9621712010-04-24 17:59:49 +000013722$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013723
13724 have_ucs4_tcl=yes
13725
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13729$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013730
Skip Montanaro6dead952003-09-25 14:50:04 +000013731# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013732if test "$wchar_h" = yes
13733then
13734 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13736$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013737 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013739else
13740
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013742 ac_cv_wchar_t_signed=yes
13743else
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013745/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013746
13747 #include <wchar.h>
13748 int main()
13749 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013750 /* Success: exit code 0 */
13751 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013752 }
13753
13754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013755if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013756 ac_cv_wchar_t_signed=yes
13757else
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013762fi
13763
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013764fi
13765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13767$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768fi
13769
Georg Brandl52d168a2008-01-07 18:10:24 +000013770# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013771if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013772 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013773then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013774 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013777
Georg Brandl52d168a2008-01-07 18:10:24 +000013778else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013779 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013780fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13782$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013783
13784# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13786$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013787if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013789else
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 ac_cv_c_bigendian=unknown
13791 # See if we're dealing with a universal compiler.
13792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13793/* end confdefs.h. */
13794#ifndef __APPLE_CC__
13795 not a universal capable compiler
13796 #endif
13797 typedef int dummy;
13798
Skip Montanaro6dead952003-09-25 14:50:04 +000013799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013800if ac_fn_c_try_compile "$LINENO"; then :
13801
13802 # Check for potential -arch flags. It is not universal unless
13803 # there are at least two -arch flags with different values.
13804 ac_arch=
13805 ac_prev=
13806 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13807 if test -n "$ac_prev"; then
13808 case $ac_word in
13809 i?86 | x86_64 | ppc | ppc64)
13810 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13811 ac_arch=$ac_word
13812 else
13813 ac_cv_c_bigendian=universal
13814 break
13815 fi
13816 ;;
13817 esac
13818 ac_prev=
13819 elif test "x$ac_word" = "x-arch"; then
13820 ac_prev=arch
13821 fi
13822 done
13823fi
13824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13825 if test $ac_cv_c_bigendian = unknown; then
13826 # See if sys/param.h defines the BYTE_ORDER macro.
13827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013828/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013829#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013831
Martin v. Löwis11437992002-04-12 09:54:03 +000013832int
13833main ()
13834{
Matthias Kloseb9621712010-04-24 17:59:49 +000013835#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13836 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13837 && LITTLE_ENDIAN)
13838 bogus endian macros
13839 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013840
13841 ;
13842 return 0;
13843}
13844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013845if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013846 # It does; now see whether it defined to BIG_ENDIAN or not.
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. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013849#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013851
Martin v. Löwis11437992002-04-12 09:54:03 +000013852int
13853main ()
13854{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013855#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 not big endian
13857 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013858
13859 ;
13860 return 0;
13861}
13862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013863if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013864 ac_cv_c_bigendian=yes
13865else
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013869fi
13870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13871 fi
13872 if test $ac_cv_c_bigendian = unknown; then
13873 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013875/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013876#include <limits.h>
13877
Martin v. Löwis11437992002-04-12 09:54:03 +000013878int
13879main ()
13880{
Matthias Kloseb9621712010-04-24 17:59:49 +000013881#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13882 bogus endian macros
13883 #endif
13884
Martin v. Löwis11437992002-04-12 09:54:03 +000013885 ;
13886 return 0;
13887}
13888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013889if ac_fn_c_try_compile "$LINENO"; then :
13890 # It does; now see whether it defined to _BIG_ENDIAN or not.
13891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13892/* end confdefs.h. */
13893#include <limits.h>
13894
13895int
13896main ()
13897{
13898#ifndef _BIG_ENDIAN
13899 not big endian
13900 #endif
13901
13902 ;
13903 return 0;
13904}
13905_ACEOF
13906if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013908else
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13912fi
13913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13914 fi
13915 if test $ac_cv_c_bigendian = unknown; then
13916 # Compile a test program.
13917 if test "$cross_compiling" = yes; then :
13918 # Try to guess by grepping values from an object file.
13919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13920/* end confdefs.h. */
13921short int ascii_mm[] =
13922 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13923 short int ascii_ii[] =
13924 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13925 int use_ascii (int i) {
13926 return ascii_mm[i] + ascii_ii[i];
13927 }
13928 short int ebcdic_ii[] =
13929 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13930 short int ebcdic_mm[] =
13931 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13932 int use_ebcdic (int i) {
13933 return ebcdic_mm[i] + ebcdic_ii[i];
13934 }
13935 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937int
13938main ()
13939{
13940return use_ascii (foo) == use_ebcdic (foo);
13941 ;
13942 return 0;
13943}
13944_ACEOF
13945if ac_fn_c_try_compile "$LINENO"; then :
13946 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13947 ac_cv_c_bigendian=yes
13948 fi
13949 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13950 if test "$ac_cv_c_bigendian" = unknown; then
13951 ac_cv_c_bigendian=no
13952 else
13953 # finding both strings is unlikely to happen, but who knows?
13954 ac_cv_c_bigendian=unknown
13955 fi
13956 fi
13957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013959else
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013961/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013963int
13964main ()
13965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 /* Are we little or big endian? From Harbison&Steele. */
13968 union
13969 {
13970 long int l;
13971 char c[sizeof (long int)];
13972 } u;
13973 u.l = 1;
13974 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975
13976 ;
13977 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013978}
Martin v. Löwis11437992002-04-12 09:54:03 +000013979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013980if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013981 ac_cv_c_bigendian=no
13982else
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013988
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13992$as_echo "$ac_cv_c_bigendian" >&6; }
13993 case $ac_cv_c_bigendian in #(
13994 yes)
13995 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13996;; #(
13997 no)
13998 ;; #(
13999 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014000
Matthias Kloseb9621712010-04-24 17:59:49 +000014001$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014002
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 ;; #(
14004 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014005 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014006 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014007 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014008
Michael W. Hudson54241132001-12-07 15:38:26 +000014009
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014010# ABI version string for Python extension modules. This appears between the
14011# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14012# from the following attributes which affect the ABI of this Python build (in
14013# this order):
14014#
14015# * The Python implementation (always 'cpython-' for us)
14016# * The major and minor version numbers
14017# * --with-pydebug (adds a 'd')
14018# * --with-pymalloc (adds a 'm')
14019# * --with-wide-unicode (adds a 'u')
14020#
14021# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014022# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14023# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014024
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14026$as_echo_n "checking ABIFLAGS... " >&6; }
14027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14028$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14030$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014031SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14033$as_echo "$SOABI" >&6; }
14034
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014035
14036case $ac_sys_system in
14037 Linux*|GNU*)
14038 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14039 *)
14040 EXT_SUFFIX=${SHLIB_SUFFIX};;
14041esac
14042
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14044$as_echo_n "checking LDVERSION... " >&6; }
14045LDVERSION='$(VERSION)$(ABIFLAGS)'
14046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14047$as_echo "$LDVERSION" >&6; }
14048
doko@python.org87421192013-01-26 11:39:31 +010014049
14050LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14051
14052
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014053# Check whether right shifting a negative integer extends the sign bit
14054# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14056$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014057if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014058 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014059else
Martin v. Löwis11437992002-04-12 09:54:03 +000014060
Matthias Kloseb9621712010-04-24 17:59:49 +000014061if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014062 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014063else
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014065/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014066
14067int main()
14068{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014069 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014070}
14071
Martin v. Löwis11437992002-04-12 09:54:03 +000014072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014073if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014074 ac_cv_rshift_extends_sign=yes
14075else
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014080fi
14081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082fi
14083
Matthias Kloseb9621712010-04-24 17:59:49 +000014084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14085$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014086if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014087then
Martin v. Löwis11437992002-04-12 09:54:03 +000014088
Matthias Kloseb9621712010-04-24 17:59:49 +000014089$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014090
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014091fi
14092
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014093# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14095$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014096if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014098else
Martin v. Löwis11437992002-04-12 09:54:03 +000014099
Matthias Kloseb9621712010-04-24 17:59:49 +000014100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014101/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014102#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014103int
14104main ()
14105{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014106
14107 FILE *f = fopen("/dev/null", "r");
14108 flockfile(f);
14109 getc_unlocked(f);
14110 funlockfile(f);
14111
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 ;
14113 return 0;
14114}
14115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014116if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014117 ac_cv_have_getc_unlocked=yes
14118else
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 ac_cv_have_getc_unlocked=no
14120fi
14121rm -f core conftest.err conftest.$ac_objext \
14122 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124
Matthias Kloseb9621712010-04-24 17:59:49 +000014125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14126$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014127if test "$ac_cv_have_getc_unlocked" = yes
14128then
Martin v. Löwis11437992002-04-12 09:54:03 +000014129
Matthias Kloseb9621712010-04-24 17:59:49 +000014130$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014131
14132fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014133
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014134# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014135# save the value of LIBS so we don't actually link Python with readline
14136LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014137
Gregory P. Smith18820942008-09-07 06:24:49 +000014138# On some systems we need to link readline to a termcap compatible
14139# library. NOTE: Keep the precedence of listed libraries synchronised
14140# with setup.py.
14141py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14143$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014144for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014145 if test -z "$py_libtermcap"; then
14146 READLINE_LIBS="-lreadline"
14147 else
14148 READLINE_LIBS="-lreadline -l$py_libtermcap"
14149 fi
14150 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014152/* end confdefs.h. */
14153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014154/* Override any GCC internal prototype to avoid an error.
14155 Use char because int might match the return type of a GCC
14156 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014157#ifdef __cplusplus
14158extern "C"
14159#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014160char readline ();
14161int
14162main ()
14163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014164return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014165 ;
14166 return 0;
14167}
14168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014169if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014170 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014172rm -f core conftest.err conftest.$ac_objext \
14173 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014174 if test $py_cv_lib_readline = yes; then
14175 break
14176 fi
14177done
14178# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14179#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014180if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14182$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014183else
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14185$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014186
Matthias Kloseb9621712010-04-24 17:59:49 +000014187$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014188
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014189fi
14190
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014191# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14193$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014194if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014196else
14197 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014198LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014200/* end confdefs.h. */
14201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202/* Override any GCC internal prototype to avoid an error.
14203 Use char because int might match the return type of a GCC
14204 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014205#ifdef __cplusplus
14206extern "C"
14207#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014208char rl_callback_handler_install ();
14209int
14210main ()
14211{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014213 ;
14214 return 0;
14215}
14216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014217if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014218 ac_cv_lib_readline_rl_callback_handler_install=yes
14219else
Matthias Kloseb9621712010-04-24 17:59:49 +000014220 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014222rm -f core conftest.err conftest.$ac_objext \
14223 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014224LIBS=$ac_check_lib_save_LIBS
14225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14227$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014228if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014229
Matthias Kloseb9621712010-04-24 17:59:49 +000014230$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014231
14232fi
14233
14234
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014235# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014237/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014238#include <readline/readline.h>
14239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014240if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014241 have_readline=yes
14242else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014243 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014244
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014245fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014246rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014247if test $have_readline = yes
14248then
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014250/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014251#include <readline/readline.h>
14252
14253_ACEOF
14254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014258
14259fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014260rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014261
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014263/* end confdefs.h. */
14264#include <readline/readline.h>
14265
14266_ACEOF
14267if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014269
Matthias Kloseb9621712010-04-24 17:59:49 +000014270$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014271
14272fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014273rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014274
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014275fi
14276
Martin v. Löwis0daad592001-09-30 21:09:59 +000014277# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14279$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014280if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014282else
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014284LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014286/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288/* Override any GCC internal prototype to avoid an error.
14289 Use char because int might match the return type of a GCC
14290 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014291#ifdef __cplusplus
14292extern "C"
14293#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014294char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014295int
14296main ()
14297{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014298return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014299 ;
14300 return 0;
14301}
14302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014303if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014304 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014305else
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014308rm -f core conftest.err conftest.$ac_objext \
14309 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014310LIBS=$ac_check_lib_save_LIBS
14311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14313$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014314if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014315
Matthias Kloseb9621712010-04-24 17:59:49 +000014316$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014317
Martin v. Löwis0daad592001-09-30 21:09:59 +000014318fi
14319
Michael W. Hudson54241132001-12-07 15:38:26 +000014320
Thomas Wouters89d996e2007-09-08 17:39:28 +000014321# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14323$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014324if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014326else
14327 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014328LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014330/* end confdefs.h. */
14331
14332/* Override any GCC internal prototype to avoid an error.
14333 Use char because int might match the return type of a GCC
14334 builtin and then its argument prototype would still apply. */
14335#ifdef __cplusplus
14336extern "C"
14337#endif
14338char rl_completion_display_matches_hook ();
14339int
14340main ()
14341{
14342return rl_completion_display_matches_hook ();
14343 ;
14344 return 0;
14345}
14346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014347if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014348 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14349else
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014352rm -f core conftest.err conftest.$ac_objext \
14353 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014354LIBS=$ac_check_lib_save_LIBS
14355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14357$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014358if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014359
Matthias Kloseb9621712010-04-24 17:59:49 +000014360$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014361
14362fi
14363
14364
Martin v. Löwis0daad592001-09-30 21:09:59 +000014365# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14367$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014368if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014370else
Martin v. Löwis11437992002-04-12 09:54:03 +000014371 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014372LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014376/* Override any GCC internal prototype to avoid an error.
14377 Use char because int might match the return type of a GCC
14378 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014379#ifdef __cplusplus
14380extern "C"
14381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014382char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014383int
14384main ()
14385{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014387 ;
14388 return 0;
14389}
14390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014391if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014393else
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014396rm -f core conftest.err conftest.$ac_objext \
14397 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014398LIBS=$ac_check_lib_save_LIBS
14399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14401$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014402if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014403
Matthias Kloseb9621712010-04-24 17:59:49 +000014404$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014405
Guido van Rossum353ae582001-07-10 16:45:32 +000014406fi
14407
Jack Jansendd19cf82001-12-06 22:36:17 +000014408
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014409# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014411/* end confdefs.h. */
14412#include <readline/readline.h>
14413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014414if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014415 have_readline=yes
14416else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014417 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014418
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014419fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014420rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014421if test $have_readline = yes
14422then
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014424/* end confdefs.h. */
14425#include <readline/readline.h>
14426
14427_ACEOF
14428if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014430
Matthias Kloseb9621712010-04-24 17:59:49 +000014431$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014432
14433fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014434rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014435
14436fi
14437
Martin v. Löwis82bca632006-02-10 20:49:30 +000014438# End of readline checks: restore LIBS
14439LIBS=$LIBS_no_readline
14440
Matthias Kloseb9621712010-04-24 17:59:49 +000014441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14442$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014443if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014445else
Martin v. Löwis11437992002-04-12 09:54:03 +000014446
Matthias Kloseb9621712010-04-24 17:59:49 +000014447if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014448 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014449else
Matthias Kloseb9621712010-04-24 17:59:49 +000014450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014451/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014452
14453int main()
14454{
14455 int val1 = nice(1);
14456 if (val1 != -1 && val1 == nice(2))
14457 exit(0);
14458 exit(1);
14459}
14460
Martin v. Löwis11437992002-04-12 09:54:03 +000014461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014462if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014463 ac_cv_broken_nice=yes
14464else
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14468 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014469fi
14470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471fi
14472
Matthias Kloseb9621712010-04-24 17:59:49 +000014473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14474$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014475if test "$ac_cv_broken_nice" = yes
14476then
Martin v. Löwis11437992002-04-12 09:54:03 +000014477
Matthias Kloseb9621712010-04-24 17:59:49 +000014478$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014479
14480fi
14481
Matthias Kloseb9621712010-04-24 17:59:49 +000014482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14483$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014484if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014486else
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014488 ac_cv_broken_poll=no
14489else
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014491/* end confdefs.h. */
14492
14493#include <poll.h>
14494
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014495int main()
14496{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014497 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014498 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014499
14500 close (42);
14501
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014502 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014503 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014504 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014505 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014506 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014507 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014508 return 1;
14509}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014510
14511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014512if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014513 ac_cv_broken_poll=yes
14514else
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14518 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014521fi
14522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14524$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014525if test "$ac_cv_broken_poll" = yes
14526then
14527
Matthias Kloseb9621712010-04-24 17:59:49 +000014528$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014529
14530fi
14531
Brett Cannon43802422005-02-10 20:48:03 +000014532# 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 +000014533# (which is not required by ISO C or UNIX spec) and/or if we support
14534# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014535ac_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 +000014536#include <$ac_cv_struct_tm>
14537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538"
Victor Stinnere0be4232011-10-25 13:06:09 +020014539if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014540
14541cat >>confdefs.h <<_ACEOF
14542#define HAVE_STRUCT_TM_TM_ZONE 1
14543_ACEOF
14544
14545
14546fi
14547
14548if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14549
Matthias Kloseb9621712010-04-24 17:59:49 +000014550$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014551
14552else
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14554"
Victor Stinnere0be4232011-10-25 13:06:09 +020014555if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557else
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559fi
14560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014561cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014562#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014563_ACEOF
14564
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14566$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014567if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014569else
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014571/* end confdefs.h. */
14572#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573#if !HAVE_DECL_TZNAME
14574extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014575#endif
14576
14577int
14578main ()
14579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014581 ;
14582 return 0;
14583}
14584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014585if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014586 ac_cv_var_tzname=yes
14587else
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014590rm -f core conftest.err conftest.$ac_objext \
14591 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14594$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014595 if test $ac_cv_var_tzname = yes; then
14596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014598
14599 fi
14600fi
14601
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014602
Martin v. Löwis1d459062005-03-14 21:23:33 +000014603# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14605$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014606if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014608else
14609
Matthias Kloseb9621712010-04-24 17:59:49 +000014610if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014611 ac_cv_working_tzset=no
14612else
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014614/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014615
14616#include <stdlib.h>
14617#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014618#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014619
14620#if HAVE_TZNAME
14621extern char *tzname[];
14622#endif
14623
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014624int main()
14625{
Brett Cannon18367812003-09-19 00:59:16 +000014626 /* Note that we need to ensure that not only does tzset(3)
14627 do 'something' with localtime, but it works as documented
14628 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014629 This includes making sure that tzname is set properly if
14630 tm->tm_zone does not exist since it is the alternative way
14631 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014632
14633 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014634 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014635 */
14636
Martin v. Löwis1d459062005-03-14 21:23:33 +000014637 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014638 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14639
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014640 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014641 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014642 if (localtime(&groundhogday)->tm_hour != 0)
14643 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014644#if HAVE_TZNAME
14645 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14646 if (strcmp(tzname[0], "UTC") ||
14647 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14648 exit(1);
14649#endif
Brett Cannon18367812003-09-19 00:59:16 +000014650
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014651 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014652 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014653 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014654 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014655#if HAVE_TZNAME
14656 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14657 exit(1);
14658#endif
Brett Cannon18367812003-09-19 00:59:16 +000014659
14660 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14661 tzset();
14662 if (localtime(&groundhogday)->tm_hour != 11)
14663 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014664#if HAVE_TZNAME
14665 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14666 exit(1);
14667#endif
14668
14669#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014670 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14671 exit(1);
14672 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14673 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014674#endif
Brett Cannon18367812003-09-19 00:59:16 +000014675
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014676 exit(0);
14677}
14678
14679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014680if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014681 ac_cv_working_tzset=yes
14682else
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14686 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014687fi
14688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014689fi
14690
Matthias Kloseb9621712010-04-24 17:59:49 +000014691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14692$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014693if test "$ac_cv_working_tzset" = yes
14694then
14695
Matthias Kloseb9621712010-04-24 17:59:49 +000014696$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014697
14698fi
14699
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014700# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14702$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014703if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014704 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +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. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014708#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014709int
14710main ()
14711{
14712
14713struct stat st;
14714st.st_mtim.tv_nsec = 1;
14715
14716 ;
14717 return 0;
14718}
14719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014720if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014721 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014722else
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +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_stat_tv_nsec" >&5
14729$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014730if test "$ac_cv_stat_tv_nsec" = yes
14731then
14732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014734
14735fi
14736
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014737# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14739$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014740if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014741 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014742else
Matthias Kloseb9621712010-04-24 17:59:49 +000014743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014744/* end confdefs.h. */
14745#include <sys/stat.h>
14746int
14747main ()
14748{
14749
14750struct stat st;
14751st.st_mtimespec.tv_nsec = 1;
14752
14753 ;
14754 return 0;
14755}
14756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014757if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014758 ac_cv_stat_tv_nsec2=yes
14759else
Matthias Kloseb9621712010-04-24 17:59:49 +000014760 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14763fi
14764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14766$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014767if test "$ac_cv_stat_tv_nsec2" = yes
14768then
14769
Matthias Kloseb9621712010-04-24 17:59:49 +000014770$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014771
14772fi
14773
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014774# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014775ac_save_cppflags="$CPPFLAGS"
14776CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014777
14778for ac_header in curses.h ncurses.h
14779do :
14780 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14781ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14782if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14783 cat >>confdefs.h <<_ACEOF
14784#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14785_ACEOF
14786
14787fi
14788
14789done
14790
14791
14792# On Solaris, term.h requires curses.h
14793for ac_header in term.h
14794do :
14795 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14796#ifdef HAVE_CURSES_H
14797#include <curses.h>
14798#endif
14799
14800"
14801if test "x$ac_cv_header_term_h" = xyes; then :
14802 cat >>confdefs.h <<_ACEOF
14803#define HAVE_TERM_H 1
14804_ACEOF
14805
14806fi
14807
14808done
14809
14810
Jack Jansen666b1e72001-10-31 12:11:48 +000014811# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14813$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014814if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014816else
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014818/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014819#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014820int
14821main ()
14822{
Jack Jansen666b1e72001-10-31 12:11:48 +000014823
14824 int rtn;
14825 rtn = mvwdelch(0,0,0);
14826
Martin v. Löwis11437992002-04-12 09:54:03 +000014827 ;
14828 return 0;
14829}
14830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014831if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014832 ac_cv_mvwdelch_is_expression=yes
14833else
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14837fi
14838
Matthias Kloseb9621712010-04-24 17:59:49 +000014839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14840$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014841
14842if test "$ac_cv_mvwdelch_is_expression" = yes
14843then
Martin v. Löwis11437992002-04-12 09:54:03 +000014844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014846
14847fi
14848
Matthias Kloseb9621712010-04-24 17:59:49 +000014849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14850$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014851if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014853else
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014855/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014856#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014857int
14858main ()
14859{
Jack Jansen666b1e72001-10-31 12:11:48 +000014860
14861 WINDOW *w;
14862 w->_flags = 0;
14863
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 ;
14865 return 0;
14866}
14867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014868if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014869 ac_cv_window_has_flags=yes
14870else
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14874fi
14875
Matthias Kloseb9621712010-04-24 17:59:49 +000014876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14877$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014878
Jack Jansen666b1e72001-10-31 12:11:48 +000014879
14880if test "$ac_cv_window_has_flags" = yes
14881then
Martin v. Löwis11437992002-04-12 09:54:03 +000014882
Matthias Kloseb9621712010-04-24 17:59:49 +000014883$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014884
14885fi
14886
Matthias Kloseb9621712010-04-24 17:59:49 +000014887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14888$as_echo_n "checking for is_term_resized... " >&6; }
14889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014890/* end confdefs.h. */
14891#include <curses.h>
14892int
14893main ()
14894{
14895void *x=is_term_resized
14896 ;
14897 return 0;
14898}
14899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014900if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014901
Matthias Kloseb9621712010-04-24 17:59:49 +000014902$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014903
Matthias Kloseb159a552010-04-25 21:00:44 +000014904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014905$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014906else
Matthias Kloseb9621712010-04-24 17:59:49 +000014907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14908$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014909
14910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14912
Matthias Kloseb9621712010-04-24 17:59:49 +000014913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14914$as_echo_n "checking for resize_term... " >&6; }
14915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014916/* end confdefs.h. */
14917#include <curses.h>
14918int
14919main ()
14920{
14921void *x=resize_term
14922 ;
14923 return 0;
14924}
14925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014926if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014927
Matthias Kloseb9621712010-04-24 17:59:49 +000014928$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014929
Matthias Kloseb159a552010-04-25 21:00:44 +000014930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014931$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014932else
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14934$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014935
14936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14938
Matthias Kloseb9621712010-04-24 17:59:49 +000014939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14940$as_echo_n "checking for resizeterm... " >&6; }
14941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014942/* end confdefs.h. */
14943#include <curses.h>
14944int
14945main ()
14946{
14947void *x=resizeterm
14948 ;
14949 return 0;
14950}
14951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014952if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014953
Matthias Kloseb9621712010-04-24 17:59:49 +000014954$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014955
Matthias Kloseb159a552010-04-25 21:00:44 +000014956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014957$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014958else
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14960$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014961
14962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014964# last curses configure check
14965CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014966
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14968$as_echo "$as_me: checking for device files" >&6;}
14969
14970if test "x$cross_compiling" = xyes; then
14971 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14973$as_echo_n "checking for /dev/ptmx... " >&6; }
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14975$as_echo "not set" >&6; }
14976 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14977 fi
14978 if test "${ac_cv_file__dev_ptc+set}" != set; then
14979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14980$as_echo_n "checking for /dev/ptc... " >&6; }
14981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14982$as_echo "not set" >&6; }
14983 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14984 fi
14985fi
14986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14988$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014989if ${ac_cv_file__dev_ptmx+:} false; then :
14990 $as_echo_n "(cached) " >&6
14991else
14992 test "$cross_compiling" = yes &&
14993 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14994if test -r "/dev/ptmx"; then
14995 ac_cv_file__dev_ptmx=yes
14996else
14997 ac_cv_file__dev_ptmx=no
14998fi
14999fi
15000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15001$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15002if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015003
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015004fi
15005
15006if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015007
Matthias Kloseb9621712010-04-24 17:59:49 +000015008$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015009
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15012$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015013if ${ac_cv_file__dev_ptc+:} false; then :
15014 $as_echo_n "(cached) " >&6
15015else
15016 test "$cross_compiling" = yes &&
15017 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15018if test -r "/dev/ptc"; then
15019 ac_cv_file__dev_ptc=yes
15020else
15021 ac_cv_file__dev_ptc=no
15022fi
15023fi
15024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15025$as_echo "$ac_cv_file__dev_ptc" >&6; }
15026if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015027
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015028fi
15029
15030if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015031
Matthias Kloseb9621712010-04-24 17:59:49 +000015032$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015033
Neal Norwitz865400f2003-03-21 01:42:58 +000015034fi
15035
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015036if test "$have_long_long" = yes
15037then
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15039$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015040 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015041 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015042else
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015044 ac_cv_have_long_long_format="cross -- assuming no"
15045 if test x$GCC = xyes; then
15046 save_CFLAGS=$CFLAGS
15047 CFLAGS="$CFLAGS -Werror -Wformat"
15048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15049/* end confdefs.h. */
15050
15051 #include <stdio.h>
15052 #include <stddef.h>
15053
15054int
15055main ()
15056{
15057
15058 char *buffer;
15059 sprintf(buffer, "%lld", (long long)123);
15060 sprintf(buffer, "%lld", (long long)-123);
15061 sprintf(buffer, "%llu", (unsigned long long)123);
15062
15063 ;
15064 return 0;
15065}
15066_ACEOF
15067if ac_fn_c_try_compile "$LINENO"; then :
15068 ac_cv_have_long_long_format=yes
15069
15070fi
15071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15072 CFLAGS=$save_CFLAGS
15073 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015074else
Matthias Kloseb9621712010-04-24 17:59:49 +000015075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015076/* end confdefs.h. */
15077
15078 #include <stdio.h>
15079 #include <stddef.h>
15080 #include <string.h>
15081
15082 #ifdef HAVE_SYS_TYPES_H
15083 #include <sys/types.h>
15084 #endif
15085
15086 int main()
15087 {
15088 char buffer[256];
15089
15090 if (sprintf(buffer, "%lld", (long long)123) < 0)
15091 return 1;
15092 if (strcmp(buffer, "123"))
15093 return 1;
15094
15095 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15096 return 1;
15097 if (strcmp(buffer, "-123"))
15098 return 1;
15099
15100 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15101 return 1;
15102 if (strcmp(buffer, "123"))
15103 return 1;
15104
15105 return 0;
15106 }
15107
15108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015109if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015110 ac_cv_have_long_long_format=yes
15111else
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15115 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015116fi
15117
15118
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015119fi
15120
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15122$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015123fi
15124
Mark Dickinson89d7d412009-12-31 20:50:59 +000015125if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015126then
15127
Matthias Kloseb9621712010-04-24 17:59:49 +000015128$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015129
15130fi
15131
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015132if test $ac_sys_system = Darwin
15133then
15134 LIBS="$LIBS -framework CoreFoundation"
15135fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015136
Matthias Kloseb9621712010-04-24 17:59:49 +000015137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15138$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015139if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015140 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015141else
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015143 ac_cv_have_size_t_format="cross -- assuming yes"
15144
Thomas Wouters477c8d52006-05-27 19:21:47 +000015145else
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015147/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015148
Thomas Wouters477c8d52006-05-27 19:21:47 +000015149#include <stdio.h>
15150#include <stddef.h>
15151#include <string.h>
15152
Christian Heimes2c181612007-12-17 20:04:13 +000015153#ifdef HAVE_SYS_TYPES_H
15154#include <sys/types.h>
15155#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015156
15157#ifdef HAVE_SSIZE_T
15158typedef ssize_t Py_ssize_t;
15159#elif SIZEOF_VOID_P == SIZEOF_LONG
15160typedef long Py_ssize_t;
15161#else
15162typedef int Py_ssize_t;
15163#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015164
Christian Heimes2c181612007-12-17 20:04:13 +000015165int main()
15166{
15167 char buffer[256];
15168
Thomas Wouters477c8d52006-05-27 19:21:47 +000015169 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15170 return 1;
15171
Thomas Wouters89f507f2006-12-13 04:49:30 +000015172 if (strcmp(buffer, "123"))
15173 return 1;
15174
15175 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15176 return 1;
15177
15178 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015179 return 1;
15180
15181 return 0;
15182}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015183
Thomas Wouters477c8d52006-05-27 19:21:47 +000015184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015185if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015186 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015187else
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15191 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015192fi
15193
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15196$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015197if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015198
Matthias Kloseb9621712010-04-24 17:59:49 +000015199$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015200
15201fi
15202
Matthias Kloseb9621712010-04-24 17:59:49 +000015203ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015204#ifdef HAVE_SYS_TYPES_H
15205#include <sys/types.h>
15206#endif
15207#ifdef HAVE_SYS_SOCKET_H
15208#include <sys/socket.h>
15209#endif
15210
Matthias Kloseb9621712010-04-24 17:59:49 +000015211"
Victor Stinnere0be4232011-10-25 13:06:09 +020015212if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015213
Martin v. Löwis11437992002-04-12 09:54:03 +000015214else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015215
Matthias Kloseb9621712010-04-24 17:59:49 +000015216$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015217
15218fi
15219
Michael W. Hudson54241132001-12-07 15:38:26 +000015220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15222$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015223if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015225else
Matthias Kloseb9621712010-04-24 17:59:49 +000015226 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015227 ac_cv_broken_mbstowcs=no
15228else
Matthias Kloseb9621712010-04-24 17:59:49 +000015229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015230/* end confdefs.h. */
15231
Stefan Krah19c21392012-11-22 23:47:32 +010015232#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015233#include<stdlib.h>
15234int main() {
15235 size_t len = -1;
15236 const char *str = "text";
15237 len = mbstowcs(NULL, str, 0);
15238 return (len != 4);
15239}
15240
15241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015242if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015243 ac_cv_broken_mbstowcs=no
15244else
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15248 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015249fi
15250
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015251fi
15252
Matthias Kloseb9621712010-04-24 17:59:49 +000015253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15254$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015255if test "$ac_cv_broken_mbstowcs" = yes
15256then
15257
Matthias Kloseb9621712010-04-24 17:59:49 +000015258$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015259
15260fi
15261
Antoine Pitroub52ec782009-01-25 16:34:23 +000015262# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15264$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015265
15266# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015267if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015268 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015269if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015270then
15271
Matthias Kloseb9621712010-04-24 17:59:49 +000015272$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15275$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015276fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015277if test "$withval" = no
15278then
15279
15280$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15281
Matthias Kloseb9621712010-04-24 17:59:49 +000015282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15283$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015284fi
15285
Antoine Pitrou042b1282010-08-13 21:15:58 +000015286else
15287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15288$as_echo "no value specified" >&6; }
15289fi
15290
Antoine Pitroub52ec782009-01-25 16:34:23 +000015291
Matthias Kloseb17289e2012-03-15 19:51:34 +010015292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15293$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15294if ${ac_cv_computed_gotos+:} false; then :
15295 $as_echo_n "(cached) " >&6
15296else
15297 if test "$cross_compiling" = yes; then :
15298 if test "${with_computed_gotos+set}" = set; then
15299 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15300 else
15301 ac_cv_computed_gotos=no
15302 fi
15303else
15304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15305/* end confdefs.h. */
15306
15307int main(int argc, char **argv)
15308{
15309 static void *targets[1] = { &&LABEL1 };
15310 goto LABEL2;
15311LABEL1:
15312 return 0;
15313LABEL2:
15314 goto *targets[0];
15315 return 1;
15316}
15317
15318_ACEOF
15319if ac_fn_c_try_run "$LINENO"; then :
15320 ac_cv_computed_gotos=yes
15321else
15322 ac_cv_computed_gotos=no
15323fi
15324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15325 conftest.$ac_objext conftest.beam conftest.$ac_ext
15326fi
15327
15328fi
15329
15330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15331$as_echo "$ac_cv_computed_gotos" >&6; }
15332case "$ac_cv_computed_gotos" in yes*)
15333
15334$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15335
15336esac
15337
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015338case $ac_sys_system in
15339AIX*)
15340
15341$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15342 ;;
15343esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015344
Michael W. Hudson54241132001-12-07 15:38:26 +000015345
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015346
15347
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015348for h in `(cd $srcdir;echo Python/thread_*.h)`
15349do
15350 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15351done
15352
Michael W. Hudson54241132001-12-07 15:38:26 +000015353
Neal Norwitzd24499d2005-12-18 21:36:39 +000015354SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15356$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015357for dir in $SRCDIRS; do
15358 if test ! -d $dir; then
15359 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015360 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015361done
Matthias Kloseb9621712010-04-24 17:59:49 +000015362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15363$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015364
Stefan Krah1919b7e2012-03-21 18:25:23 +010015365# Availability of -O2:
15366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15367$as_echo_n "checking for -O2... " >&6; }
15368saved_cflags="$CFLAGS"
15369CFLAGS="-O2"
15370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371/* end confdefs.h. */
15372
15373int
15374main ()
15375{
15376
15377
15378 ;
15379 return 0;
15380}
15381_ACEOF
15382if ac_fn_c_try_compile "$LINENO"; then :
15383 have_O2=yes
15384else
15385 have_O2=no
15386fi
15387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15389$as_echo "$have_O2" >&6; }
15390CFLAGS="$saved_cflags"
15391
15392# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15393# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15395$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15396saved_cflags="$CFLAGS"
15397CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15398if test "$have_O2" = no; then
15399 CFLAGS=""
15400fi
15401if test "$cross_compiling" = yes; then :
15402 have_glibc_memmove_bug=undefined
15403else
15404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15405/* end confdefs.h. */
15406
15407#include <stdio.h>
15408#include <stdlib.h>
15409#include <string.h>
15410void foo(void *p, void *q) { memmove(p, q, 19); }
15411int main() {
15412 char a[32] = "123456789000000000";
15413 foo(&a[9], a);
15414 if (strcmp(a, "123456789123456789000000000") != 0)
15415 return 1;
15416 foo(a, &a[9]);
15417 if (strcmp(a, "123456789000000000") != 0)
15418 return 1;
15419 return 0;
15420}
15421
15422_ACEOF
15423if ac_fn_c_try_run "$LINENO"; then :
15424 have_glibc_memmove_bug=no
15425else
15426 have_glibc_memmove_bug=yes
15427fi
15428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15429 conftest.$ac_objext conftest.beam conftest.$ac_ext
15430fi
15431
15432CFLAGS="$saved_cflags"
15433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15434$as_echo "$have_glibc_memmove_bug" >&6; }
15435if test "$have_glibc_memmove_bug" = yes; then
15436
15437$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15438
15439fi
15440
15441if test "$have_gcc_asm_for_x87" = yes; then
15442 # Some versions of gcc miscompile inline asm:
15443 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15444 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15445 case $CC in
15446 *gcc*)
15447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15448$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15449 saved_cflags="$CFLAGS"
15450 CFLAGS="-O2"
15451 if test "$cross_compiling" = yes; then :
15452 have_ipa_pure_const_bug=undefined
15453else
15454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15455/* end confdefs.h. */
15456
15457 __attribute__((noinline)) int
15458 foo(int *p) {
15459 int r;
15460 asm ( "movl \$6, (%1)\n\t"
15461 "xorl %0, %0\n\t"
15462 : "=r" (r) : "r" (p) : "memory"
15463 );
15464 return r;
15465 }
15466 int main() {
15467 int p = 8;
15468 if ((foo(&p) ? : p) != 6)
15469 return 1;
15470 return 0;
15471 }
15472
15473_ACEOF
15474if ac_fn_c_try_run "$LINENO"; then :
15475 have_ipa_pure_const_bug=no
15476else
15477 have_ipa_pure_const_bug=yes
15478fi
15479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15480 conftest.$ac_objext conftest.beam conftest.$ac_ext
15481fi
15482
15483 CFLAGS="$saved_cflags"
15484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15485$as_echo "$have_ipa_pure_const_bug" >&6; }
15486 if test "$have_ipa_pure_const_bug" = yes; then
15487
15488$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15489
15490 fi
15491 ;;
15492 esac
15493fi
15494
Ned Deily322f5ba2013-11-21 23:01:59 -080015495# ensurepip option
15496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15497$as_echo_n "checking for ensurepip... " >&6; }
15498
15499# Check whether --with-ensurepip was given.
15500if test "${with_ensurepip+set}" = set; then :
15501 withval=$with_ensurepip;
15502else
15503 with_ensurepip=upgrade
15504fi
15505
15506case $with_ensurepip in #(
15507 yes|upgrade) :
15508 ENSUREPIP=upgrade ;; #(
15509 install) :
15510 ENSUREPIP=install ;; #(
15511 no) :
15512 ENSUREPIP=no ;; #(
15513 *) :
15514 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15515esac
15516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15517$as_echo "$ENSUREPIP" >&6; }
15518
15519
Guido van Rossum627b2d71993-12-24 10:39:16 +000015520# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015521ac_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 +000015522
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015523ac_config_files="$ac_config_files Modules/ld_so_aix"
15524
Martin v. Löwis11437992002-04-12 09:54:03 +000015525cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015526# This file is a shell script that caches the results of configure
15527# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015528# scripts and configure runs, see configure's option --config-cache.
15529# It is not useful on other systems. If it contains results you don't
15530# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015531#
Martin v. Löwis11437992002-04-12 09:54:03 +000015532# config.status only pays attention to the cache file if you give it
15533# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015534#
Skip Montanaro6dead952003-09-25 14:50:04 +000015535# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015536# loading this file, other *unset* `ac_cv_foo' will be assigned the
15537# following values.
15538
15539_ACEOF
15540
Guido van Rossumf78abae1997-01-21 22:02:36 +000015541# The following way of writing the cache mishandles newlines in values,
15542# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015543# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015544# Ultrix sh set writes to stderr and can't be redirected directly,
15545# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546(
15547 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15548 eval ac_val=\$$ac_var
15549 case $ac_val in #(
15550 *${as_nl}*)
15551 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15553$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015554 esac
15555 case $ac_var in #(
15556 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15558 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015559 esac ;;
15560 esac
15561 done
15562
Martin v. Löwis11437992002-04-12 09:54:03 +000015563 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015564 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15565 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015566 # `set' does not quote correctly, so add quotes: double-quote
15567 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015568 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015569 "s/'/'\\\\''/g;
15570 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015572 *)
15573 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015575 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015576 esac |
15577 sort
15578) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015579 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015580 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015581 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015582 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15584 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15586 :end' >>confcache
15587if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15588 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015589 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15591$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015592 if test ! -f "$cache_file" || test -h "$cache_file"; then
15593 cat confcache >"$cache_file"
15594 else
15595 case $cache_file in #(
15596 */* | ?:*)
15597 mv -f confcache "$cache_file"$$ &&
15598 mv -f "$cache_file"$$ "$cache_file" ;; #(
15599 *)
15600 mv -f confcache "$cache_file" ;;
15601 esac
15602 fi
15603 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015604 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15606$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015607 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015608fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015609rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015610
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015611test "x$prefix" = xNONE && prefix=$ac_default_prefix
15612# Let make expand exec_prefix.
15613test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015614
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015615DEFS=-DHAVE_CONFIG_H
15616
Skip Montanaro6dead952003-09-25 14:50:04 +000015617ac_libobjs=
15618ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015619U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015620for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15621 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015622 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015623 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15625 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015626 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15627 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015628done
15629LIBOBJS=$ac_libobjs
15630
15631LTLIBOBJS=$ac_ltlibobjs
15632
15633
Martin v. Löwis11437992002-04-12 09:54:03 +000015634
Matthias Kloseb9621712010-04-24 17:59:49 +000015635
Victor Stinnere0be4232011-10-25 13:06:09 +020015636: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015637ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015638ac_clean_files_save=$ac_clean_files
15639ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015640{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15641$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15642as_write_fail=0
15643cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015644#! $SHELL
15645# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015646# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015647# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015648# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015649
Martin v. Löwis11437992002-04-12 09:54:03 +000015650debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015651ac_cs_recheck=false
15652ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654SHELL=\${CONFIG_SHELL-$SHELL}
15655export SHELL
15656_ASEOF
15657cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15658## -------------------- ##
15659## M4sh Initialization. ##
15660## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015662# Be more Bourne compatible
15663DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015664if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 emulate sh
15666 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015668 # is contrary to our usage. Disable this feature.
15669 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015670 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015671else
Matthias Kloseb9621712010-04-24 17:59:49 +000015672 case `(set -o) 2>/dev/null` in #(
15673 *posix*) :
15674 set -o posix ;; #(
15675 *) :
15676 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015677esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015678fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015679
15680
Matthias Kloseb9621712010-04-24 17:59:49 +000015681as_nl='
15682'
15683export as_nl
15684# Printing a long string crashes Solaris 7 /usr/bin/printf.
15685as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15686as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15687as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15688# Prefer a ksh shell builtin over an external printf program on Solaris,
15689# but without wasting forks for bash or zsh.
15690if test -z "$BASH_VERSION$ZSH_VERSION" \
15691 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15692 as_echo='print -r --'
15693 as_echo_n='print -rn --'
15694elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15695 as_echo='printf %s\n'
15696 as_echo_n='printf %s'
15697else
15698 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15699 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15700 as_echo_n='/usr/ucb/echo -n'
15701 else
15702 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15703 as_echo_n_body='eval
15704 arg=$1;
15705 case $arg in #(
15706 *"$as_nl"*)
15707 expr "X$arg" : "X\\(.*\\)$as_nl";
15708 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15709 esac;
15710 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15711 '
15712 export as_echo_n_body
15713 as_echo_n='sh -c $as_echo_n_body as_echo'
15714 fi
15715 export as_echo_body
15716 as_echo='sh -c $as_echo_body as_echo'
15717fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015718
15719# The user is always right.
15720if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015721 PATH_SEPARATOR=:
15722 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15723 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15724 PATH_SEPARATOR=';'
15725 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015728
15729# IFS
15730# We need space, tab and new line, in precisely that order. Quoting is
15731# there to prevent editors from complaining about space-tab.
15732# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15733# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734IFS=" "" $as_nl"
15735
15736# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015737as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015738case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015739 *[\\/]* ) as_myself=$0 ;;
15740 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015741for as_dir in $PATH
15742do
15743 IFS=$as_save_IFS
15744 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015745 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15746 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015747IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015749 ;;
15750esac
15751# We did not find ourselves, most probably we were run as `sh COMMAND'
15752# in which case we are not to be found in the path.
15753if test "x$as_myself" = x; then
15754 as_myself=$0
15755fi
15756if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15758 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015759fi
15760
Matthias Kloseb9621712010-04-24 17:59:49 +000015761# Unset variables that we do not need and which cause bugs (e.g. in
15762# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15763# suppresses any "Segmentation fault" message there. '((' could
15764# trigger a bug in pdksh 5.2.14.
15765for as_var in BASH_ENV ENV MAIL MAILPATH
15766do eval test x\${$as_var+set} = xset \
15767 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015768done
15769PS1='$ '
15770PS2='> '
15771PS4='+ '
15772
15773# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015774LC_ALL=C
15775export LC_ALL
15776LANGUAGE=C
15777export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015778
Matthias Kloseb9621712010-04-24 17:59:49 +000015779# CDPATH.
15780(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15781
15782
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015783# as_fn_error STATUS ERROR [LINENO LOG_FD]
15784# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015785# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15786# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015787# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015788as_fn_error ()
15789{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015790 as_status=$1; test $as_status -eq 0 && as_status=1
15791 if test "$4"; then
15792 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15793 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015794 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015795 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015796 as_fn_exit $as_status
15797} # as_fn_error
15798
15799
15800# as_fn_set_status STATUS
15801# -----------------------
15802# Set $? to STATUS, without forking.
15803as_fn_set_status ()
15804{
15805 return $1
15806} # as_fn_set_status
15807
15808# as_fn_exit STATUS
15809# -----------------
15810# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15811as_fn_exit ()
15812{
15813 set +e
15814 as_fn_set_status $1
15815 exit $1
15816} # as_fn_exit
15817
15818# as_fn_unset VAR
15819# ---------------
15820# Portably unset VAR.
15821as_fn_unset ()
15822{
15823 { eval $1=; unset $1;}
15824}
15825as_unset=as_fn_unset
15826# as_fn_append VAR VALUE
15827# ----------------------
15828# Append the text in VALUE to the end of the definition contained in VAR. Take
15829# advantage of any shell optimizations that allow amortized linear growth over
15830# repeated appends, instead of the typical quadratic growth present in naive
15831# implementations.
15832if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15833 eval 'as_fn_append ()
15834 {
15835 eval $1+=\$2
15836 }'
15837else
15838 as_fn_append ()
15839 {
15840 eval $1=\$$1\$2
15841 }
15842fi # as_fn_append
15843
15844# as_fn_arith ARG...
15845# ------------------
15846# Perform arithmetic evaluation on the ARGs, and store the result in the
15847# global $as_val. Take advantage of shells that can avoid forks. The arguments
15848# must be portable across $(()) and expr.
15849if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15850 eval 'as_fn_arith ()
15851 {
15852 as_val=$(( $* ))
15853 }'
15854else
15855 as_fn_arith ()
15856 {
15857 as_val=`expr "$@" || test $? -eq 1`
15858 }
15859fi # as_fn_arith
15860
15861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862if expr a : '\(a\)' >/dev/null 2>&1 &&
15863 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15864 as_expr=expr
15865else
15866 as_expr=false
15867fi
15868
15869if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15870 as_basename=basename
15871else
15872 as_basename=false
15873fi
15874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15876 as_dirname=dirname
15877else
15878 as_dirname=false
15879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015881as_me=`$as_basename -- "$0" ||
15882$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15883 X"$0" : 'X\(//\)$' \| \
15884 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015885$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886 sed '/^.*\/\([^/][^/]*\)\/*$/{
15887 s//\1/
15888 q
15889 }
15890 /^X\/\(\/\/\)$/{
15891 s//\1/
15892 q
15893 }
15894 /^X\/\(\/\).*/{
15895 s//\1/
15896 q
15897 }
15898 s/.*/./; q'`
15899
Matthias Kloseb9621712010-04-24 17:59:49 +000015900# Avoid depending upon Character Ranges.
15901as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15902as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15903as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15904as_cr_digits='0123456789'
15905as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015906
15907ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015908case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015909-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015910 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015911 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015912 xy) ECHO_C='\c';;
15913 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15914 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915 esac;;
15916*)
15917 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015918esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015919
Martin v. Löwis11437992002-04-12 09:54:03 +000015920rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015921if test -d conf$$.dir; then
15922 rm -f conf$$.dir/conf$$.file
15923else
15924 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015925 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015927if (echo >conf$$.file) 2>/dev/null; then
15928 if ln -s conf$$.file conf$$ 2>/dev/null; then
15929 as_ln_s='ln -s'
15930 # ... but there are two gotchas:
15931 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15932 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015933 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015934 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015935 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015936 elif ln conf$$.file conf$$ 2>/dev/null; then
15937 as_ln_s=ln
15938 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015939 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015940 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015941else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015942 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015944rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15945rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015946
Matthias Kloseb9621712010-04-24 17:59:49 +000015947
15948# as_fn_mkdir_p
15949# -------------
15950# Create "$as_dir" as a directory, including parents if necessary.
15951as_fn_mkdir_p ()
15952{
15953
15954 case $as_dir in #(
15955 -*) as_dir=./$as_dir;;
15956 esac
15957 test -d "$as_dir" || eval $as_mkdir_p || {
15958 as_dirs=
15959 while :; do
15960 case $as_dir in #(
15961 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15962 *) as_qdir=$as_dir;;
15963 esac
15964 as_dirs="'$as_qdir' $as_dirs"
15965 as_dir=`$as_dirname -- "$as_dir" ||
15966$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15967 X"$as_dir" : 'X\(//\)[^/]' \| \
15968 X"$as_dir" : 'X\(//\)$' \| \
15969 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15970$as_echo X"$as_dir" |
15971 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15972 s//\1/
15973 q
15974 }
15975 /^X\(\/\/\)[^/].*/{
15976 s//\1/
15977 q
15978 }
15979 /^X\(\/\/\)$/{
15980 s//\1/
15981 q
15982 }
15983 /^X\(\/\).*/{
15984 s//\1/
15985 q
15986 }
15987 s/.*/./; q'`
15988 test -d "$as_dir" && break
15989 done
15990 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015991 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015992
15993
15994} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015995if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015996 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015997else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015998 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015999 as_mkdir_p=false
16000fi
16001
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016002
16003# as_fn_executable_p FILE
16004# -----------------------
16005# Test if FILE is an executable regular file.
16006as_fn_executable_p ()
16007{
16008 test -f "$1" && test -x "$1"
16009} # as_fn_executable_p
16010as_test_x='test -x'
16011as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016012
16013# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016014as_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 +000016015
16016# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016017as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016018
16019
Martin v. Löwis11437992002-04-12 09:54:03 +000016020exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016021## ----------------------------------- ##
16022## Main body of $CONFIG_STATUS script. ##
16023## ----------------------------------- ##
16024_ASEOF
16025test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016026
Matthias Kloseb9621712010-04-24 17:59:49 +000016027cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16028# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016029# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016030# values after options handling.
16031ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016032This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016033generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016034
16035 CONFIG_FILES = $CONFIG_FILES
16036 CONFIG_HEADERS = $CONFIG_HEADERS
16037 CONFIG_LINKS = $CONFIG_LINKS
16038 CONFIG_COMMANDS = $CONFIG_COMMANDS
16039 $ $0 $@
16040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016041on `(hostname || uname -n) 2>/dev/null | sed 1q`
16042"
16043
Martin v. Löwis11437992002-04-12 09:54:03 +000016044_ACEOF
16045
Matthias Kloseb9621712010-04-24 17:59:49 +000016046case $ac_config_files in *"
16047"*) set x $ac_config_files; shift; ac_config_files=$*;;
16048esac
16049
16050case $ac_config_headers in *"
16051"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16052esac
16053
16054
16055cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016056# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016057config_files="$ac_config_files"
16058config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016060_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016061
Matthias Kloseb9621712010-04-24 17:59:49 +000016062cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016063ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016064\`$as_me' instantiates files and other configuration actions
16065from templates according to the current configuration. Unless the files
16066and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016067
Matthias Kloseb9621712010-04-24 17:59:49 +000016068Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016069
16070 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016071 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016072 --config print configuration, then exit
16073 -q, --quiet, --silent
16074 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016075 -d, --debug don't remove temporary files
16076 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016077 --file=FILE[:TEMPLATE]
16078 instantiate the configuration file FILE
16079 --header=FILE[:TEMPLATE]
16080 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016081
16082Configuration files:
16083$config_files
16084
16085Configuration headers:
16086$config_headers
16087
Matthias Kloseb9621712010-04-24 17:59:49 +000016088Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016091cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16092ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016093ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016094python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016095configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016096 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016097
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016098Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016099This config.status script is free software; the Free Software Foundation
16100gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016101
16102ac_pwd='$ac_pwd'
16103srcdir='$srcdir'
16104INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016105MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016106test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016107_ACEOF
16108
Matthias Kloseb9621712010-04-24 17:59:49 +000016109cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16110# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016111ac_need_defaults=:
16112while test $# != 0
16113do
16114 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016115 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016116 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16117 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016118 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016119 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016120 --*=)
16121 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16122 ac_optarg=
16123 ac_shift=:
16124 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016125 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016126 ac_option=$1
16127 ac_optarg=$2
16128 ac_shift=shift
16129 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016130 esac
16131
Skip Montanaro6dead952003-09-25 14:50:04 +000016132 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016133 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016134 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16135 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016137 $as_echo "$ac_cs_version"; exit ;;
16138 --config | --confi | --conf | --con | --co | --c )
16139 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016141 debug=: ;;
16142 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016143 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016144 case $ac_optarg in
16145 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016146 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016147 esac
16148 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016149 ac_need_defaults=false;;
16150 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016151 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016152 case $ac_optarg in
16153 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16154 esac
16155 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016156 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157 --he | --h)
16158 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016159 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016160Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016161 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016162 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016163 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16164 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16165 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016166
16167 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016168 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016169Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016170
Matthias Kloseb9621712010-04-24 17:59:49 +000016171 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016172 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016173
16174 esac
16175 shift
16176done
16177
Skip Montanaro6dead952003-09-25 14:50:04 +000016178ac_configure_extra_args=
16179
16180if $ac_cs_silent; then
16181 exec 6>/dev/null
16182 ac_configure_extra_args="$ac_configure_extra_args --silent"
16183fi
16184
16185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016186cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016187if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016188 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016189 shift
16190 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16191 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016192 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016193 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016194fi
16195
Martin v. Löwis11437992002-04-12 09:54:03 +000016196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016197cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016198exec 5>>config.log
16199{
16200 echo
16201 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16202## Running $as_me. ##
16203_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016204 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016205} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016209_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016210
Matthias Kloseb9621712010-04-24 17:59:49 +000016211cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212
16213# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016214for ac_config_target in $ac_config_targets
16215do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216 case $ac_config_target in
16217 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16218 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16219 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016220 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16221 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16223 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016224 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016225 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016226 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227
Victor Stinnere0be4232011-10-25 13:06:09 +020016228 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 esac
16230done
16231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016232
Martin v. Löwis11437992002-04-12 09:54:03 +000016233# If the user did not use the arguments to specify the items to instantiate,
16234# then the envvar interface is used. Set only those that are not.
16235# We use the long form for the default assignment because of an extremely
16236# bizarre bug on SunOS 4.1.3.
16237if $ac_need_defaults; then
16238 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16239 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16240fi
16241
Skip Montanaro6dead952003-09-25 14:50:04 +000016242# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016244# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016245# Hook for its removal unless debugging.
16246# Note that there is a small window in which the directory will not be cleaned:
16247# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016248$debug ||
16249{
Victor Stinnere0be4232011-10-25 13:06:09 +020016250 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016252 : "${ac_tmp:=$tmp}"
16253 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016255 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016256}
Martin v. Löwis11437992002-04-12 09:54:03 +000016257# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016258
Martin v. Löwis11437992002-04-12 09:54:03 +000016259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016260 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016261 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016262} ||
16263{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264 tmp=./conf$$-$RANDOM
16265 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016266} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016267ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016268
Matthias Kloseb9621712010-04-24 17:59:49 +000016269# Set up the scripts for CONFIG_FILES section.
16270# No need to generate them if there are no CONFIG_FILES.
16271# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016273
Matthias Kloseb9621712010-04-24 17:59:49 +000016274
16275ac_cr=`echo X | tr X '\015'`
16276# On cygwin, bash can eat \r inside `` if the user requested igncr.
16277# But we know of no other shell where ac_cr would be empty at this
16278# point, so we can use a bashism as a fallback.
16279if test "x$ac_cr" = x; then
16280 eval ac_cr=\$\'\\r\'
16281fi
16282ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16283if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016284 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016285else
16286 ac_cs_awk_cr=$ac_cr
16287fi
16288
Victor Stinnere0be4232011-10-25 13:06:09 +020016289echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016290_ACEOF
16291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292
Matthias Kloseb9621712010-04-24 17:59:49 +000016293{
16294 echo "cat >conf$$subs.awk <<_ACEOF" &&
16295 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16296 echo "_ACEOF"
16297} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016298 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16299ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300ac_delim='%!_!# '
16301for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016302 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016303 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304
Matthias Kloseb9621712010-04-24 17:59:49 +000016305 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16306 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016307 break
16308 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016309 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310 else
16311 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016312 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313done
Matthias Kloseb9621712010-04-24 17:59:49 +000016314rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315
Matthias Kloseb9621712010-04-24 17:59:49 +000016316cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016317cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016319sed -n '
16320h
16321s/^/S["/; s/!.*/"]=/
16322p
16323g
16324s/^[^!]*!//
16325:repl
16326t repl
16327s/'"$ac_delim"'$//
16328t delim
16329:nl
16330h
16331s/\(.\{148\}\)..*/\1/
16332t more1
16333s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16334p
16335n
16336b repl
16337:more1
16338s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16339p
16340g
16341s/.\{148\}//
16342t nl
16343:delim
16344h
16345s/\(.\{148\}\)..*/\1/
16346t more2
16347s/["\\]/\\&/g; s/^/"/; s/$/"/
16348p
16349b
16350:more2
16351s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16352p
16353g
16354s/.\{148\}//
16355t delim
16356' <conf$$subs.awk | sed '
16357/^[^""]/{
16358 N
16359 s/\n//
16360}
16361' >>$CONFIG_STATUS || ac_write_fail=1
16362rm -f conf$$subs.awk
16363cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16364_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016365cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016366 for (key in S) S_is_set[key] = 1
16367 FS = ""
16368
16369}
16370{
16371 line = $ 0
16372 nfields = split(line, field, "@")
16373 substed = 0
16374 len = length(field[1])
16375 for (i = 2; i < nfields; i++) {
16376 key = field[i]
16377 keylen = length(key)
16378 if (S_is_set[key]) {
16379 value = S[key]
16380 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16381 len += length(value) + length(field[++i])
16382 substed = 1
16383 } else
16384 len += 1 + keylen
16385 }
16386
16387 print line
16388}
16389
16390_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016392cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16393if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16394 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16395else
16396 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016397fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016398 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016399_ACEOF
16400
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016401# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16402# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016403# trailing colons and then remove the whole line if VPATH becomes empty
16404# (actually we leave an empty line to preserve line numbers).
16405if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016406 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16407h
16408s///
16409s/^/:/
16410s/[ ]*$/:/
16411s/:\$(srcdir):/:/g
16412s/:\${srcdir}:/:/g
16413s/:@srcdir@:/:/g
16414s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016415s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016416x
16417s/\(=[ ]*\).*/\1/
16418G
16419s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016420s/^[^=]*=[ ]*$//
16421}'
16422fi
16423
Matthias Kloseb9621712010-04-24 17:59:49 +000016424cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016425fi # test -n "$CONFIG_FILES"
16426
Matthias Kloseb9621712010-04-24 17:59:49 +000016427# Set up the scripts for CONFIG_HEADERS section.
16428# No need to generate them if there are no CONFIG_HEADERS.
16429# This happens for instance with `./config.status Makefile'.
16430if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016431cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016432BEGIN {
16433_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016434
Matthias Kloseb9621712010-04-24 17:59:49 +000016435# Transform confdefs.h into an awk script `defines.awk', embedded as
16436# here-document in config.status, that substitutes the proper values into
16437# config.h.in to produce config.h.
16438
16439# Create a delimiter string that does not exist in confdefs.h, to ease
16440# handling of long lines.
16441ac_delim='%!_!# '
16442for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016443 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16444 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016445 break
16446 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016447 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016448 else
16449 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16450 fi
16451done
16452
16453# For the awk script, D is an array of macro values keyed by name,
16454# likewise P contains macro parameters if any. Preserve backslash
16455# newline sequences.
16456
16457ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16458sed -n '
16459s/.\{148\}/&'"$ac_delim"'/g
16460t rset
16461:rset
16462s/^[ ]*#[ ]*define[ ][ ]*/ /
16463t def
16464d
16465:def
16466s/\\$//
16467t bsnl
16468s/["\\]/\\&/g
16469s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16470D["\1"]=" \3"/p
16471s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16472d
16473:bsnl
16474s/["\\]/\\&/g
16475s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16476D["\1"]=" \3\\\\\\n"\\/p
16477t cont
16478s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16479t cont
16480d
16481:cont
16482n
16483s/.\{148\}/&'"$ac_delim"'/g
16484t clear
16485:clear
16486s/\\$//
16487t bsnlc
16488s/["\\]/\\&/g; s/^/"/; s/$/"/p
16489d
16490:bsnlc
16491s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16492b cont
16493' <confdefs.h | sed '
16494s/'"$ac_delim"'/"\\\
16495"/g' >>$CONFIG_STATUS || ac_write_fail=1
16496
16497cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16498 for (key in D) D_is_set[key] = 1
16499 FS = ""
16500}
16501/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16502 line = \$ 0
16503 split(line, arg, " ")
16504 if (arg[1] == "#") {
16505 defundef = arg[2]
16506 mac1 = arg[3]
16507 } else {
16508 defundef = substr(arg[1], 2)
16509 mac1 = arg[2]
16510 }
16511 split(mac1, mac2, "(") #)
16512 macro = mac2[1]
16513 prefix = substr(line, 1, index(line, defundef) - 1)
16514 if (D_is_set[macro]) {
16515 # Preserve the white space surrounding the "#".
16516 print prefix "define", macro P[macro] D[macro]
16517 next
16518 } else {
16519 # Replace #undef with comments. This is necessary, for example,
16520 # in the case of _POSIX_SOURCE, which is predefined and required
16521 # on some systems where configure will not decide to define it.
16522 if (defundef == "undef") {
16523 print "/*", prefix defundef, macro, "*/"
16524 next
16525 }
16526 }
16527}
16528{ print }
16529_ACAWK
16530_ACEOF
16531cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016532 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016533fi # test -n "$CONFIG_HEADERS"
16534
16535
16536eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16537shift
16538for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016539do
16540 case $ac_tag in
16541 :[FHLC]) ac_mode=$ac_tag; continue;;
16542 esac
16543 case $ac_mode$ac_tag in
16544 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016545 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546 :[FH]-) ac_tag=-:-;;
16547 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16548 esac
16549 ac_save_IFS=$IFS
16550 IFS=:
16551 set x $ac_tag
16552 IFS=$ac_save_IFS
16553 shift
16554 ac_file=$1
16555 shift
16556
16557 case $ac_mode in
16558 :L) ac_source=$1;;
16559 :[FH])
16560 ac_file_inputs=
16561 for ac_f
16562 do
16563 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016564 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016565 *) # Look for the file first in the build tree, then in the source tree
16566 # (if the path is not absolute). The absolute path cannot be DOS-style,
16567 # because $ac_f cannot contain `:'.
16568 test -f "$ac_f" ||
16569 case $ac_f in
16570 [\\/$]*) false;;
16571 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16572 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016573 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016574 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016575 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16576 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016577 done
16578
16579 # Let's still pretend it is `configure' which instantiates (i.e., don't
16580 # use $as_me), people would be surprised to read:
16581 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016582 configure_input='Generated from '`
16583 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16584 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016585 if test x"$ac_file" != x-; then
16586 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016587 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16588$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016589 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016590 # Neutralize special characters interpreted by sed in replacement strings.
16591 case $configure_input in #(
16592 *\&* | *\|* | *\\* )
16593 ac_sed_conf_input=`$as_echo "$configure_input" |
16594 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16595 *) ac_sed_conf_input=$configure_input;;
16596 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016597
16598 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016599 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16600 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016601 esac
16602 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 esac
16604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016606$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016607 X"$ac_file" : 'X\(//\)[^/]' \| \
16608 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016610$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016611 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16612 s//\1/
16613 q
16614 }
16615 /^X\(\/\/\)[^/].*/{
16616 s//\1/
16617 q
16618 }
16619 /^X\(\/\/\)$/{
16620 s//\1/
16621 q
16622 }
16623 /^X\(\/\).*/{
16624 s//\1/
16625 q
16626 }
16627 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016628 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016629 ac_builddir=.
16630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631case "$ac_dir" in
16632.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16633*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016634 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016635 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016636 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637 case $ac_top_builddir_sub in
16638 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16639 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16640 esac ;;
16641esac
16642ac_abs_top_builddir=$ac_pwd
16643ac_abs_builddir=$ac_pwd$ac_dir_suffix
16644# for backward compatibility:
16645ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016646
16647case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016648 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016649 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016650 ac_top_srcdir=$ac_top_builddir_sub
16651 ac_abs_top_srcdir=$ac_pwd ;;
16652 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016653 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654 ac_top_srcdir=$srcdir
16655 ac_abs_top_srcdir=$srcdir ;;
16656 *) # Relative name.
16657 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16658 ac_top_srcdir=$ac_top_build_prefix$srcdir
16659 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016660esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016662
Martin v. Löwis11437992002-04-12 09:54:03 +000016663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664 case $ac_mode in
16665 :F)
16666 #
16667 # CONFIG_FILE
16668 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016669
16670 case $INSTALL in
16671 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016674 ac_MKDIR_P=$MKDIR_P
16675 case $MKDIR_P in
16676 [\\/$]* | ?:[\\/]* ) ;;
16677 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16678 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016679_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680
Matthias Kloseb9621712010-04-24 17:59:49 +000016681cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016682# If the template does not know about datarootdir, expand it.
16683# FIXME: This hack should be removed a few years after 2.60.
16684ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016685ac_sed_dataroot='
16686/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016687 p
16688 q
16689}
16690/@datadir@/p
16691/@docdir@/p
16692/@infodir@/p
16693/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016694/@mandir@/p'
16695case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696*datarootdir*) ac_datarootdir_seen=yes;;
16697*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16699$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016701cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702 ac_datarootdir_hack='
16703 s&@datadir@&$datadir&g
16704 s&@docdir@&$docdir&g
16705 s&@infodir@&$infodir&g
16706 s&@localedir@&$localedir&g
16707 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016708 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709esac
16710_ACEOF
16711
16712# Neutralize VPATH when `$srcdir' = `.'.
16713# Shell code in configure.ac might set extrasub.
16714# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016715cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16716ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016717$extrasub
16718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016719cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016720:t
16721/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016722s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016723s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016724s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016725s&@srcdir@&$ac_srcdir&;t t
16726s&@abs_srcdir@&$ac_abs_srcdir&;t t
16727s&@top_srcdir@&$ac_top_srcdir&;t t
16728s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16729s&@builddir@&$ac_builddir&;t t
16730s&@abs_builddir@&$ac_abs_builddir&;t t
16731s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16732s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016733s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016735"
Victor Stinnere0be4232011-10-25 13:06:09 +020016736eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16737 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016740 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16741 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16742 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016744which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016745$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016746which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016747
Victor Stinnere0be4232011-10-25 13:06:09 +020016748 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016749 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016750 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16751 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016752 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016753 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016754 ;;
16755 :H)
16756 #
16757 # CONFIG_HEADER
16758 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016759 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016760 {
16761 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016762 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16763 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016764 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016765 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016766 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16767$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016768 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016769 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016770 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016771 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016772 fi
16773 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016774 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016775 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016776 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016777 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016778 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016780
16781 esac
16782
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016783
16784 case $ac_file$ac_mode in
16785 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16786
16787 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788done # for ac_tag
16789
Guido van Rossum627b2d71993-12-24 10:39:16 +000016790
Matthias Kloseb9621712010-04-24 17:59:49 +000016791as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016792_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016793ac_clean_files=$ac_clean_files_save
16794
Matthias Kloseb9621712010-04-24 17:59:49 +000016795test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016796 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016797
Martin v. Löwis11437992002-04-12 09:54:03 +000016798
16799# configure is writing to config.log, and then calls config.status.
16800# config.status does its own redirection, appending to config.log.
16801# Unfortunately, on DOS this fails, as config.log is still kept open
16802# by configure, so config.status won't be able to write to it; its
16803# output is simply discarded. So we exec the FD to /dev/null,
16804# effectively closing config.log, so it can be properly (re)opened and
16805# appended to by config.status. When coming back to configure, we
16806# need to make the FD available again.
16807if test "$no_create" != yes; then
16808 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016809 ac_config_status_args=
16810 test "$silent" = yes &&
16811 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016812 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016813 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 exec 5>>config.log
16815 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16816 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016817 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016818fi
16819if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16821$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016822fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016823
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016824
Christian Heimes75ed8902013-11-20 01:11:18 +010016825echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016826if test ! -f Modules/Setup
16827then
16828 cp $srcdir/Modules/Setup.dist Modules/Setup
16829fi
16830
Christian Heimes75ed8902013-11-20 01:11:18 +010016831echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016832if test ! -f Modules/Setup.local
16833then
16834 echo "# Edit this file for local setup changes" >Modules/Setup.local
16835fi
16836
Christian Heimes75ed8902013-11-20 01:11:18 +010016837echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016838$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16839 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016840 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016841mv config.c Modules