blob: 29cbd3614e26d011628016b4ef60ad48b8836cd6 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ross Lagerwall2bb842a2012-10-29 17:39:19 +00003# Generated by GNU Autoconf 2.69 for python 3.4.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Georg Brandl08a90122012-09-29 09:34:13 +0200583PACKAGE_VERSION='3.4'
584PACKAGE_STRING='python 3.4'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
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
Benjamin Peterson0f3cde12014-12-15 00:00:23 -0500653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000655PKG_CONFIG
656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000670ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100672MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000673INSTALL_DATA
674INSTALL_SCRIPT
675INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200676PYTHON
677ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200678ac_ct_READELF
679READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000680ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200681ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000682AR
683RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000684USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000685GNULD
686LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000688RUNSHARED
689INSTSONAME
690LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000691PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000692BLDLIBRARY
693DLLLIBRARY
694LDLIBRARY
695LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100696MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000697BUILDEXEEXT
698EGREP
699GREP
700CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200701NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200702ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000703MAINCC
704CXX
705OBJEXT
706EXEEXT
707ac_ct_CC
708CPPFLAGS
709LDFLAGS
710CFLAGS
711CC
712EXPORT_MACOSX_DEPLOYMENT_TARGET
713CONFIGURE_MACOSX_DEPLOYMENT_TARGET
714SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200715_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000717FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000718FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800719FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000720FRAMEWORKALTINSTALLLAST
721FRAMEWORKALTINSTALLFIRST
722FRAMEWORKINSTALLLAST
723FRAMEWORKINSTALLFIRST
724PYTHONFRAMEWORKINSTALLDIR
725PYTHONFRAMEWORKPREFIX
726PYTHONFRAMEWORKDIR
727PYTHONFRAMEWORKIDENTIFIER
728PYTHONFRAMEWORK
729LIPO_32BIT_FLAGS
730ARCH_RUN_32BIT
731UNIVERSALSDK
732CONFIG_ARGS
733SOVERSION
734VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200735PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100736host_os
737host_vendor
738host_cpu
739host
740build_os
741build_vendor
742build_cpu
743build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500744HAS_HG
745HGBRANCH
746HGTAG
747HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400748BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000749target_alias
750host_alias
751build_alias
752LIBS
753ECHO_T
754ECHO_N
755ECHO_C
756DEFS
757mandir
758localedir
759libdir
760psdir
761pdfdir
762dvidir
763htmldir
764infodir
765docdir
766oldincludedir
767includedir
768localstatedir
769sharedstatedir
770sysconfdir
771datadir
772datarootdir
773libexecdir
774sbindir
775bindir
776program_transform_name
777prefix
778exec_prefix
779PACKAGE_URL
780PACKAGE_BUGREPORT
781PACKAGE_STRING
782PACKAGE_VERSION
783PACKAGE_TARNAME
784PACKAGE_NAME
785PATH_SEPARATOR
786SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000787ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000788ac_user_opts='
789enable_option_checking
790enable_universalsdk
791with_universal_archs
792with_framework_name
793enable_framework
794with_gcc
795with_cxx_main
796with_suffix
797enable_shared
798enable_profiling
799with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100800with_hash_algorithm
Matthias Kloseb9621712010-04-24 17:59:49 +0000801with_libs
802with_system_expat
803with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100804with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000805enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700806with_tcltk_includes
807with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_dbmliborder
809with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_threads
811with_thread
812enable_ipv6
813with_doc_strings
814with_tsc
815with_pymalloc
816with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000817with_fpectl
818with_libm
819with_libc
820enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800822with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000823'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824 ac_precious_vars='build_alias
825host_alias
826target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100827MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828CC
829CFLAGS
830LDFLAGS
831LIBS
832CPPFLAGS
Benjamin Peterson0f3cde12014-12-15 00:00:23 -0500833CPP
834PKG_CONFIG
835PKG_CONFIG_PATH
836PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837
Guido van Rossum627b2d71993-12-24 10:39:16 +0000838
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000840ac_init_help=
841ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000842ac_unrecognized_opts=
843ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844# The variables have the same names as the options, with
845# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000846cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849no_recursion=
850prefix=NONE
851program_prefix=NONE
852program_suffix=NONE
853program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858x_includes=NONE
859x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000860
861# Installation directory options.
862# These are left unexpanded so users can "make install exec_prefix=/foo"
863# and all the variables that are supposed to be based on exec_prefix
864# by default will actually change.
865# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867bindir='${exec_prefix}/bin'
868sbindir='${exec_prefix}/sbin'
869libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870datarootdir='${prefix}/share'
871datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872sysconfdir='${prefix}/etc'
873sharedstatedir='${prefix}/com'
874localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875includedir='${prefix}/include'
876oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
878infodir='${datarootdir}/info'
879htmldir='${docdir}'
880dvidir='${docdir}'
881pdfdir='${docdir}'
882psdir='${docdir}'
883libdir='${exec_prefix}/lib'
884localedir='${datarootdir}/locale'
885mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000890do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891 # If the previous option needs an argument, assign it.
892 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894 ac_prev=
895 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000896 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200899 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
900 *=) ac_optarg= ;;
901 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904 # Accept the important Cygnus configure options, so we can diagnose typos.
905
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 case $ac_dashdash$ac_option in
907 --)
908 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910 -bindir | --bindir | --bindi | --bind | --bin | --bi)
911 ac_prev=bindir ;;
912 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 -cache-file | --cache-file | --cache-fil | --cache-fi \
921 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
922 ac_prev=cache_file ;;
923 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
924 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 cache_file=$ac_optarg ;;
926
927 --config-cache | -C)
928 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
936 | --dataroo | --dataro | --datar)
937 ac_prev=datarootdir ;;
938 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
939 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
940 datarootdir=$ac_optarg ;;
941
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000943 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000945 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200946 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000947 ac_useropt_orig=$ac_useropt
948 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
949 case $ac_user_opts in
950 *"
951"enable_$ac_useropt"
952"*) ;;
953 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
954 ac_unrecognized_sep=', ';;
955 esac
956 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957
958 -docdir | --docdir | --docdi | --doc | --do)
959 ac_prev=docdir ;;
960 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
961 docdir=$ac_optarg ;;
962
963 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
964 ac_prev=dvidir ;;
965 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
966 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
968 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200972 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt_orig=$ac_useropt
974 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975 case $ac_user_opts in
976 *"
977"enable_$ac_useropt"
978"*) ;;
979 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
980 ac_unrecognized_sep=', ';;
981 esac
982 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
985 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
986 | --exec | --exe | --ex)
987 ac_prev=exec_prefix ;;
988 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
989 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
990 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Obsolete; use --with-gas.
995 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 -help | --help | --hel | --he | -h)
998 ac_init_help=long ;;
999 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1000 ac_init_help=recursive ;;
1001 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1002 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
1004 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1010 ac_prev=htmldir ;;
1011 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1012 | --ht=*)
1013 htmldir=$ac_optarg ;;
1014
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015 -includedir | --includedir | --includedi | --included | --include \
1016 | --includ | --inclu | --incl | --inc)
1017 ac_prev=includedir ;;
1018 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1019 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -infodir | --infodir | --infodi | --infod | --info | --inf)
1023 ac_prev=infodir ;;
1024 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -libdir | --libdir | --libdi | --libd)
1028 ac_prev=libdir ;;
1029 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1033 | --libexe | --libex | --libe)
1034 ac_prev=libexecdir ;;
1035 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1036 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001039 -localedir | --localedir | --localedi | --localed | --locale)
1040 ac_prev=localedir ;;
1041 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1042 localedir=$ac_optarg ;;
1043
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001045 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046 ac_prev=localstatedir ;;
1047 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001048 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1052 ac_prev=mandir ;;
1053 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001057 # Obsolete; use --without-fp.
1058 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062 no_create=yes ;;
1063
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001064 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1065 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1066 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1069 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1070 | --oldin | --oldi | --old | --ol | --o)
1071 ac_prev=oldincludedir ;;
1072 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1073 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1074 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1078 ac_prev=prefix ;;
1079 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1083 | --program-pre | --program-pr | --program-p)
1084 ac_prev=program_prefix ;;
1085 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1086 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
1089 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1090 | --program-suf | --program-su | --program-s)
1091 ac_prev=program_suffix ;;
1092 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1093 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -program-transform-name | --program-transform-name \
1097 | --program-transform-nam | --program-transform-na \
1098 | --program-transform-n | --program-transform- \
1099 | --program-transform | --program-transfor \
1100 | --program-transfo | --program-transf \
1101 | --program-trans | --program-tran \
1102 | --progr-tra | --program-tr | --program-t)
1103 ac_prev=program_transform_name ;;
1104 -program-transform-name=* | --program-transform-name=* \
1105 | --program-transform-nam=* | --program-transform-na=* \
1106 | --program-transform-n=* | --program-transform-=* \
1107 | --program-transform=* | --program-transfor=* \
1108 | --program-transfo=* | --program-transf=* \
1109 | --program-trans=* | --program-tran=* \
1110 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001113 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1114 ac_prev=pdfdir ;;
1115 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1116 pdfdir=$ac_optarg ;;
1117
1118 -psdir | --psdir | --psdi | --psd | --ps)
1119 ac_prev=psdir ;;
1120 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1121 psdir=$ac_optarg ;;
1122
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1124 | -silent | --silent | --silen | --sile | --sil)
1125 silent=yes ;;
1126
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001127 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1128 ac_prev=sbindir ;;
1129 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1130 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001132
1133 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1134 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1135 | --sharedst | --shareds | --shared | --share | --shar \
1136 | --sha | --sh)
1137 ac_prev=sharedstatedir ;;
1138 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1139 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1140 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1141 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144 -site | --site | --sit)
1145 ac_prev=site ;;
1146 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1150 ac_prev=srcdir ;;
1151 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1155 | --syscon | --sysco | --sysc | --sys | --sy)
1156 ac_prev=sysconfdir ;;
1157 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1158 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
1166 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1167 verbose=yes ;;
1168
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 -version | --version | --versio | --versi | --vers | -V)
1170 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171
1172 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 ac_useropt_orig=$ac_useropt
1178 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1179 case $ac_user_opts in
1180 *"
1181"with_$ac_useropt"
1182"*) ;;
1183 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1184 ac_unrecognized_sep=', ';;
1185 esac
1186 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001190 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001192 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 ac_useropt_orig=$ac_useropt
1194 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1195 case $ac_user_opts in
1196 *"
1197"with_$ac_useropt"
1198"*) ;;
1199 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1200 ac_unrecognized_sep=', ';;
1201 esac
1202 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204 --x)
1205 # Obsolete; use --with-x.
1206 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
1208 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1209 | --x-incl | --x-inc | --x-in | --x-i)
1210 ac_prev=x_includes ;;
1211 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1212 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
1215 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1216 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1217 ac_prev=x_libraries ;;
1218 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1219 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001222 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1223Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224 ;;
1225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 *=*)
1227 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1228 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001229 case $ac_envvar in #(
1230 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001231 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001232 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001233 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 export $ac_envvar ;;
1235
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001236 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001238 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001240 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001241 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242 ;;
1243
1244 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245done
1246
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001249 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250fi
1251
Matthias Kloseb9621712010-04-24 17:59:49 +00001252if test -n "$ac_unrecognized_opts"; then
1253 case $enable_option_checking in
1254 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1257 esac
1258fi
1259
1260# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1262 datadir sysconfdir sharedstatedir localstatedir includedir \
1263 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1264 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001265do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 # Remove trailing slashes.
1268 case $ac_val in
1269 */ )
1270 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1271 eval $ac_var=\$ac_val;;
1272 esac
1273 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275 [\\/$]* | ?:[\\/]* ) continue;;
1276 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001279done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280
Martin v. Löwis11437992002-04-12 09:54:03 +00001281# There might be people who depend on the old broken behavior: `$host'
1282# used to hold the argument of --host etc.
1283# FIXME: To remove some day.
1284build=$build_alias
1285host=$host_alias
1286target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287
Martin v. Löwis11437992002-04-12 09:54:03 +00001288# FIXME: To remove some day.
1289if test "x$host_alias" != x; then
1290 if test "x$build_alias" = x; then
1291 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001292 elif test "x$build_alias" != "x$host_alias"; then
1293 cross_compiling=yes
1294 fi
1295fi
1296
1297ac_tool_prefix=
1298test -n "$host_alias" && ac_tool_prefix=$host_alias-
1299
1300test "$silent" = yes && exec 6>/dev/null
1301
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303ac_pwd=`pwd` && test -n "$ac_pwd" &&
1304ac_ls_di=`ls -di .` &&
1305ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001306 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001308 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309
1310
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311# Find the source files, if location was not specified.
1312if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001313 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001314 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001315 ac_confdir=`$as_dirname -- "$as_myself" ||
1316$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1317 X"$as_myself" : 'X\(//\)[^/]' \| \
1318 X"$as_myself" : 'X\(//\)$' \| \
1319 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1320$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1322 s//\1/
1323 q
1324 }
1325 /^X\(\/\/\)[^/].*/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\/\)$/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\).*/{
1334 s//\1/
1335 q
1336 }
1337 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001338 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340 srcdir=..
1341 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001342else
1343 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345if test ! -r "$srcdir/$ac_unique_file"; then
1346 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001347 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1350ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001351 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 pwd)`
1353# When building in place, set srcdir=.
1354if test "$ac_abs_confdir" = "$ac_pwd"; then
1355 srcdir=.
1356fi
1357# Remove unnecessary trailing slashes from srcdir.
1358# Double slashes in file names in object file debugging info
1359# mess up M-x gdb in Emacs.
1360case $srcdir in
1361*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1362esac
1363for ac_var in $ac_precious_vars; do
1364 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1365 eval ac_env_${ac_var}_value=\$${ac_var}
1366 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1367 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1368done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001369
Martin v. Löwis11437992002-04-12 09:54:03 +00001370#
1371# Report the --help message.
1372#
1373if test "$ac_init_help" = "long"; then
1374 # Omit some internal or obsolete options to make the list less imposing.
1375 # This message is too long to be a string in the A/UX 3.1 sh.
1376 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001377\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001378
1379Usage: $0 [OPTION]... [VAR=VALUE]...
1380
1381To assign environment variables (e.g., CC, CFLAGS...), specify them as
1382VAR=VALUE. See below for descriptions of some of the useful variables.
1383
1384Defaults for the options are specified in brackets.
1385
1386Configuration:
1387 -h, --help display this help and exit
1388 --help=short display options specific to this package
1389 --help=recursive display the short help of all the included packages
1390 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001391 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 --cache-file=FILE cache test results in FILE [disabled]
1393 -C, --config-cache alias for \`--cache-file=config.cache'
1394 -n, --no-create do not create output files
1395 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1396
Martin v. Löwis11437992002-04-12 09:54:03 +00001397Installation directories:
1398 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001399 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001401 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403By default, \`make install' will install all the files in
1404\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1405an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1406for instance \`--prefix=\$HOME'.
1407
1408For better control, use the options below.
1409
1410Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001411 --bindir=DIR user executables [EPREFIX/bin]
1412 --sbindir=DIR system admin executables [EPREFIX/sbin]
1413 --libexecdir=DIR program executables [EPREFIX/libexec]
1414 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1415 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1416 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1417 --libdir=DIR object code libraries [EPREFIX/lib]
1418 --includedir=DIR C header files [PREFIX/include]
1419 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1420 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1421 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1422 --infodir=DIR info documentation [DATAROOTDIR/info]
1423 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1424 --mandir=DIR man documentation [DATAROOTDIR/man]
1425 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1426 --htmldir=DIR html documentation [DOCDIR]
1427 --dvidir=DIR dvi documentation [DOCDIR]
1428 --pdfdir=DIR pdf documentation [DOCDIR]
1429 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430_ACEOF
1431
1432 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001433
1434System types:
1435 --build=BUILD configure for building on BUILD [guessed]
1436 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001437_ACEOF
1438fi
1439
1440if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001441 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001442 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001443 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 cat <<\_ACEOF
1445
1446Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1449 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001450 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001451 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --enable-framework[=INSTALLDIR]
1453 Build (MacOSX|Darwin) framework
1454 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001455 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001456 --enable-loadable-sqlite-extensions
1457 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --enable-ipv6 Enable ipv6 (with ipv4) support
1459 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001460 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001461 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463Optional Packages:
1464 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1465 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001466 --with-universal-archs=ARCH
1467 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001468 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001469 --with-framework-name=FRAMEWORK
1470 specify an alternate name of the framework built
1471 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001473 --with-cxx-main=<compiler>
1474 compile main() and link python executable with C++
1475 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --with-suffix=.exe set executable suffix
1477 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001478 --with-hash-algorithm=[fnv|siphash24]
1479 select hash algorithm
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001481 --with-system-expat build pyexpat module using an installed expat
1482 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001483 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001484 --with-system-libmpdec build _decimal module using an installed libmpdec
1485 library
Ned Deilyd819b932013-09-06 01:07:05 -07001486 --with-tcltk-includes='-I...'
1487 override search for Tcl and Tk include files
1488 --with-tcltk-libs='-L...'
1489 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001490 --with-dbmliborder=db1:db2:...
1491 order to check db backends for dbm. Valid value is a
1492 colon separated string with the backend names
1493 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --with(out)-threads[=DIRECTORY]
1496 disable/enable thread support
1497 --with(out)-thread[=DIRECTORY]
1498 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001500 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001502 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with-fpectl enable SIGFPE catching
1504 --with-libm=STRING math library
1505 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001506 --with(out)-computed-gotos
1507 Use computed gotos in evaluation loop (enabled by
1508 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001509 --with(out)-ensurepip=[=upgrade]
1510 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001511
1512Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001513 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 CC C compiler command
1515 CFLAGS C compiler flags
1516 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1517 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001519 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001521 CPP C preprocessor
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05001522 PKG_CONFIG path to pkg-config utility
1523 PKG_CONFIG_PATH
1524 directories to add to pkg-config's search path
1525 PKG_CONFIG_LIBDIR
1526 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001527
1528Use these variables to override the choices made by `configure' or to help
1529it to find libraries and programs with nonstandard names/locations.
1530
Georg Brandle2e15612009-05-20 18:25:10 +00001531Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001532_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001533ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001534fi
1535
1536if test "$ac_init_help" = "recursive"; then
1537 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001539 test -d "$ac_dir" ||
1540 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1541 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001542 ac_builddir=.
1543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544case "$ac_dir" in
1545.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1546*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001547 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 case $ac_top_builddir_sub in
1551 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1552 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1553 esac ;;
1554esac
1555ac_abs_top_builddir=$ac_pwd
1556ac_abs_builddir=$ac_pwd$ac_dir_suffix
1557# for backward compatibility:
1558ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001559
1560case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563 ac_top_srcdir=$ac_top_builddir_sub
1564 ac_abs_top_srcdir=$ac_pwd ;;
1565 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 ac_top_srcdir=$srcdir
1568 ac_abs_top_srcdir=$srcdir ;;
1569 *) # Relative name.
1570 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1571 ac_top_srcdir=$ac_top_build_prefix$srcdir
1572 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001573esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001576 cd "$ac_dir" || { ac_status=$?; continue; }
1577 # Check for guested configure.
1578 if test -f "$ac_srcdir/configure.gnu"; then
1579 echo &&
1580 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1581 elif test -f "$ac_srcdir/configure"; then
1582 echo &&
1583 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001585 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 fi || ac_status=$?
1587 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 done
1589fi
1590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001592if $ac_init_version; then
1593 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001594python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001595generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001596
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001597Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001598This configure script is free software; the Free Software Foundation
1599gives unlimited permission to copy, distribute and modify it.
1600_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001603
1604## ------------------------ ##
1605## Autoconf initialization. ##
1606## ------------------------ ##
1607
1608# ac_fn_c_try_compile LINENO
1609# --------------------------
1610# Try to compile conftest.$ac_ext, and return whether this succeeded.
1611ac_fn_c_try_compile ()
1612{
1613 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1614 rm -f conftest.$ac_objext
1615 if { { ac_try="$ac_compile"
1616case "(($ac_try" in
1617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1618 *) ac_try_echo=$ac_try;;
1619esac
1620eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1621$as_echo "$ac_try_echo"; } >&5
1622 (eval "$ac_compile") 2>conftest.err
1623 ac_status=$?
1624 if test -s conftest.err; then
1625 grep -v '^ *+' conftest.err >conftest.er1
1626 cat conftest.er1 >&5
1627 mv -f conftest.er1 conftest.err
1628 fi
1629 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1630 test $ac_status = 0; } && {
1631 test -z "$ac_c_werror_flag" ||
1632 test ! -s conftest.err
1633 } && test -s conftest.$ac_objext; then :
1634 ac_retval=0
1635else
1636 $as_echo "$as_me: failed program was:" >&5
1637sed 's/^/| /' conftest.$ac_ext >&5
1638
1639 ac_retval=1
1640fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001641 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001642 as_fn_set_status $ac_retval
1643
1644} # ac_fn_c_try_compile
1645
Matthias Kloseb9621712010-04-24 17:59:49 +00001646# ac_fn_c_try_link LINENO
1647# -----------------------
1648# Try to link conftest.$ac_ext, and return whether this succeeded.
1649ac_fn_c_try_link ()
1650{
1651 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652 rm -f conftest.$ac_objext conftest$ac_exeext
1653 if { { ac_try="$ac_link"
1654case "(($ac_try" in
1655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1656 *) ac_try_echo=$ac_try;;
1657esac
1658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1659$as_echo "$ac_try_echo"; } >&5
1660 (eval "$ac_link") 2>conftest.err
1661 ac_status=$?
1662 if test -s conftest.err; then
1663 grep -v '^ *+' conftest.err >conftest.er1
1664 cat conftest.er1 >&5
1665 mv -f conftest.er1 conftest.err
1666 fi
1667 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1668 test $ac_status = 0; } && {
1669 test -z "$ac_c_werror_flag" ||
1670 test ! -s conftest.err
1671 } && test -s conftest$ac_exeext && {
1672 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001673 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 }; then :
1675 ac_retval=0
1676else
1677 $as_echo "$as_me: failed program was:" >&5
1678sed 's/^/| /' conftest.$ac_ext >&5
1679
1680 ac_retval=1
1681fi
1682 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1683 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1684 # interfere with the next link command; also delete a directory that is
1685 # left behind by Apple's compiler. We do this before executing the actions.
1686 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001687 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001688 as_fn_set_status $ac_retval
1689
1690} # ac_fn_c_try_link
1691
Matthias Kloseb9621712010-04-24 17:59:49 +00001692# ac_fn_c_try_cpp LINENO
1693# ----------------------
1694# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1695ac_fn_c_try_cpp ()
1696{
1697 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1698 if { { ac_try="$ac_cpp conftest.$ac_ext"
1699case "(($ac_try" in
1700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1701 *) ac_try_echo=$ac_try;;
1702esac
1703eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1704$as_echo "$ac_try_echo"; } >&5
1705 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1706 ac_status=$?
1707 if test -s conftest.err; then
1708 grep -v '^ *+' conftest.err >conftest.er1
1709 cat conftest.er1 >&5
1710 mv -f conftest.er1 conftest.err
1711 fi
1712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001713 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001714 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1715 test ! -s conftest.err
1716 }; then :
1717 ac_retval=0
1718else
1719 $as_echo "$as_me: failed program was:" >&5
1720sed 's/^/| /' conftest.$ac_ext >&5
1721
1722 ac_retval=1
1723fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001724 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001725 as_fn_set_status $ac_retval
1726
1727} # ac_fn_c_try_cpp
1728
1729# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1730# -------------------------------------------------------
1731# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1732# the include files in INCLUDES and setting the cache variable VAR
1733# accordingly.
1734ac_fn_c_check_header_mongrel ()
1735{
1736 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001737 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1739$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001740if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 $as_echo_n "(cached) " >&6
1742fi
1743eval ac_res=\$$3
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1745$as_echo "$ac_res" >&6; }
1746else
1747 # Is the header compilable?
1748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1749$as_echo_n "checking $2 usability... " >&6; }
1750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1751/* end confdefs.h. */
1752$4
1753#include <$2>
1754_ACEOF
1755if ac_fn_c_try_compile "$LINENO"; then :
1756 ac_header_compiler=yes
1757else
1758 ac_header_compiler=no
1759fi
1760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1762$as_echo "$ac_header_compiler" >&6; }
1763
1764# Is the header present?
1765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1766$as_echo_n "checking $2 presence... " >&6; }
1767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1768/* end confdefs.h. */
1769#include <$2>
1770_ACEOF
1771if ac_fn_c_try_cpp "$LINENO"; then :
1772 ac_header_preproc=yes
1773else
1774 ac_header_preproc=no
1775fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001776rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1778$as_echo "$ac_header_preproc" >&6; }
1779
1780# So? What about this header?
1781case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1782 yes:no: )
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1784$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1786$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1787 ;;
1788 no:yes:* )
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1790$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1792$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1794$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1796$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1798$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001799( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001800## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001801## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001802 ) | sed "s/^/$as_me: WARNING: /" >&2
1803 ;;
1804esac
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1806$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001807if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001808 $as_echo_n "(cached) " >&6
1809else
1810 eval "$3=\$ac_header_compiler"
1811fi
1812eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
1815fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001816 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001817
1818} # ac_fn_c_check_header_mongrel
1819
1820# ac_fn_c_try_run LINENO
1821# ----------------------
1822# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1823# that executables *can* be run.
1824ac_fn_c_try_run ()
1825{
1826 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1827 if { { ac_try="$ac_link"
1828case "(($ac_try" in
1829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1830 *) ac_try_echo=$ac_try;;
1831esac
1832eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1833$as_echo "$ac_try_echo"; } >&5
1834 (eval "$ac_link") 2>&5
1835 ac_status=$?
1836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1837 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1838 { { case "(($ac_try" in
1839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1840 *) ac_try_echo=$ac_try;;
1841esac
1842eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1843$as_echo "$ac_try_echo"; } >&5
1844 (eval "$ac_try") 2>&5
1845 ac_status=$?
1846 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1847 test $ac_status = 0; }; }; then :
1848 ac_retval=0
1849else
1850 $as_echo "$as_me: program exited with status $ac_status" >&5
1851 $as_echo "$as_me: failed program was:" >&5
1852sed 's/^/| /' conftest.$ac_ext >&5
1853
1854 ac_retval=$ac_status
1855fi
1856 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001858 as_fn_set_status $ac_retval
1859
1860} # ac_fn_c_try_run
1861
1862# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1863# -------------------------------------------------------
1864# Tests whether HEADER exists and can be compiled using the include files in
1865# INCLUDES, setting the cache variable VAR accordingly.
1866ac_fn_c_check_header_compile ()
1867{
1868 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1870$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001871if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001872 $as_echo_n "(cached) " >&6
1873else
1874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1875/* end confdefs.h. */
1876$4
1877#include <$2>
1878_ACEOF
1879if ac_fn_c_try_compile "$LINENO"; then :
1880 eval "$3=yes"
1881else
1882 eval "$3=no"
1883fi
1884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1885fi
1886eval ac_res=\$$3
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1888$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001889 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001890
1891} # ac_fn_c_check_header_compile
1892
Matthias Kloseb9621712010-04-24 17:59:49 +00001893# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1894# -------------------------------------------
1895# Tests whether TYPE exists after having included INCLUDES, setting cache
1896# variable VAR accordingly.
1897ac_fn_c_check_type ()
1898{
1899 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1901$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001902if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001903 $as_echo_n "(cached) " >&6
1904else
1905 eval "$3=no"
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h. */
1908$4
1909int
1910main ()
1911{
1912if (sizeof ($2))
1913 return 0;
1914 ;
1915 return 0;
1916}
1917_ACEOF
1918if ac_fn_c_try_compile "$LINENO"; then :
1919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1920/* end confdefs.h. */
1921$4
1922int
1923main ()
1924{
1925if (sizeof (($2)))
1926 return 0;
1927 ;
1928 return 0;
1929}
1930_ACEOF
1931if ac_fn_c_try_compile "$LINENO"; then :
1932
1933else
1934 eval "$3=yes"
1935fi
1936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1937fi
1938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1939fi
1940eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001943 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001944
1945} # ac_fn_c_check_type
1946
1947# ac_fn_c_find_uintX_t LINENO BITS VAR
1948# ------------------------------------
1949# Finds an unsigned integer type with width BITS, setting cache variable VAR
1950# accordingly.
1951ac_fn_c_find_uintX_t ()
1952{
1953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1955$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001956if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001957 $as_echo_n "(cached) " >&6
1958else
1959 eval "$3=no"
1960 # Order is important - never check a type that is potentially smaller
1961 # than half of the expected target width.
1962 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1963 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
1966$ac_includes_default
1967int
1968main ()
1969{
1970static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001971test_array [0] = 0;
1972return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001973
1974 ;
1975 return 0;
1976}
1977_ACEOF
1978if ac_fn_c_try_compile "$LINENO"; then :
1979 case $ac_type in #(
1980 uint$2_t) :
1981 eval "$3=yes" ;; #(
1982 *) :
1983 eval "$3=\$ac_type" ;;
1984esac
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001987 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989else
1990 break
1991fi
1992 done
1993fi
1994eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001998
1999} # ac_fn_c_find_uintX_t
2000
2001# ac_fn_c_find_intX_t LINENO BITS VAR
2002# -----------------------------------
2003# Finds a signed integer type with width BITS, setting cache variable VAR
2004# accordingly.
2005ac_fn_c_find_intX_t ()
2006{
2007 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2009$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002010if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002011 $as_echo_n "(cached) " >&6
2012else
2013 eval "$3=no"
2014 # Order is important - never check a type that is potentially smaller
2015 # than half of the expected target width.
2016 for ac_type in int$2_t 'int' 'long int' \
2017 'long long int' 'short int' 'signed char'; do
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h. */
2020$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002021 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002022int
2023main ()
2024{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002025static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002026test_array [0] = 0;
2027return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002028
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002037 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002038int
2039main ()
2040{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002041static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002042 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002043test_array [0] = 0;
2044return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051
2052else
2053 case $ac_type in #(
2054 int$2_t) :
2055 eval "$3=yes" ;; #(
2056 *) :
2057 eval "$3=\$ac_type" ;;
2058esac
2059fi
2060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2061fi
2062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002063 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065else
2066 break
2067fi
2068 done
2069fi
2070eval ac_res=\$$3
2071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2072$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002073 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002074
2075} # ac_fn_c_find_intX_t
2076
2077# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2078# --------------------------------------------
2079# Tries to find the compile-time value of EXPR in a program that includes
2080# INCLUDES, setting VAR accordingly. Returns whether the value could be
2081# computed
2082ac_fn_c_compute_int ()
2083{
2084 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2085 if test "$cross_compiling" = yes; then
2086 # Depending upon the size, compute the lo and hi bounds.
2087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088/* end confdefs.h. */
2089$4
2090int
2091main ()
2092{
2093static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002094test_array [0] = 0;
2095return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002096
2097 ;
2098 return 0;
2099}
2100_ACEOF
2101if ac_fn_c_try_compile "$LINENO"; then :
2102 ac_lo=0 ac_mid=0
2103 while :; do
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002111test_array [0] = 0;
2112return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid; break
2120else
2121 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2122 if test $ac_lo -le $ac_mid; then
2123 ac_lo= ac_hi=
2124 break
2125 fi
2126 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2127fi
2128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2129 done
2130else
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134int
2135main ()
2136{
2137static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002138test_array [0] = 0;
2139return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_compile "$LINENO"; then :
2146 ac_hi=-1 ac_mid=-1
2147 while :; do
2148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2149/* end confdefs.h. */
2150$4
2151int
2152main ()
2153{
2154static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002155test_array [0] = 0;
2156return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002157
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162if ac_fn_c_try_compile "$LINENO"; then :
2163 ac_lo=$ac_mid; break
2164else
2165 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2166 if test $ac_mid -le $ac_hi; then
2167 ac_lo= ac_hi=
2168 break
2169 fi
2170 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2171fi
2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173 done
2174else
2175 ac_lo= ac_hi=
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178fi
2179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2180# Binary search between lo and hi bounds.
2181while test "x$ac_lo" != "x$ac_hi"; do
2182 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185$4
2186int
2187main ()
2188{
2189static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002190test_array [0] = 0;
2191return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002192
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_c_try_compile "$LINENO"; then :
2198 ac_hi=$ac_mid
2199else
2200 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2201fi
2202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2203done
2204case $ac_lo in #((
2205?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2206'') ac_retval=1 ;;
2207esac
2208 else
2209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210/* end confdefs.h. */
2211$4
2212static long int longval () { return $2; }
2213static unsigned long int ulongval () { return $2; }
2214#include <stdio.h>
2215#include <stdlib.h>
2216int
2217main ()
2218{
2219
2220 FILE *f = fopen ("conftest.val", "w");
2221 if (! f)
2222 return 1;
2223 if (($2) < 0)
2224 {
2225 long int i = longval ();
2226 if (i != ($2))
2227 return 1;
2228 fprintf (f, "%ld", i);
2229 }
2230 else
2231 {
2232 unsigned long int i = ulongval ();
2233 if (i != ($2))
2234 return 1;
2235 fprintf (f, "%lu", i);
2236 }
2237 /* Do not output a trailing newline, as this causes \r\n confusion
2238 on some platforms. */
2239 return ferror (f) || fclose (f) != 0;
2240
2241 ;
2242 return 0;
2243}
2244_ACEOF
2245if ac_fn_c_try_run "$LINENO"; then :
2246 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2247else
2248 ac_retval=1
2249fi
2250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2251 conftest.$ac_objext conftest.beam conftest.$ac_ext
2252rm -f conftest.val
2253
2254 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002255 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002256 as_fn_set_status $ac_retval
2257
2258} # ac_fn_c_compute_int
2259
2260# ac_fn_c_check_func LINENO FUNC VAR
2261# ----------------------------------
2262# Tests whether FUNC exists, setting the cache variable VAR accordingly
2263ac_fn_c_check_func ()
2264{
2265 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2267$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002268if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002269 $as_echo_n "(cached) " >&6
2270else
2271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2272/* end confdefs.h. */
2273/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2274 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2275#define $2 innocuous_$2
2276
2277/* System header to define __stub macros and hopefully few prototypes,
2278 which can conflict with char $2 (); below.
2279 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2280 <limits.h> exists even on freestanding compilers. */
2281
2282#ifdef __STDC__
2283# include <limits.h>
2284#else
2285# include <assert.h>
2286#endif
2287
2288#undef $2
2289
2290/* Override any GCC internal prototype to avoid an error.
2291 Use char because int might match the return type of a GCC
2292 builtin and then its argument prototype would still apply. */
2293#ifdef __cplusplus
2294extern "C"
2295#endif
2296char $2 ();
2297/* The GNU C library defines this for functions which it implements
2298 to always fail with ENOSYS. Some functions are actually named
2299 something starting with __ and the normal name is an alias. */
2300#if defined __stub_$2 || defined __stub___$2
2301choke me
2302#endif
2303
2304int
2305main ()
2306{
2307return $2 ();
2308 ;
2309 return 0;
2310}
2311_ACEOF
2312if ac_fn_c_try_link "$LINENO"; then :
2313 eval "$3=yes"
2314else
2315 eval "$3=no"
2316fi
2317rm -f core conftest.err conftest.$ac_objext \
2318 conftest$ac_exeext conftest.$ac_ext
2319fi
2320eval ac_res=\$$3
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2322$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002323 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002324
2325} # ac_fn_c_check_func
2326
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002327# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2328# ---------------------------------------------
2329# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2330# accordingly.
2331ac_fn_c_check_decl ()
2332{
2333 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2334 as_decl_name=`echo $2|sed 's/ *(.*//'`
2335 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2337$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2338if eval \${$3+:} false; then :
2339 $as_echo_n "(cached) " >&6
2340else
2341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2342/* end confdefs.h. */
2343$4
2344int
2345main ()
2346{
2347#ifndef $as_decl_name
2348#ifdef __cplusplus
2349 (void) $as_decl_use;
2350#else
2351 (void) $as_decl_name;
2352#endif
2353#endif
2354
2355 ;
2356 return 0;
2357}
2358_ACEOF
2359if ac_fn_c_try_compile "$LINENO"; then :
2360 eval "$3=yes"
2361else
2362 eval "$3=no"
2363fi
2364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2365fi
2366eval ac_res=\$$3
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2368$as_echo "$ac_res" >&6; }
2369 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2370
2371} # ac_fn_c_check_decl
2372
Matthias Kloseb9621712010-04-24 17:59:49 +00002373# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2374# ----------------------------------------------------
2375# Tries to find if the field MEMBER exists in type AGGR, after including
2376# INCLUDES, setting cache variable VAR accordingly.
2377ac_fn_c_check_member ()
2378{
2379 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2381$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002382if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002383 $as_echo_n "(cached) " >&6
2384else
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386/* end confdefs.h. */
2387$5
2388int
2389main ()
2390{
2391static $2 ac_aggr;
2392if (ac_aggr.$3)
2393return 0;
2394 ;
2395 return 0;
2396}
2397_ACEOF
2398if ac_fn_c_try_compile "$LINENO"; then :
2399 eval "$4=yes"
2400else
2401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2402/* end confdefs.h. */
2403$5
2404int
2405main ()
2406{
2407static $2 ac_aggr;
2408if (sizeof ac_aggr.$3)
2409return 0;
2410 ;
2411 return 0;
2412}
2413_ACEOF
2414if ac_fn_c_try_compile "$LINENO"; then :
2415 eval "$4=yes"
2416else
2417 eval "$4=no"
2418fi
2419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2420fi
2421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2422fi
2423eval ac_res=\$$4
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2425$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002426 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002427
2428} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002429cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002430This file contains any messages produced by compilers while
2431running configure, to aid debugging if configure makes a mistake.
2432
Georg Brandl08a90122012-09-29 09:34:13 +02002433It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002434generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002435
2436 $ $0 $@
2437
2438_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002440{
2441cat <<_ASUNAME
2442## --------- ##
2443## Platform. ##
2444## --------- ##
2445
2446hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2447uname -m = `(uname -m) 2>/dev/null || echo unknown`
2448uname -r = `(uname -r) 2>/dev/null || echo unknown`
2449uname -s = `(uname -s) 2>/dev/null || echo unknown`
2450uname -v = `(uname -v) 2>/dev/null || echo unknown`
2451
2452/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2453/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2454
2455/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2456/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2457/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002459/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2460/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2461/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2462
2463_ASUNAME
2464
2465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2466for as_dir in $PATH
2467do
2468 IFS=$as_save_IFS
2469 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 $as_echo "PATH: $as_dir"
2471 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002473
2474} >&5
2475
2476cat >&5 <<_ACEOF
2477
2478
2479## ----------- ##
2480## Core tests. ##
2481## ----------- ##
2482
2483_ACEOF
2484
2485
2486# Keep a trace of the command line.
2487# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002488# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002489# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002490# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002491ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002492ac_configure_args0=
2493ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002494ac_must_keep_next=false
2495for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002496do
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 for ac_arg
2498 do
2499 case $ac_arg in
2500 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2501 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2502 | -silent | --silent | --silen | --sile | --sil)
2503 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 esac
2507 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002512 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002514 case $ac_arg in
2515 *=* | --config-cache | -C | -disable-* | --disable-* \
2516 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2517 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2518 | -with-* | --with-* | -without-* | --without-* | --x)
2519 case "$ac_configure_args0 " in
2520 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2521 esac
2522 ;;
2523 -* ) ac_must_keep_next=true ;;
2524 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 ;;
2528 esac
2529 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002530done
Matthias Kloseb9621712010-04-24 17:59:49 +00002531{ ac_configure_args0=; unset ac_configure_args0;}
2532{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
2534# When interrupted or exit'd, cleanup temporary files, and complete
2535# config.log. We remove comments because anyway the quotes in there
2536# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537# WARNING: Use '\'' to represent an apostrophe within the trap.
2538# 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 +00002539trap 'exit_status=$?
2540 # Save into config.log some information that might help in debugging.
2541 {
2542 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002543
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002544 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002545## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002546## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 echo
2548 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549(
2550 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2551 eval ac_val=\$$ac_var
2552 case $ac_val in #(
2553 *${as_nl}*)
2554 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2556$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557 esac
2558 case $ac_var in #(
2559 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2561 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 esac ;;
2563 esac
2564 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2567 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 "s/'\''/'\''\\\\'\'''\''/g;
2570 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2571 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002572 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002574 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 esac |
2576 sort
2577)
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002579
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002581## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002582## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002583 echo
2584 for ac_var in $ac_subst_vars
2585 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586 eval ac_val=\$$ac_var
2587 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002591 done | sort
2592 echo
2593
2594 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002595 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002597## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002598 echo
2599 for ac_var in $ac_subst_files
2600 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 eval ac_val=\$$ac_var
2602 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002606 done | sort
2607 echo
2608 fi
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002611 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002612## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002613## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 echo
2617 fi
2618 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 $as_echo "$as_me: caught signal $ac_signal"
2620 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 rm -f core *.core core.conftest.* &&
2623 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002626for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002628done
2629ac_signal=0
2630
2631# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002633
Matthias Kloseb9621712010-04-24 17:59:49 +00002634$as_echo "/* confdefs.h */" > confdefs.h
2635
Martin v. Löwis11437992002-04-12 09:54:03 +00002636# Predefined preprocessor variables.
2637
2638cat >>confdefs.h <<_ACEOF
2639#define PACKAGE_NAME "$PACKAGE_NAME"
2640_ACEOF
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642cat >>confdefs.h <<_ACEOF
2643#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2644_ACEOF
2645
Martin v. Löwis11437992002-04-12 09:54:03 +00002646cat >>confdefs.h <<_ACEOF
2647#define PACKAGE_VERSION "$PACKAGE_VERSION"
2648_ACEOF
2649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650cat >>confdefs.h <<_ACEOF
2651#define PACKAGE_STRING "$PACKAGE_STRING"
2652_ACEOF
2653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654cat >>confdefs.h <<_ACEOF
2655#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2656_ACEOF
2657
Matthias Kloseb9621712010-04-24 17:59:49 +00002658cat >>confdefs.h <<_ACEOF
2659#define PACKAGE_URL "$PACKAGE_URL"
2660_ACEOF
2661
Martin v. Löwis11437992002-04-12 09:54:03 +00002662
2663# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664# Prefer an explicitly selected file to automatically selected ones.
2665ac_site_file1=NONE
2666ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002668 # We do not want a PATH search for config.site.
2669 case $CONFIG_SITE in #((
2670 -*) ac_site_file1=./$CONFIG_SITE;;
2671 */*) ac_site_file1=$CONFIG_SITE;;
2672 *) ac_site_file1=./$CONFIG_SITE;;
2673 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 ac_site_file1=$prefix/share/config.site
2676 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002677else
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 ac_site_file1=$ac_default_prefix/share/config.site
2679 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002681for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682do
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 test "x$ac_site_file" = xNONE && continue
2684 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2686$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002688 . "$ac_site_file" \
2689 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2691as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002692See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693 fi
2694done
2695
2696if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 # Some versions of bash will fail to source /dev/null (special files
2698 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2699 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2701$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002703 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2704 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 esac
2706 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707else
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2709$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 >$cache_file
2711fi
2712
2713# Check that the precious variables saved in the cache have kept the same
2714# value.
2715ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002716for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2718 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002719 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2720 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 case $ac_old_set,$ac_new_set in
2722 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002723 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2724$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 +00002725 ac_cache_corrupted=: ;;
2726 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2728$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 ac_cache_corrupted=: ;;
2730 ,);;
2731 *)
2732 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002733 # differences in whitespace do not lead to failure.
2734 ac_old_val_w=`echo x $ac_old_val`
2735 ac_new_val_w=`echo x $ac_new_val`
2736 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2738$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2739 ac_cache_corrupted=:
2740 else
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2742$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2743 eval $ac_var=\$ac_old_val
2744 fi
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2746$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2748$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 fi;;
2750 esac
2751 # Pass precious variables to config.status.
2752 if test "$ac_new_set" = set; then
2753 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002754 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 *) ac_arg=$ac_var=$ac_new_val ;;
2756 esac
2757 case " $ac_configure_args " in
2758 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002759 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 esac
2761 fi
2762done
2763if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002764 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2767$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002768 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002770## -------------------- ##
2771## Main body of script. ##
2772## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002773
Guido van Rossum7f43da71994-08-01 12:15:30 +00002774ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002775ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002776ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2777ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2778ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002779
Guido van Rossum627b2d71993-12-24 10:39:16 +00002780
Michael W. Hudson54241132001-12-07 15:38:26 +00002781
Trent Nelson4d4ec652012-10-16 08:51:24 -04002782
Trent Nelson5595ab52012-10-17 04:47:31 -04002783if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002784 # If we're building out-of-tree, we need to make sure the following
2785 # resources get picked up before their $srcdir counterparts.
2786 # Objects/ -> typeslots.inc
2787 # Include/ -> Python-ast.h, graminit.h
2788 # Python/ -> importlib.h
2789 # (A side effect of this is that these resources will automatically be
2790 # regenerated when building out-of-tree, regardless of whether or not
2791 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2792 # off.)
2793 BASECPPFLAGS="-IObjects -IInclude -IPython"
2794else
2795 BASECPPFLAGS=""
2796fi
2797
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002798
2799
2800
2801
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002802if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803then
2804# Extract the first word of "hg", so it can be a program name with args.
2805set dummy hg; ac_word=$2
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2807$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002808if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002809 $as_echo_n "(cached) " >&6
2810else
2811 if test -n "$HAS_HG"; then
2812 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2813else
2814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2815for as_dir in $PATH
2816do
2817 IFS=$as_save_IFS
2818 test -z "$as_dir" && as_dir=.
2819 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002821 ac_cv_prog_HAS_HG="found"
2822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2823 break 2
2824 fi
2825done
2826 done
2827IFS=$as_save_IFS
2828
2829 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2830fi
2831fi
2832HAS_HG=$ac_cv_prog_HAS_HG
2833if test -n "$HAS_HG"; then
2834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2835$as_echo "$HAS_HG" >&6; }
2836else
2837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2838$as_echo "no" >&6; }
2839fi
2840
2841
2842else
2843HAS_HG=no-repository
2844fi
2845if test $HAS_HG = found
2846then
2847 HGVERSION="hg id -i \$(srcdir)"
2848 HGTAG="hg id -t \$(srcdir)"
2849 HGBRANCH="hg id -b \$(srcdir)"
2850else
2851 HGVERSION=""
2852 HGTAG=""
2853 HGBRANCH=""
2854fi
2855
2856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002857ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002858
2859
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002860ac_aux_dir=
2861for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2862 if test -f "$ac_dir/install-sh"; then
2863 ac_aux_dir=$ac_dir
2864 ac_install_sh="$ac_aux_dir/install-sh -c"
2865 break
2866 elif test -f "$ac_dir/install.sh"; then
2867 ac_aux_dir=$ac_dir
2868 ac_install_sh="$ac_aux_dir/install.sh -c"
2869 break
2870 elif test -f "$ac_dir/shtool"; then
2871 ac_aux_dir=$ac_dir
2872 ac_install_sh="$ac_aux_dir/shtool install -c"
2873 break
2874 fi
2875done
2876if test -z "$ac_aux_dir"; then
2877 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2878fi
2879
2880# These three variables are undocumented and unsupported,
2881# and are intended to be withdrawn in a future Autoconf release.
2882# They can cause serious problems if a builder's source tree is in a directory
2883# whose full name contains unusual characters.
2884ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2885ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2886ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2887
2888
2889# Make sure we can run config.sub.
2890$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2891 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2892
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2894$as_echo_n "checking build system type... " >&6; }
2895if ${ac_cv_build+:} false; then :
2896 $as_echo_n "(cached) " >&6
2897else
2898 ac_build_alias=$build_alias
2899test "x$ac_build_alias" = x &&
2900 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2901test "x$ac_build_alias" = x &&
2902 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2903ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2904 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2905
2906fi
2907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2908$as_echo "$ac_cv_build" >&6; }
2909case $ac_cv_build in
2910*-*-*) ;;
2911*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2912esac
2913build=$ac_cv_build
2914ac_save_IFS=$IFS; IFS='-'
2915set x $ac_cv_build
2916shift
2917build_cpu=$1
2918build_vendor=$2
2919shift; shift
2920# Remember, the first character of IFS is used to create $*,
2921# except with old shells:
2922build_os=$*
2923IFS=$ac_save_IFS
2924case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2925
2926
2927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2928$as_echo_n "checking host system type... " >&6; }
2929if ${ac_cv_host+:} false; then :
2930 $as_echo_n "(cached) " >&6
2931else
2932 if test "x$host_alias" = x; then
2933 ac_cv_host=$ac_cv_build
2934else
2935 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2936 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2937fi
2938
2939fi
2940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2941$as_echo "$ac_cv_host" >&6; }
2942case $ac_cv_host in
2943*-*-*) ;;
2944*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2945esac
2946host=$ac_cv_host
2947ac_save_IFS=$IFS; IFS='-'
2948set x $ac_cv_host
2949shift
2950host_cpu=$1
2951host_vendor=$2
2952shift; shift
2953# Remember, the first character of IFS is used to create $*,
2954# except with old shells:
2955host_os=$*
2956IFS=$ac_save_IFS
2957case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2958
2959
2960
doko@python.orga10e4a92013-01-25 18:45:12 +01002961
2962
Ned Deilyfcbc2462014-08-22 13:32:49 -07002963# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2964rm -f pybuilddir.txt
2965
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002966if test "$cross_compiling" = yes; then
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2968$as_echo_n "checking for python interpreter for cross build... " >&6; }
2969 if test -z "$PYTHON_FOR_BUILD"; then
2970 for interp in python$PACKAGE_VERSION python3 python; do
2971 which $interp >/dev/null 2>&1 || continue
2972 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2973 break
2974 fi
2975 interp=
2976 done
2977 if test x$interp = x; then
2978 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2979 fi
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2981$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002982 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 +02002983 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002984elif test "$cross_compiling" = maybe; then
2985 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002986else
2987 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2988fi
2989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991
Benjamin Petersond23f8222009-04-05 19:13:16 +00002992if test "$prefix" != "/"; then
2993 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2994fi
2995
2996
Martin v. Löwis11437992002-04-12 09:54:03 +00002997
2998
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002999# We don't use PACKAGE_ variables, and they cause conflicts
3000# with other autoconf-based packages that include Python.h
3001grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3002rm confdefs.h
3003mv confdefs.h.new confdefs.h
3004
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003005
Georg Brandl08a90122012-09-29 09:34:13 +02003006VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003007
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003008# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003009
3010SOVERSION=1.0
3011
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012# The later defininition of _XOPEN_SOURCE disables certain features
3013# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003016
3017
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003018# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3019# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3020# them.
3021
Matthias Kloseb9621712010-04-24 17:59:49 +00003022$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003023
3024
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003025# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3026# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3027# them.
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003030
3031
Martin v. Löwisd6320502004-08-12 13:45:08 +00003032# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3033# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003036
3037
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003038# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3039# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3040# them.
3041
Matthias Kloseb9621712010-04-24 17:59:49 +00003042$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003043
3044
3045
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003046define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003047
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003048# Arguments passed to configure.
3049
3050CONFIG_ARGS="$ac_configure_args"
3051
Matthias Kloseb9621712010-04-24 17:59:49 +00003052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3053$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003055if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057 case $enableval in
3058 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003059 # Locate the best usable SDK, see Mac/README.txt for more
3060 # information
3061 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003062 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3065 if test ! -d "${enableval}"
3066 then
3067 enableval=/
3068 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003070 ;;
3071 esac
3072 case $enableval in
3073 no)
3074 UNIVERSALSDK=
3075 enable_universalsdk=
3076 ;;
3077 *)
3078 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003079 if test ! -d "${UNIVERSALSDK}"
3080 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003081 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003082 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083 ;;
3084 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003085
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003086
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087else
3088
3089 UNIVERSALSDK=
3090 enable_universalsdk=
3091
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003092fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003093
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003094if test -n "${UNIVERSALSDK}"
3095then
Matthias Kloseb9621712010-04-24 17:59:49 +00003096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3097$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003098else
Matthias Kloseb9621712010-04-24 17:59:49 +00003099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3100$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003101fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003104
Ned Deily87adb6e2013-10-18 21:09:56 -07003105ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003106
Ned Deilycbfb9a52012-06-23 16:02:19 -07003107# For backward compatibility reasons we prefer to select '32-bit' if available,
3108# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003109UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003110if test "`uname -s`" = "Darwin"
3111then
3112 if test -n "${UNIVERSALSDK}"
3113 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003114 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003115 then
3116 UNIVERSAL_ARCHS="intel"
3117 fi
3118 fi
3119fi
3120
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003121
Matthias Kloseb9621712010-04-24 17:59:49 +00003122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3123$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003124
3125# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003126if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003128 UNIVERSAL_ARCHS="$withval"
3129
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003130fi
3131
Ned Deily87adb6e2013-10-18 21:09:56 -07003132if test -n "${UNIVERSALSDK}"
3133then
3134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3135$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3136else
3137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3138$as_echo "no" >&6; }
3139fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003140
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003141
3142# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003143if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003144 withval=$with_framework_name;
3145 PYTHONFRAMEWORK=${withval}
3146 PYTHONFRAMEWORKDIR=${withval}.framework
3147 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3148
3149else
3150
3151 PYTHONFRAMEWORK=Python
3152 PYTHONFRAMEWORKDIR=Python.framework
3153 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3154
3155fi
3156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003157# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003158if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003159 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003160 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003161 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003162 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003163 esac
3164 case $enableval in
3165 no)
3166 PYTHONFRAMEWORK=
3167 PYTHONFRAMEWORKDIR=no-framework
3168 PYTHONFRAMEWORKPREFIX=
3169 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003170 FRAMEWORKINSTALLFIRST=
3171 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003172 FRAMEWORKALTINSTALLFIRST=
3173 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003174 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003175 if test "x${prefix}" = "xNONE"; then
3176 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3177 else
3178 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3179 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003180 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003181 ;;
3182 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003183 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003186 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003187 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3188 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003189 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003190 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003191
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003192 if test "x${prefix}" = "xNONE" ; then
3193 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003194
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003195 else
3196 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3197 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003198
3199 case "${enableval}" in
3200 /System*)
3201 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3202 if test "${prefix}" = "NONE" ; then
3203 # See below
3204 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3205 fi
3206 ;;
3207
3208 /Library*)
3209 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3210 ;;
3211
3212 */Library/Frameworks)
3213 MDIR="`dirname "${enableval}"`"
3214 MDIR="`dirname "${MDIR}"`"
3215 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3216
3217 if test "${prefix}" = "NONE"; then
3218 # User hasn't specified the
3219 # --prefix option, but wants to install
3220 # the framework in a non-default location,
3221 # ensure that the compatibility links get
3222 # installed relative to that prefix as well
3223 # instead of in /usr/local.
3224 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3225 fi
3226 ;;
3227
3228 *)
3229 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3230 ;;
3231 esac
3232
Jack Jansen127e56e2001-09-11 14:41:54 +00003233 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003234
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003235 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003236 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003237 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003239 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003241 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3242
3243 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3244
Jack Jansene578a632001-08-15 01:27:14 +00003245 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003246
Guido van Rossum563e7081996-09-10 18:20:48 +00003247else
Martin v. Löwis11437992002-04-12 09:54:03 +00003248
Jack Jansene578a632001-08-15 01:27:14 +00003249 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003250 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003251 PYTHONFRAMEWORKPREFIX=
3252 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003253 FRAMEWORKINSTALLFIRST=
3254 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003255 FRAMEWORKALTINSTALLFIRST=
3256 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003257 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003258 if test "x${prefix}" = "xNONE" ; then
3259 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3260 else
3261 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3262 fi
Jack Jansene578a632001-08-15 01:27:14 +00003263 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003264
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003266fi
3267
Thomas Wouters477c8d52006-05-27 19:21:47 +00003268
3269
Michael W. Hudson54241132001-12-07 15:38:26 +00003270
3271
3272
3273
Jack Jansene578a632001-08-15 01:27:14 +00003274
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003275
3276
3277
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003278
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003279
Ned Deilyb8f944f2013-11-21 22:42:25 -08003280
Jack Jansene578a632001-08-15 01:27:14 +00003281##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003282## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003283## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003284##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285# Set name for machine-dependent library files
3286
Matthias Kloseb9621712010-04-24 17:59:49 +00003287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3288$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289if test -z "$MACHDEP"
3290then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 # avoid using uname for cross builds
3292 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003293 # ac_sys_system and ac_sys_release are used for setting
3294 # a lot of different things including 'define_xopen_source'
3295 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 case "$host" in
3297 *-*-linux*)
3298 ac_sys_system=Linux
3299 ;;
3300 *-*-cygwin*)
3301 ac_sys_system=Cygwin
3302 ;;
3303 *)
3304 # for now, limit cross builds to known configurations
3305 MACHDEP="unknown"
3306 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3307 esac
3308 ac_sys_release=
3309 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003310 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003311 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003312 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003313 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003314 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003315 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003316 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003317 fi
3318 ac_md_system=`echo $ac_sys_system |
3319 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3320 ac_md_release=`echo $ac_sys_release |
3321 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3322 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003323
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003324 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003325 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003326 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003327 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003328 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003329 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003330 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003331fi
Guido van Rossum91922671997-10-09 20:24:13 +00003332
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003333
3334if test "$cross_compiling" = yes; then
3335 case "$host" in
3336 *-*-linux*)
3337 case "$host_cpu" in
3338 arm*)
3339 _host_cpu=arm
3340 ;;
3341 *)
3342 _host_cpu=$host_cpu
3343 esac
3344 ;;
3345 *-*-cygwin*)
3346 _host_cpu=
3347 ;;
3348 *)
3349 # for now, limit cross builds to known configurations
3350 MACHDEP="unknown"
3351 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3352 esac
3353 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3354fi
3355
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003356# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3357# disable features if it is defined, without any means to access these
3358# features as extensions. For these systems, we skip the definition of
3359# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3360# some feature, make sure there is no alternative way to access this
3361# feature. Also, when using wildcards, make sure you have verified the
3362# need for not defining _XOPEN_SOURCE on all systems matching the
3363# wildcard, and that the wildcard does not include future systems
3364# (which may remove their limitations).
3365case $ac_sys_system/$ac_sys_release in
3366 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3367 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003368 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003369 # In addition, Stefan Krah confirms that issue #1244610 exists through
3370 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003371 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003372 define_xopen_source=no
3373 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3374 # also defined. This can be overridden by defining _BSD_SOURCE
3375 # As this has a different meaning on Linux, only define it on OpenBSD
3376
Matthias Kloseb9621712010-04-24 17:59:49 +00003377$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003378
3379 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003380 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003381 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3382 # also defined. This can be overridden by defining _BSD_SOURCE
3383 # As this has a different meaning on Linux, only define it on OpenBSD
3384
Matthias Kloseb9621712010-04-24 17:59:49 +00003385$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003386
3387 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003388 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3389 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3390 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003391 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 +00003392 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003393 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3394 # request to enable features supported by the standard as a request
3395 # to disable features not supported by the standard. The best way
3396 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3397 # entirely and define __EXTENSIONS__ instead.
3398 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003399 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003400 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3401 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003402 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003403 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003404 define_xopen_source=no;;
3405 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003406 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003407 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003408 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003409 # On FreeBSD 4, the math functions C89 does not cover are never defined
3410 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3411 FreeBSD/4.*)
3412 define_xopen_source=no;;
3413 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3414 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3415 # identifies itself as Darwin/7.*
3416 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3417 # disables platform specific features beyond repair.
3418 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3419 # has no effect, don't bother defining them
3420 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003421 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003422 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003423 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003424 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3425 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3426 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003427 AIX/4)
3428 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003429 AIX/5)
3430 if test `uname -r` -eq 1; then
3431 define_xopen_source=no
3432 fi
3433 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003434 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3435 # defining NI_NUMERICHOST.
3436 QNX/6.3.2)
3437 define_xopen_source=no
3438 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440esac
3441
3442if test $define_xopen_source = yes
3443then
Victor Stinner14d098d2011-09-07 22:29:43 +02003444 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003445
Victor Stinner14d098d2011-09-07 22:29:43 +02003446$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003447
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003448
3449 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3450 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3451 # several APIs are not declared. Since this is also needed in some
3452 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003453
Matthias Kloseb9621712010-04-24 17:59:49 +00003454$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003455
3456
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003457
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003458$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003460fi
3461
Christian Heimes647cd872013-12-07 23:39:33 +01003462# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3463case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003464 hp*|HP*)
3465 define_stdc_a1=yes;;
3466 *)
3467 define_stdc_a1=no;;
3468esac
3469
3470if test $define_stdc_a1 = yes
3471then
Christian Heimes647cd872013-12-07 23:39:33 +01003472
3473$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3474
Christian Heimesb02bcae2013-12-08 15:21:08 +01003475fi
Christian Heimes647cd872013-12-07 23:39:33 +01003476
Guido van Rossum91922671997-10-09 20:24:13 +00003477#
3478# SGI compilers allow the specification of the both the ABI and the
3479# ISA on the command line. Depending on the values of these switches,
3480# different and often incompatable code will be generated.
3481#
3482# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3483# thus supply support for various ABI/ISA combinations. The MACHDEP
3484# variable is also adjusted.
3485#
3486
3487if test ! -z "$SGI_ABI"
3488then
3489 CC="cc $SGI_ABI"
3490 LDFLAGS="$SGI_ABI $LDFLAGS"
3491 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3494$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003495
Jack Jansen6b08a402004-06-03 12:41:45 +00003496# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3497# it may influence the way we can build extensions, so distutils
3498# needs to check it
3499
Thomas Wouters477c8d52006-05-27 19:21:47 +00003500
Jack Jansen6b08a402004-06-03 12:41:45 +00003501CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003502EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003503
Guido van Rossum627b2d71993-12-24 10:39:16 +00003504# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003505
3506# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3507# for debug/optimization stuff. BASECFLAGS is for flags that are required
3508# just to get things to compile and link. Users are free to override OPT
3509# when running configure or make. The build should not break if they do.
3510# BASECFLAGS should generally not be messed with, however.
3511
3512# XXX shouldn't some/most/all of this code be merged with the stuff later
3513# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3515$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003517# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003518if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003519 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003520 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003521 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003522 without_gcc=yes;;
3523 yes) CC=gcc
3524 without_gcc=no;;
3525 *) CC=$withval
3526 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003527 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003528else
Martin v. Löwis11437992002-04-12 09:54:03 +00003529
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003530 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003531 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003532 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003533 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003534 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535fi
3536
Matthias Kloseb9621712010-04-24 17:59:49 +00003537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3538$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003539
Guido van Rossum8b131c51995-03-09 14:10:13 +00003540# If the user switches compilers, we can't believe the cache
3541if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3542then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003543 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003544(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003545fi
3546
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003547# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3548# when the compiler supports them, but we don't always want -O2, and
3549# we set -g later.
3550if test -z "$CFLAGS"; then
3551 CFLAGS=
3552fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003553
3554if test "$ac_sys_system" = "Darwin"
3555then
3556 # Compiler selection on MacOSX is more complicated than
3557 # AC_PROG_CC can handle, see Mac/README.txt for more
3558 # information
3559 if test -z "${CC}"
3560 then
3561 found_gcc=
3562 found_clang=
3563 as_save_IFS=$IFS; IFS=:
3564 for as_dir in $PATH
3565 do
3566 IFS=$as_save_IFS
3567 if test -x $as_dir/gcc; then
3568 if test -z "${found_gcc}"; then
3569 found_gcc=$as_dir/gcc
3570 fi
3571 fi
3572 if test -x $as_dir/clang; then
3573 if test -z "${found_clang}"; then
3574 found_clang=$as_dir/clang
3575 fi
3576 fi
3577 done
3578 IFS=$as_save_IFS
3579
3580 if test -n "$found_gcc" -a -n "$found_clang"
3581 then
3582 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3583 then
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3585$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3586 CC="$found_clang"
3587 CXX="$found_clang++"
3588 fi
3589
3590
3591 elif test -z "$found_gcc" -a -n "$found_clang"
3592 then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3594$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3595 CC="$found_clang"
3596 CXX="$found_clang++"
3597
3598 elif test -z "$found_gcc" -a -z "$found_clang"
3599 then
3600 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3601 if test -n "${found_clang}"
3602 then
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3604$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3605 CC="${found_clang}"
3606 CXX="`/usr/bin/xcrun -find clang++`"
3607
3608 # else: use default behaviour
3609 fi
3610 fi
3611 fi
3612fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003613ac_ext=c
3614ac_cpp='$CPP $CPPFLAGS'
3615ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3616ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3617ac_compiler_gnu=$ac_cv_c_compiler_gnu
3618if test -n "$ac_tool_prefix"; then
3619 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3620set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3622$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003623if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003625else
3626 if test -n "$CC"; then
3627 ac_cv_prog_CC="$CC" # Let the user override the test.
3628else
Martin v. Löwis11437992002-04-12 09:54:03 +00003629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3630for as_dir in $PATH
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $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 +00003638 break 2
3639 fi
3640done
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003643
Jack Jansendd19cf82001-12-06 22:36:17 +00003644fi
3645fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003646CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003647if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3649$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003650else
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655
Martin v. Löwis11437992002-04-12 09:54:03 +00003656fi
3657if test -z "$ac_cv_prog_CC"; then
3658 ac_ct_CC=$CC
3659 # Extract the first word of "gcc", so it can be a program name with args.
3660set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3662$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003663if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003665else
3666 if test -n "$ac_ct_CC"; then
3667 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3668else
3669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3670for as_dir in $PATH
3671do
3672 IFS=$as_save_IFS
3673 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003675 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 $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 +00003678 break 2
3679 fi
3680done
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003683
3684fi
3685fi
3686ac_ct_CC=$ac_cv_prog_ac_ct_CC
3687if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3689$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690else
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3692$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003693fi
3694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695 if test "x$ac_ct_CC" = x; then
3696 CC=""
3697 else
3698 case $cross_compiling:$ac_tool_warned in
3699yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003700{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3701$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702ac_tool_warned=yes ;;
3703esac
3704 CC=$ac_ct_CC
3705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003706else
3707 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003708fi
3709
Jack Jansendd19cf82001-12-06 22:36:17 +00003710if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711 if test -n "$ac_tool_prefix"; then
3712 # 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 +00003713set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3715$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003716if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003718else
3719 if test -n "$CC"; then
3720 ac_cv_prog_CC="$CC" # Let the user override the test.
3721else
Martin v. Löwis11437992002-04-12 09:54:03 +00003722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3723for as_dir in $PATH
3724do
3725 IFS=$as_save_IFS
3726 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 $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 +00003731 break 2
3732 fi
3733done
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003736
3737fi
3738fi
3739CC=$ac_cv_prog_CC
3740if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3742$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743else
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003746fi
3747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
3751if test -z "$CC"; then
3752 # Extract the first word of "cc", so it can be a program name with args.
3753set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3755$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003756if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
3759 if test -n "$CC"; then
3760 ac_cv_prog_CC="$CC" # Let the user override the test.
3761else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3764for as_dir in $PATH
3765do
3766 IFS=$as_save_IFS
3767 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3771 ac_prog_rejected=yes
3772 continue
3773 fi
3774 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 $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 +00003776 break 2
3777 fi
3778done
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003781
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782if test $ac_prog_rejected = yes; then
3783 # We found a bogon in the path, so make sure we never use it.
3784 set dummy $ac_cv_prog_CC
3785 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787 # We chose a different compiler from the bogus one.
3788 # However, it has the same basename, so the bogon will be chosen
3789 # first if we set CC to just the basename; use the full file name.
3790 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003791 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003792 fi
3793fi
3794fi
3795fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003796CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003797if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3799$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003800else
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003803fi
3804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805
Martin v. Löwis11437992002-04-12 09:54:03 +00003806fi
3807if test -z "$CC"; then
3808 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 do
3811 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3812set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3814$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003815if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003817else
3818 if test -n "$CC"; then
3819 ac_cv_prog_CC="$CC" # Let the user override the test.
3820else
Martin v. Löwis11437992002-04-12 09:54:03 +00003821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3822for as_dir in $PATH
3823do
3824 IFS=$as_save_IFS
3825 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 $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 +00003830 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003831 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003832done
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
3836fi
3837fi
3838CC=$ac_cv_prog_CC
3839if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3841$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003842else
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3844$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003845fi
3846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 test -n "$CC" && break
3849 done
3850fi
3851if test -z "$CC"; then
3852 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003854do
3855 # Extract the first word of "$ac_prog", so it can be a program name with args.
3856set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3858$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003859if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003861else
3862 if test -n "$ac_ct_CC"; then
3863 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3864else
3865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3866for as_dir in $PATH
3867do
3868 IFS=$as_save_IFS
3869 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003871 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003872 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 $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 +00003874 break 2
3875 fi
3876done
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003879
Martin v. Löwis11437992002-04-12 09:54:03 +00003880fi
3881fi
3882ac_ct_CC=$ac_cv_prog_ac_ct_CC
3883if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3885$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003886else
Matthias Kloseb9621712010-04-24 17:59:49 +00003887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3888$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003889fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891
Martin v. Löwis11437992002-04-12 09:54:03 +00003892 test -n "$ac_ct_CC" && break
3893done
Michael W. Hudson54241132001-12-07 15:38:26 +00003894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895 if test "x$ac_ct_CC" = x; then
3896 CC=""
3897 else
3898 case $cross_compiling:$ac_tool_warned in
3899yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003900{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3901$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902ac_tool_warned=yes ;;
3903esac
3904 CC=$ac_ct_CC
3905 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003906fi
3907
3908fi
3909
3910
Matthias Kloseb9621712010-04-24 17:59:49 +00003911test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3912$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003913as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003914See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003915
3916# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003917$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3918set X $ac_compile
3919ac_compiler=$2
3920for ac_option in --version -v -V -qversion; do
3921 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922case "(($ac_try" in
3923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3924 *) ac_try_echo=$ac_try;;
3925esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3927$as_echo "$ac_try_echo"; } >&5
3928 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003930 if test -s conftest.err; then
3931 sed '10a\
3932... rest of stderr output deleted ...
3933 10q' conftest.err >conftest.er1
3934 cat conftest.er1 >&5
3935 fi
3936 rm -f conftest.er1 conftest.err
3937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3938 test $ac_status = 0; }
3939done
Martin v. Löwis11437992002-04-12 09:54:03 +00003940
Matthias Kloseb9621712010-04-24 17:59:49 +00003941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003942/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003943
Martin v. Löwis11437992002-04-12 09:54:03 +00003944int
3945main ()
3946{
3947
3948 ;
3949 return 0;
3950}
3951_ACEOF
3952ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003953ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003954# Try to create an executable without -o first, disregard a.out.
3955# It will help us diagnose broken compilers, and finding out an intuition
3956# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3958$as_echo_n "checking whether the C compiler works... " >&6; }
3959ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3960
3961# The possible output files:
3962ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964ac_rmfiles=
3965for ac_file in $ac_files
3966do
3967 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3970 esac
3971done
3972rm -f $ac_rmfiles
3973
Matthias Kloseb9621712010-04-24 17:59:49 +00003974if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975case "(($ac_try" in
3976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3977 *) ac_try_echo=$ac_try;;
3978esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003979eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3980$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003982 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3984 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3986# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3987# in a Makefile. We should not override ac_cv_exeext if it was cached,
3988# so that the user can short-circuit this test for compilers unknown to
3989# Autoconf.
3990for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003991do
3992 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003993 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003994 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003995 ;;
3996 [ab].out )
3997 # We found the default executable, but exeext='' is most
3998 # certainly right.
3999 break;;
4000 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004001 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002 then :; else
4003 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4004 fi
4005 # We set ac_cv_exeext here because the later test for it is not
4006 # safe: cross compilers may not add the suffix if given an `-o'
4007 # argument, so we may need to know it at that point already.
4008 # Even if this section looks crufty: it has the advantage of
4009 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010 break;;
4011 * )
4012 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004013 esac
4014done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004015test "$ac_cv_exeext" = no && ac_cv_exeext=
4016
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004017else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018 ac_file=''
4019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004020if test -z "$ac_file"; then :
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4022$as_echo "no" >&6; }
4023$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004024sed 's/^/| /' conftest.$ac_ext >&5
4025
Matthias Kloseb9621712010-04-24 17:59:49 +00004026{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004028as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004029See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004030else
4031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4032$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4035$as_echo_n "checking for C compiler default output file name... " >&6; }
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4037$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004038ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004039
Matthias Kloseb9621712010-04-24 17:59:49 +00004040rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004041ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4043$as_echo_n "checking for suffix of executables... " >&6; }
4044if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004045case "(($ac_try" in
4046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4047 *) ac_try_echo=$ac_try;;
4048esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4050$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004051 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004052 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4054 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004055 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4056# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4057# work properly (i.e., refer to `conftest.exe'), while it won't with
4058# `rm'.
4059for ac_file in conftest.exe conftest conftest.*; do
4060 test -f "$ac_file" || continue
4061 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004062 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004063 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4064 break;;
4065 * ) break;;
4066 esac
4067done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004068else
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004071as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004072See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004074rm -f conftest conftest$ac_cv_exeext
4075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4076$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004077
4078rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004079EXEEXT=$ac_cv_exeext
4080ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4082/* end confdefs.h. */
4083#include <stdio.h>
4084int
4085main ()
4086{
4087FILE *f = fopen ("conftest.out", "w");
4088 return ferror (f) || fclose (f) != 0;
4089
4090 ;
4091 return 0;
4092}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004094ac_clean_files="$ac_clean_files conftest.out"
4095# Check that the compiler produces executables we can run. If not, either
4096# the compiler is broken, or we cross compile.
4097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4098$as_echo_n "checking whether we are cross compiling... " >&6; }
4099if test "$cross_compiling" != yes; then
4100 { { ac_try="$ac_link"
4101case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104esac
4105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106$as_echo "$ac_try_echo"; } >&5
4107 (eval "$ac_link") 2>&5
4108 ac_status=$?
4109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }
4111 if { ac_try='./conftest$ac_cv_exeext'
4112 { { case "(($ac_try" in
4113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4114 *) ac_try_echo=$ac_try;;
4115esac
4116eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4117$as_echo "$ac_try_echo"; } >&5
4118 (eval "$ac_try") 2>&5
4119 ac_status=$?
4120 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4121 test $ac_status = 0; }; }; then
4122 cross_compiling=no
4123 else
4124 if test "$cross_compiling" = maybe; then
4125 cross_compiling=yes
4126 else
4127 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4128$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004129as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004130If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004131See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 fi
4133 fi
4134fi
4135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4136$as_echo "$cross_compiling" >&6; }
4137
4138rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4139ac_clean_files=$ac_clean_files_save
4140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4141$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004142if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 $as_echo_n "(cached) " >&6
4144else
4145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004146/* end confdefs.h. */
4147
4148int
4149main ()
4150{
4151
4152 ;
4153 return 0;
4154}
4155_ACEOF
4156rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004157if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158case "(($ac_try" in
4159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4160 *) ac_try_echo=$ac_try;;
4161esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004162eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4163$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4167 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168 for ac_file in conftest.o conftest.obj conftest.*; do
4169 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004170 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4173 break;;
4174 esac
4175done
4176else
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004178sed 's/^/| /' conftest.$ac_ext >&5
4179
Matthias Kloseb9621712010-04-24 17:59:49 +00004180{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4181$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004182as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004183See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004184fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004185rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4188$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004189OBJEXT=$ac_cv_objext
4190ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4192$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004193if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004195else
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004198
Martin v. Löwis11437992002-04-12 09:54:03 +00004199int
4200main ()
4201{
4202#ifndef __GNUC__
4203 choke me
4204#endif
4205
4206 ;
4207 return 0;
4208}
4209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004210if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004211 ac_compiler_gnu=yes
4212else
Matthias Kloseb9621712010-04-24 17:59:49 +00004213 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004216ac_cv_c_compiler_gnu=$ac_compiler_gnu
4217
4218fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4220$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4221if test $ac_compiler_gnu = yes; then
4222 GCC=yes
4223else
4224 GCC=
4225fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004226ac_test_CFLAGS=${CFLAGS+set}
4227ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4229$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004230if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004232else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233 ac_save_c_werror_flag=$ac_c_werror_flag
4234 ac_c_werror_flag=yes
4235 ac_cv_prog_cc_g=no
4236 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004239
Martin v. Löwis11437992002-04-12 09:54:03 +00004240int
4241main ()
4242{
4243
4244 ;
4245 return 0;
4246}
4247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004248if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004249 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250else
Matthias Kloseb9621712010-04-24 17:59:49 +00004251 CFLAGS=""
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253/* end confdefs.h. */
4254
4255int
4256main ()
4257{
4258
4259 ;
4260 return 0;
4261}
4262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004263if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264
Matthias Kloseb9621712010-04-24 17:59:49 +00004265else
4266 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269/* end confdefs.h. */
4270
4271int
4272main ()
4273{
4274
4275 ;
4276 return 0;
4277}
4278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004279if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4287 ac_c_werror_flag=$ac_save_c_werror_flag
4288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4290$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004291if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004292 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004293elif test $ac_cv_prog_cc_g = yes; then
4294 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004295 CFLAGS="-g -O2"
4296 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004298 fi
4299else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004300 if test "$GCC" = yes; then
4301 CFLAGS="-O2"
4302 else
4303 CFLAGS=
4304 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4307$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004308if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004309 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004310else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004312ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004314/* end confdefs.h. */
4315#include <stdarg.h>
4316#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004317struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004318/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4319struct buf { int x; };
4320FILE * (*rcsopen) (struct buf *, struct stat *, int);
4321static char *e (p, i)
4322 char **p;
4323 int i;
4324{
4325 return p[i];
4326}
4327static char *f (char * (*g) (char **, int), char **p, ...)
4328{
4329 char *s;
4330 va_list v;
4331 va_start (v,p);
4332 s = g (p, va_arg (v,int));
4333 va_end (v);
4334 return s;
4335}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004336
4337/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4338 function prototypes and stuff, but not '\xHH' hex character constants.
4339 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004341 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4342 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004344int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4347 inside strings and character constants. */
4348#define FOO(x) 'x'
4349int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4350
Skip Montanaro6dead952003-09-25 14:50:04 +00004351int test (int i, double x);
4352struct s1 {int (*f) (int a);};
4353struct s2 {int (*f) (double a);};
4354int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4355int argc;
4356char **argv;
4357int
4358main ()
4359{
4360return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4361 ;
4362 return 0;
4363}
4364_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4366 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004367do
4368 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372rm -f core conftest.err conftest.$ac_objext
4373 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004374done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004376CC=$ac_save_CC
4377
4378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379# AC_CACHE_VAL
4380case "x$ac_cv_prog_cc_c89" in
4381 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4383$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4386$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004387 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4390$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004391esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004392if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004393
Matthias Kloseb9621712010-04-24 17:59:49 +00004394fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004395
Martin v. Löwis11437992002-04-12 09:54:03 +00004396ac_ext=c
4397ac_cpp='$CPP $CPPFLAGS'
4398ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4399ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4400ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004401
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004402
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004403
4404
Matthias Kloseb9621712010-04-24 17:59:49 +00004405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4406$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004409if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004411
4412 case $withval in
4413 no) with_cxx_main=no
4414 MAINCC='$(CC)';;
4415 yes) with_cxx_main=yes
4416 MAINCC='$(CXX)';;
4417 *) with_cxx_main=yes
4418 MAINCC=$withval
4419 if test -z "$CXX"
4420 then
4421 CXX=$withval
4422 fi;;
4423 esac
4424else
4425
4426 with_cxx_main=no
4427 MAINCC='$(CC)'
4428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429fi
4430
Matthias Kloseb9621712010-04-24 17:59:49 +00004431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4432$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004433
4434preset_cxx="$CXX"
4435if test -z "$CXX"
4436then
4437 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004438 gcc) if test -n "$ac_tool_prefix"; then
4439 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4440set dummy ${ac_tool_prefix}g++; ac_word=$2
4441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4442$as_echo_n "checking for $ac_word... " >&6; }
4443if ${ac_cv_path_CXX+:} false; then :
4444 $as_echo_n "(cached) " >&6
4445else
4446 case $CXX in
4447 [\\/]* | ?:[\\/]*)
4448 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4449 ;;
4450 *)
4451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4452for as_dir in notfound
4453do
4454 IFS=$as_save_IFS
4455 test -z "$as_dir" && as_dir=.
4456 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004457 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004458 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4460 break 2
4461 fi
4462done
4463 done
4464IFS=$as_save_IFS
4465
4466 ;;
4467esac
4468fi
4469CXX=$ac_cv_path_CXX
4470if test -n "$CXX"; then
4471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4472$as_echo "$CXX" >&6; }
4473else
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4475$as_echo "no" >&6; }
4476fi
4477
4478
4479fi
4480if test -z "$ac_cv_path_CXX"; then
4481 ac_pt_CXX=$CXX
4482 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004483set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4485$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004486if ${ac_cv_path_ac_pt_CXX+:} false; then :
4487 $as_echo_n "(cached) " >&6
4488else
4489 case $ac_pt_CXX in
4490 [\\/]* | ?:[\\/]*)
4491 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4492 ;;
4493 *)
4494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4495for as_dir in notfound
4496do
4497 IFS=$as_save_IFS
4498 test -z "$as_dir" && as_dir=.
4499 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004500 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004501 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4502 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4503 break 2
4504 fi
4505done
4506 done
4507IFS=$as_save_IFS
4508
4509 ;;
4510esac
4511fi
4512ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4513if test -n "$ac_pt_CXX"; then
4514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4515$as_echo "$ac_pt_CXX" >&6; }
4516else
4517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4518$as_echo "no" >&6; }
4519fi
4520
4521 if test "x$ac_pt_CXX" = x; then
4522 CXX="g++"
4523 else
4524 case $cross_compiling:$ac_tool_warned in
4525yes:)
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4527$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4528ac_tool_warned=yes ;;
4529esac
4530 CXX=$ac_pt_CXX
4531 fi
4532else
4533 CXX="$ac_cv_path_CXX"
4534fi
4535 ;;
4536 cc) if test -n "$ac_tool_prefix"; then
4537 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4538set dummy ${ac_tool_prefix}c++; ac_word=$2
4539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4540$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004541if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004542 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004543else
4544 case $CXX in
4545 [\\/]* | ?:[\\/]*)
4546 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4547 ;;
4548 *)
4549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in notfound
4551do
4552 IFS=$as_save_IFS
4553 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004554 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004555 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004556 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004557 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004558 break 2
4559 fi
4560done
Matthias Kloseb9621712010-04-24 17:59:49 +00004561 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004562IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004563
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004564 ;;
4565esac
4566fi
4567CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004568if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4570$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004571else
Matthias Kloseb9621712010-04-24 17:59:49 +00004572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004575
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004576
4577fi
4578if test -z "$ac_cv_path_CXX"; then
4579 ac_pt_CXX=$CXX
4580 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4583$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004584if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004585 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004586else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004587 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004589 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 +00004590 ;;
4591 *)
4592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4593for as_dir in notfound
4594do
4595 IFS=$as_save_IFS
4596 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004597 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004598 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004599 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004601 break 2
4602 fi
4603done
Matthias Kloseb9621712010-04-24 17:59:49 +00004604 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004605IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004606
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004607 ;;
4608esac
4609fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004610ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4611if test -n "$ac_pt_CXX"; then
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4613$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004614else
Matthias Kloseb9621712010-04-24 17:59:49 +00004615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4616$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004618
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004619 if test "x$ac_pt_CXX" = x; then
4620 CXX="c++"
4621 else
4622 case $cross_compiling:$ac_tool_warned in
4623yes:)
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4625$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4626ac_tool_warned=yes ;;
4627esac
4628 CXX=$ac_pt_CXX
4629 fi
4630else
4631 CXX="$ac_cv_path_CXX"
4632fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004633 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004634 clang|*/clang) if test -n "$ac_tool_prefix"; then
4635 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4636set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4638$as_echo_n "checking for $ac_word... " >&6; }
4639if ${ac_cv_path_CXX+:} false; then :
4640 $as_echo_n "(cached) " >&6
4641else
4642 case $CXX in
4643 [\\/]* | ?:[\\/]*)
4644 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4645 ;;
4646 *)
4647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4648for as_dir in notfound
4649do
4650 IFS=$as_save_IFS
4651 test -z "$as_dir" && as_dir=.
4652 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004654 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4656 break 2
4657 fi
4658done
4659 done
4660IFS=$as_save_IFS
4661
Ned Deilycbfb9a52012-06-23 16:02:19 -07004662 ;;
4663esac
4664fi
4665CXX=$ac_cv_path_CXX
4666if test -n "$CXX"; then
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4668$as_echo "$CXX" >&6; }
4669else
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671$as_echo "no" >&6; }
4672fi
4673
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004674
4675fi
4676if test -z "$ac_cv_path_CXX"; then
4677 ac_pt_CXX=$CXX
4678 # Extract the first word of "clang++", so it can be a program name with args.
4679set dummy clang++; ac_word=$2
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
4682if ${ac_cv_path_ac_pt_CXX+:} false; then :
4683 $as_echo_n "(cached) " >&6
4684else
4685 case $ac_pt_CXX in
4686 [\\/]* | ?:[\\/]*)
4687 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4688 ;;
4689 *)
4690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in notfound
4692do
4693 IFS=$as_save_IFS
4694 test -z "$as_dir" && as_dir=.
4695 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004697 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699 break 2
4700 fi
4701done
4702 done
4703IFS=$as_save_IFS
4704
4705 ;;
4706esac
4707fi
4708ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4709if test -n "$ac_pt_CXX"; then
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4711$as_echo "$ac_pt_CXX" >&6; }
4712else
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717 if test "x$ac_pt_CXX" = x; then
4718 CXX="clang++"
4719 else
4720 case $cross_compiling:$ac_tool_warned in
4721yes:)
4722{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4723$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4724ac_tool_warned=yes ;;
4725esac
4726 CXX=$ac_pt_CXX
4727 fi
4728else
4729 CXX="$ac_cv_path_CXX"
4730fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004731 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004732 esac
4733 if test "$CXX" = "notfound"
4734 then
4735 CXX=""
4736 fi
4737fi
4738if test -z "$CXX"
4739then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004740 if test -n "$ac_tool_prefix"; then
4741 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4742 do
4743 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4744set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4746$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004747if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749else
4750 if test -n "$CXX"; then
4751 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4752else
4753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754for as_dir in $PATH
4755do
4756 IFS=$as_save_IFS
4757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004760 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004762 break 2
4763 fi
4764done
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004766IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767
4768fi
4769fi
4770CXX=$ac_cv_prog_CXX
4771if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4773$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004774else
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4776$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777fi
4778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004779
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004780 test -n "$CXX" && break
4781 done
4782fi
4783if test -z "$CXX"; then
4784 ac_ct_CXX=$CXX
4785 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4786do
4787 # Extract the first word of "$ac_prog", so it can be a program name with args.
4788set dummy $ac_prog; ac_word=$2
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4790$as_echo_n "checking for $ac_word... " >&6; }
4791if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4792 $as_echo_n "(cached) " >&6
4793else
4794 if test -n "$ac_ct_CXX"; then
4795 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4796else
4797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4798for as_dir in $PATH
4799do
4800 IFS=$as_save_IFS
4801 test -z "$as_dir" && as_dir=.
4802 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004804 ac_cv_prog_ac_ct_CXX="$ac_prog"
4805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4806 break 2
4807 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004809 done
4810IFS=$as_save_IFS
4811
4812fi
4813fi
4814ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4815if test -n "$ac_ct_CXX"; then
4816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4817$as_echo "$ac_ct_CXX" >&6; }
4818else
4819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4820$as_echo "no" >&6; }
4821fi
4822
4823
4824 test -n "$ac_ct_CXX" && break
4825done
4826
4827 if test "x$ac_ct_CXX" = x; then
4828 CXX="notfound"
4829 else
4830 case $cross_compiling:$ac_tool_warned in
4831yes:)
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4833$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4834ac_tool_warned=yes ;;
4835esac
4836 CXX=$ac_ct_CXX
4837 fi
4838fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839
4840 if test "$CXX" = "notfound"
4841 then
4842 CXX=""
4843 fi
4844fi
4845if test "$preset_cxx" != "$CXX"
4846then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004847 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004848
4849 By default, distutils will build C++ extension modules with \"$CXX\".
4850 If this is not intended, then set CXX on the configure command line.
4851 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004852$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004853
4854 By default, distutils will build C++ extension modules with \"$CXX\".
4855 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004856 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857fi
4858
4859
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4861$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4862save_LDFLAGS="$LDFLAGS"
4863LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004864
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4866/* end confdefs.h. */
4867
4868int
4869main ()
4870{
4871
4872 ;
4873 return 0;
4874}
4875_ACEOF
4876if ac_fn_c_try_link "$LINENO"; then :
4877 NO_AS_NEEDED="-Wl,--no-as-needed"
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4879$as_echo "yes" >&6; }
4880else
4881 NO_AS_NEEDED=""
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4883$as_echo "no" >&6; }
4884fi
4885rm -f core conftest.err conftest.$ac_objext \
4886 conftest$ac_exeext conftest.$ac_ext
4887LDFLAGS="$save_LDFLAGS"
4888
4889
4890
4891# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004892ac_ext=c
4893ac_cpp='$CPP $CPPFLAGS'
4894ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4895ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4896ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4898$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004899# On Suns, sometimes $CPP names a directory.
4900if test -n "$CPP" && test -d "$CPP"; then
4901 CPP=
4902fi
4903if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004904 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004905 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004906else
Martin v. Löwis11437992002-04-12 09:54:03 +00004907 # Double quotes because CPP needs to be expanded
4908 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4909 do
4910 ac_preproc_ok=false
4911for ac_c_preproc_warn_flag in '' yes
4912do
4913 # Use a header file that comes with gcc, so configuring glibc
4914 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004915 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4916 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004917 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004918 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004920/* end confdefs.h. */
4921#ifdef __STDC__
4922# include <limits.h>
4923#else
4924# include <assert.h>
4925#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004926 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004928if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004929
Matthias Kloseb9621712010-04-24 17:59:49 +00004930else
Martin v. Löwis11437992002-04-12 09:54:03 +00004931 # Broken: fails on valid input.
4932continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004933fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004934rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004936 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004937 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004940#include <ac_nonexistent.h>
4941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004942if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004943 # Broken: success on invalid input.
4944continue
4945else
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 # Passes both tests.
4947ac_preproc_ok=:
4948break
4949fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004950rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004951
4952done
4953# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004954rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004955if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004956 break
4957fi
4958
4959 done
4960 ac_cv_prog_CPP=$CPP
4961
4962fi
4963 CPP=$ac_cv_prog_CPP
4964else
4965 ac_cv_prog_CPP=$CPP
4966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4968$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004969ac_preproc_ok=false
4970for ac_c_preproc_warn_flag in '' yes
4971do
4972 # Use a header file that comes with gcc, so configuring glibc
4973 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004974 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4975 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004976 # On the NeXT, cc -E runs the code through the compiler's parser,
4977 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004979/* end confdefs.h. */
4980#ifdef __STDC__
4981# include <limits.h>
4982#else
4983# include <assert.h>
4984#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004985 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004987if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004988
Matthias Kloseb9621712010-04-24 17:59:49 +00004989else
Martin v. Löwis11437992002-04-12 09:54:03 +00004990 # Broken: fails on valid input.
4991continue
4992fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004993rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004995 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004996 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004999#include <ac_nonexistent.h>
5000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005001if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005002 # Broken: success on invalid input.
5003continue
5004else
Martin v. Löwis11437992002-04-12 09:54:03 +00005005 # Passes both tests.
5006ac_preproc_ok=:
5007break
5008fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005009rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005010
5011done
5012# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005013rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005014if $ac_preproc_ok; then :
5015
Martin v. Löwis11437992002-04-12 09:54:03 +00005016else
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005019as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005020See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005021fi
5022
5023ac_ext=c
5024ac_cpp='$CPP $CPPFLAGS'
5025ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5026ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5027ac_compiler_gnu=$ac_cv_c_compiler_gnu
5028
5029
Matthias Kloseb9621712010-04-24 17:59:49 +00005030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5031$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005032if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005034else
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005036 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 # Loop through the user's path and test for each of PROGNAME-LIST
5038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005039for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5040do
5041 IFS=$as_save_IFS
5042 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 for ac_prog in grep ggrep; do
5044 for ac_exec_ext in '' $ac_executable_extensions; do
5045 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005046 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005047# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048 # Check for GNU $ac_path_GREP
5049case `"$ac_path_GREP" --version 2>&1` in
5050*GNU*)
5051 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5052*)
5053 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055 while :
5056 do
5057 cat "conftest.in" "conftest.in" >"conftest.tmp"
5058 mv "conftest.tmp" "conftest.in"
5059 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005061 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5062 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5065 # Best one so far, save it but keep looking for a better one
5066 ac_cv_path_GREP="$ac_path_GREP"
5067 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005068 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069 # 10*(2^10) chars as input seems more than enough
5070 test $ac_count -gt 10 && break
5071 done
5072 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5073esac
5074
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 $ac_path_GREP_found && break 3
5076 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005079IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005081 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 +00005082 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005083else
5084 ac_cv_path_GREP=$GREP
5085fi
5086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5089$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005090 GREP="$ac_cv_path_GREP"
5091
5092
Matthias Kloseb9621712010-04-24 17:59:49 +00005093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5094$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005095if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005097else
5098 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5099 then ac_cv_path_EGREP="$GREP -E"
5100 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 # Loop through the user's path and test for each of PROGNAME-LIST
5104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005105for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5106do
5107 IFS=$as_save_IFS
5108 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 for ac_prog in egrep; do
5110 for ac_exec_ext in '' $ac_executable_extensions; do
5111 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005112 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005113# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005114 # Check for GNU $ac_path_EGREP
5115case `"$ac_path_EGREP" --version 2>&1` in
5116*GNU*)
5117 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5118*)
5119 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005121 while :
5122 do
5123 cat "conftest.in" "conftest.in" >"conftest.tmp"
5124 mv "conftest.tmp" "conftest.in"
5125 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005127 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5128 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005130 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5131 # Best one so far, save it but keep looking for a better one
5132 ac_cv_path_EGREP="$ac_path_EGREP"
5133 ac_path_EGREP_max=$ac_count
5134 fi
5135 # 10*(2^10) chars as input seems more than enough
5136 test $ac_count -gt 10 && break
5137 done
5138 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5139esac
5140
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 $ac_path_EGREP_found && break 3
5142 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005144 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005145IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005147 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 +00005148 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005149else
5150 ac_cv_path_EGREP=$EGREP
5151fi
5152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005153 fi
5154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5156$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005157 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005158
5159
Matthias Kloseb9621712010-04-24 17:59:49 +00005160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5161$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005162if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005163 $as_echo_n "(cached) " >&6
5164else
5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005166/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005167#include <stdlib.h>
5168#include <stdarg.h>
5169#include <string.h>
5170#include <float.h>
5171
5172int
5173main ()
5174{
5175
5176 ;
5177 return 0;
5178}
5179_ACEOF
5180if ac_fn_c_try_compile "$LINENO"; then :
5181 ac_cv_header_stdc=yes
5182else
5183 ac_cv_header_stdc=no
5184fi
5185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5186
5187if test $ac_cv_header_stdc = yes; then
5188 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5190/* end confdefs.h. */
5191#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005192
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005193_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005194if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005195 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005197else
Matthias Kloseb9621712010-04-24 17:59:49 +00005198 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005199fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005200rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005201
Matthias Kloseb9621712010-04-24 17:59:49 +00005202fi
5203
5204if test $ac_cv_header_stdc = yes; then
5205 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5207/* end confdefs.h. */
5208#include <stdlib.h>
5209
5210_ACEOF
5211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5212 $EGREP "free" >/dev/null 2>&1; then :
5213
5214else
5215 ac_cv_header_stdc=no
5216fi
5217rm -f conftest*
5218
5219fi
5220
5221if test $ac_cv_header_stdc = yes; then
5222 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5223 if test "$cross_compiling" = yes; then :
5224 :
5225else
5226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5227/* end confdefs.h. */
5228#include <ctype.h>
5229#include <stdlib.h>
5230#if ((' ' & 0x0FF) == 0x020)
5231# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5232# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5233#else
5234# define ISLOWER(c) \
5235 (('a' <= (c) && (c) <= 'i') \
5236 || ('j' <= (c) && (c) <= 'r') \
5237 || ('s' <= (c) && (c) <= 'z'))
5238# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5239#endif
5240
5241#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5242int
5243main ()
5244{
5245 int i;
5246 for (i = 0; i < 256; i++)
5247 if (XOR (islower (i), ISLOWER (i))
5248 || toupper (i) != TOUPPER (i))
5249 return 2;
5250 return 0;
5251}
5252_ACEOF
5253if ac_fn_c_try_run "$LINENO"; then :
5254
5255else
5256 ac_cv_header_stdc=no
5257fi
5258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5259 conftest.$ac_objext conftest.beam conftest.$ac_ext
5260fi
5261
5262fi
5263fi
5264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5265$as_echo "$ac_cv_header_stdc" >&6; }
5266if test $ac_cv_header_stdc = yes; then
5267
5268$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5269
5270fi
5271
5272# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5273for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5274 inttypes.h stdint.h unistd.h
5275do :
5276 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5277ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5278"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005279if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005280 cat >>confdefs.h <<_ACEOF
5281#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5282_ACEOF
5283
5284fi
5285
5286done
5287
5288
5289
5290 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 +02005291if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005292 MINIX=yes
5293else
5294 MINIX=
5295fi
5296
5297
5298 if test "$MINIX" = yes; then
5299
5300$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5301
5302
5303$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5304
5305
5306$as_echo "#define _MINIX 1" >>confdefs.h
5307
5308 fi
5309
5310
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5312$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005313if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005314 $as_echo_n "(cached) " >&6
5315else
5316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5317/* end confdefs.h. */
5318
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005319# define __EXTENSIONS__ 1
5320 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005321int
5322main ()
5323{
5324
5325 ;
5326 return 0;
5327}
5328_ACEOF
5329if ac_fn_c_try_compile "$LINENO"; then :
5330 ac_cv_safe_to_define___extensions__=yes
5331else
5332 ac_cv_safe_to_define___extensions__=no
5333fi
5334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5335fi
5336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5337$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5338 test $ac_cv_safe_to_define___extensions__ = yes &&
5339 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5340
5341 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5342
5343 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5344
5345 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5346
5347 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5348
5349
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005350
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351# Check for unsupported systems
5352case $ac_sys_system/$ac_sys_release in
5353atheos*|Linux*/1*)
5354 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5355 echo See README for details.
5356 exit 1;;
5357esac
5358
5359
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5361$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005364if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365 withval=$with_suffix;
5366 case $withval in
5367 no) EXEEXT=;;
5368 yes) EXEEXT=.exe;;
5369 *) EXEEXT=$withval;;
5370 esac
5371fi
5372
Matthias Kloseb9621712010-04-24 17:59:49 +00005373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5374$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375
5376# Test whether we're running on a non-case-sensitive system, in which
5377# case we give a warning if no ext is given
5378
Matthias Kloseb9621712010-04-24 17:59:49 +00005379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5380$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005381if test ! -d CaseSensitiveTestDir; then
5382mkdir CaseSensitiveTestDir
5383fi
5384
5385if test -d casesensitivetestdir
5386then
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5388$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389 BUILDEXEEXT=.exe
5390else
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5392$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393 BUILDEXEEXT=$EXEEXT
5394fi
5395rmdir CaseSensitiveTestDir
5396
5397case $MACHDEP in
5398bsdos*)
5399 case $CC in
5400 gcc) CC="$CC -D_HAVE_BSDI";;
5401 esac;;
5402esac
5403
5404case $ac_sys_system in
5405hp*|HP*)
5406 case $CC in
5407 cc|*/cc) CC="$CC -Ae";;
5408 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409esac
5410
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005411MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5412
5413
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414
5415
Matthias Kloseb9621712010-04-24 17:59:49 +00005416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5417$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418if test -z "$LIBRARY"
5419then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005420 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5423$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424
5425# LDLIBRARY is the name of the library to link against (as opposed to the
5426# name of the library into which to insert object files). BLDLIBRARY is also
5427# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5428# is blank as the main program is not linked directly against LDLIBRARY.
5429# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5430# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5431# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5432# DLLLIBRARY is the shared (i.e., DLL) library.
5433#
5434# RUNSHARED is used to run shared python without installed libraries
5435#
5436# INSTSONAME is the name of the shared library that will be use to install
5437# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005438#
5439# LDVERSION is the shared library version number, normally the Python version
5440# with the ABI build flags appended.
5441
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442
5443
5444
5445
5446
5447
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005448
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449LDLIBRARY="$LIBRARY"
5450BLDLIBRARY='$(LDLIBRARY)'
5451INSTSONAME='$(LDLIBRARY)'
5452DLLLIBRARY=''
5453LDLIBRARYDIR=''
5454RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005455LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456
5457# LINKCC is the command that links the python executable -- default is $(CC).
5458# If CXX is set, and if it is needed to link a main function that was
5459# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5460# python might then depend on the C++ runtime
5461# This is altered for AIX in order to build the export list before
5462# linking.
5463
Matthias Kloseb9621712010-04-24 17:59:49 +00005464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5465$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005466if test -z "$LINKCC"
5467then
5468 LINKCC='$(PURIFY) $(MAINCC)'
5469 case $ac_sys_system in
5470 AIX*)
5471 exp_extra="\"\""
5472 if test $ac_sys_release -ge 5 -o \
5473 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5474 exp_extra="."
5475 fi
5476 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477 QNX*)
5478 # qcc must be used because the other compilers do not
5479 # support -N.
5480 LINKCC=qcc;;
5481 esac
5482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5484$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485
5486# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5487# make sure we default having it set to "no": this is used by
5488# distutils.unixccompiler to know if it should add --enable-new-dtags
5489# to linker command lines, and failing to detect GNU ld simply results
5490# in the same bahaviour as before.
5491
Matthias Kloseb9621712010-04-24 17:59:49 +00005492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5493$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494ac_prog=ld
5495if test "$GCC" = yes; then
5496 ac_prog=`$CC -print-prog-name=ld`
5497fi
5498case `"$ac_prog" -V 2>&1 < /dev/null` in
5499 *GNU*)
5500 GNULD=yes;;
5501 *)
5502 GNULD=no;;
5503esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5505$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5508$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005509if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005510 $as_echo_n "(cached) " >&6
5511else
5512 ac_cv_c_inline=no
5513for ac_kw in inline __inline__ __inline; do
5514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5515/* end confdefs.h. */
5516#ifndef __cplusplus
5517typedef int foo_t;
5518static $ac_kw foo_t static_foo () {return 0; }
5519$ac_kw foo_t foo () {return 0; }
5520#endif
5521
5522_ACEOF
5523if ac_fn_c_try_compile "$LINENO"; then :
5524 ac_cv_c_inline=$ac_kw
5525fi
5526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5527 test "$ac_cv_c_inline" != no && break
5528done
5529
5530fi
5531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5532$as_echo "$ac_cv_c_inline" >&6; }
5533
5534case $ac_cv_c_inline in
5535 inline | yes) ;;
5536 *)
5537 case $ac_cv_c_inline in
5538 no) ac_val=;;
5539 *) ac_val=$ac_cv_c_inline;;
5540 esac
5541 cat >>confdefs.h <<_ACEOF
5542#ifndef __cplusplus
5543#define inline $ac_val
5544#endif
5545_ACEOF
5546 ;;
5547esac
5548
5549if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005550
5551$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005552
5553
5554fi
5555
5556
Matthias Kloseb9621712010-04-24 17:59:49 +00005557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5558$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005560if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005561 enableval=$enable_shared;
5562fi
5563
5564
5565if test -z "$enable_shared"
5566then
5567 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005568 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569 enable_shared="yes";;
5570 *)
5571 enable_shared="no";;
5572 esac
5573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5575$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005576
Matthias Kloseb9621712010-04-24 17:59:49 +00005577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5578$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005580if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005581 enableval=$enable_profiling;
5582fi
5583
5584if test "x$enable_profiling" = xyes; then
5585 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005586 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588/* end confdefs.h. */
5589int main() { return 0; }
5590_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005591if ac_fn_c_try_link "$LINENO"; then :
5592
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005594 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005596rm -f core conftest.err conftest.$ac_objext \
5597 conftest$ac_exeext conftest.$ac_ext
5598 CC="$ac_save_cc"
5599else
5600 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5603$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604
doko@ubuntu.comba015832012-06-30 16:52:05 +02005605if test "x$enable_profiling" = xyes; then
5606 BASECFLAGS="-pg $BASECFLAGS"
5607 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608fi
5609
Matthias Kloseb9621712010-04-24 17:59:49 +00005610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5611$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612
5613# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5614# library that we build, but we do not want to link against it (we
5615# will find it with a -framework option). For this reason there is an
5616# extra variable BLDLIBRARY against which Python and the extension
5617# modules are linked, BLDLIBRARY. This is normally the same as
5618# LDLIBRARY, but empty for MacOSX framework builds.
5619if test "$enable_framework"
5620then
5621 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005622 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623 BLDLIBRARY=''
5624else
5625 BLDLIBRARY='$(LDLIBRARY)'
5626fi
5627
5628# Other platforms follow
5629if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005630 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631
Matthias Kloseb9621712010-04-24 17:59:49 +00005632$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633
5634 case $ac_sys_system in
5635 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005636 LDLIBRARY='libpython$(LDVERSION).dll.a'
5637 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 ;;
5639 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005640 LDLIBRARY='libpython$(LDVERSION).so'
5641 BLDLIBRARY='-Wl,-R,$(LIBDIR) -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 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005644 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005645 then
5646 PY3LIBRARY=libpython3.so
5647 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005649 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005650 LDLIBRARY='libpython$(LDVERSION).so'
5651 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005652 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 case $ac_sys_system in
5654 FreeBSD*)
5655 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5656 ;;
5657 esac
5658 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005659 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005660 then
5661 PY3LIBRARY=libpython3.so
5662 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663 ;;
5664 hp*|HP*)
5665 case `uname -m` in
5666 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005667 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 ;;
5669 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005670 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 ;;
5672 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005673 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005674 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005677 LDLIBRARY='libpython$(LDVERSION).dylib'
5678 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005679 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005681 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005682 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005683 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005684 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685
5686 esac
5687else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005688 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 case $ac_sys_system in
5690 CYGWIN*)
5691 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005692 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 ;;
5694 esac
5695fi
5696
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005697if test "$cross_compiling" = yes; then
5698 RUNSHARED=
5699fi
5700
Matthias Kloseb9621712010-04-24 17:59:49 +00005701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5702$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703
5704if test -n "$ac_tool_prefix"; then
5705 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5706set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5708$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005709if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711else
5712 if test -n "$RANLIB"; then
5713 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5714else
5715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5716for as_dir in $PATH
5717do
5718 IFS=$as_save_IFS
5719 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005720 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005721 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 break 2
5725 fi
5726done
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728IFS=$as_save_IFS
5729
5730fi
5731fi
5732RANLIB=$ac_cv_prog_RANLIB
5733if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5735$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736else
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739fi
5740
5741
5742fi
5743if test -z "$ac_cv_prog_RANLIB"; then
5744 ac_ct_RANLIB=$RANLIB
5745 # Extract the first word of "ranlib", so it can be a program name with args.
5746set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5748$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005749if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751else
5752 if test -n "$ac_ct_RANLIB"; then
5753 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5754else
5755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756for as_dir in $PATH
5757do
5758 IFS=$as_save_IFS
5759 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005760 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764 break 2
5765 fi
5766done
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768IFS=$as_save_IFS
5769
5770fi
5771fi
5772ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5773if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5775$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776else
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5778$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779fi
5780
5781 if test "x$ac_ct_RANLIB" = x; then
5782 RANLIB=":"
5783 else
5784 case $cross_compiling:$ac_tool_warned in
5785yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788ac_tool_warned=yes ;;
5789esac
5790 RANLIB=$ac_ct_RANLIB
5791 fi
5792else
5793 RANLIB="$ac_cv_prog_RANLIB"
5794fi
5795
5796
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005797if test -n "$ac_tool_prefix"; then
5798 for ac_prog in ar aal
5799 do
5800 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5801set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5803$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005804if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005805 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806else
5807 if test -n "$AR"; then
5808 ac_cv_prog_AR="$AR" # Let the user override the test.
5809else
5810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5811for as_dir in $PATH
5812do
5813 IFS=$as_save_IFS
5814 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005815 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005816 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005817 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819 break 2
5820 fi
5821done
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823IFS=$as_save_IFS
5824
5825fi
5826fi
5827AR=$ac_cv_prog_AR
5828if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5830$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831else
Matthias Kloseb9621712010-04-24 17:59:49 +00005832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834fi
5835
5836
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005837 test -n "$AR" && break
5838 done
5839fi
5840if test -z "$AR"; then
5841 ac_ct_AR=$AR
5842 for ac_prog in ar aal
5843do
5844 # Extract the first word of "$ac_prog", so it can be a program name with args.
5845set dummy $ac_prog; ac_word=$2
5846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5847$as_echo_n "checking for $ac_word... " >&6; }
5848if ${ac_cv_prog_ac_ct_AR+:} false; then :
5849 $as_echo_n "(cached) " >&6
5850else
5851 if test -n "$ac_ct_AR"; then
5852 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5853else
5854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5855for as_dir in $PATH
5856do
5857 IFS=$as_save_IFS
5858 test -z "$as_dir" && as_dir=.
5859 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005861 ac_cv_prog_ac_ct_AR="$ac_prog"
5862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5863 break 2
5864 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005866 done
5867IFS=$as_save_IFS
5868
5869fi
5870fi
5871ac_ct_AR=$ac_cv_prog_ac_ct_AR
5872if test -n "$ac_ct_AR"; then
5873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5874$as_echo "$ac_ct_AR" >&6; }
5875else
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5877$as_echo "no" >&6; }
5878fi
5879
5880
5881 test -n "$ac_ct_AR" && break
5882done
5883
5884 if test "x$ac_ct_AR" = x; then
5885 AR="ar"
5886 else
5887 case $cross_compiling:$ac_tool_warned in
5888yes:)
5889{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5890$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5891ac_tool_warned=yes ;;
5892esac
5893 AR=$ac_ct_AR
5894 fi
5895fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896
5897
5898# tweak ARFLAGS only if the user didn't set it on the command line
5899
5900if test -z "$ARFLAGS"
5901then
5902 ARFLAGS="rc"
5903fi
5904
doko@ubuntu.com58844492012-06-30 18:25:32 +02005905if test -n "$ac_tool_prefix"; then
5906 for ac_prog in readelf
5907 do
5908 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5911$as_echo_n "checking for $ac_word... " >&6; }
5912if ${ac_cv_prog_READELF+:} false; then :
5913 $as_echo_n "(cached) " >&6
5914else
5915 if test -n "$READELF"; then
5916 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5917else
5918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5919for as_dir in $PATH
5920do
5921 IFS=$as_save_IFS
5922 test -z "$as_dir" && as_dir=.
5923 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005925 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5927 break 2
5928 fi
5929done
5930 done
5931IFS=$as_save_IFS
5932
5933fi
5934fi
5935READELF=$ac_cv_prog_READELF
5936if test -n "$READELF"; then
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5938$as_echo "$READELF" >&6; }
5939else
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5941$as_echo "no" >&6; }
5942fi
5943
5944
5945 test -n "$READELF" && break
5946 done
5947fi
5948if test -z "$READELF"; then
5949 ac_ct_READELF=$READELF
5950 for ac_prog in readelf
5951do
5952 # Extract the first word of "$ac_prog", so it can be a program name with args.
5953set dummy $ac_prog; ac_word=$2
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5955$as_echo_n "checking for $ac_word... " >&6; }
5956if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5957 $as_echo_n "(cached) " >&6
5958else
5959 if test -n "$ac_ct_READELF"; then
5960 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5961else
5962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963for as_dir in $PATH
5964do
5965 IFS=$as_save_IFS
5966 test -z "$as_dir" && as_dir=.
5967 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005968 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005969 ac_cv_prog_ac_ct_READELF="$ac_prog"
5970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5971 break 2
5972 fi
5973done
5974 done
5975IFS=$as_save_IFS
5976
5977fi
5978fi
5979ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5980if test -n "$ac_ct_READELF"; then
5981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5982$as_echo "$ac_ct_READELF" >&6; }
5983else
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5985$as_echo "no" >&6; }
5986fi
5987
5988
5989 test -n "$ac_ct_READELF" && break
5990done
5991
5992 if test "x$ac_ct_READELF" = x; then
5993 READELF=":"
5994 else
5995 case $cross_compiling:$ac_tool_warned in
5996yes:)
5997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5999ac_tool_warned=yes ;;
6000esac
6001 READELF=$ac_ct_READELF
6002 fi
6003fi
6004
6005if test "$cross_compiling" = yes; then
6006 case "$READELF" in
6007 readelf|:)
6008 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6009 ;;
6010 esac
6011fi
6012
6013
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014
Matthias Klosec4c48422012-10-21 23:05:35 +02006015for ac_prog in python$PACKAGE_VERSION python3 python
6016do
6017 # Extract the first word of "$ac_prog", so it can be a program name with args.
6018set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6020$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006021if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006022 $as_echo_n "(cached) " >&6
6023else
Matthias Klosec4c48422012-10-21 23:05:35 +02006024 if test -n "$PYTHON"; then
6025 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006026else
6027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6028for as_dir in $PATH
6029do
6030 IFS=$as_save_IFS
6031 test -z "$as_dir" && as_dir=.
6032 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006034 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6036 break 2
6037 fi
6038done
6039 done
6040IFS=$as_save_IFS
6041
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006042fi
6043fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006044PYTHON=$ac_cv_prog_PYTHON
6045if test -n "$PYTHON"; then
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6047$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006048else
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6050$as_echo "no" >&6; }
6051fi
6052
6053
Matthias Klosec4c48422012-10-21 23:05:35 +02006054 test -n "$PYTHON" && break
6055done
6056test -n "$PYTHON" || PYTHON="not-found"
6057
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006058if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006059 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6060else
6061 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006062fi
6063
6064
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065case $MACHDEP in
6066bsdos*|hp*|HP*)
6067 # install -d does not work on BSDI or HP-UX
6068 if test -z "$INSTALL"
6069 then
6070 INSTALL="${srcdir}/install-sh -c"
6071 fi
6072esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073# Find a good install program. We prefer a C program (faster),
6074# so one script is as good as another. But avoid the broken or
6075# incompatible versions:
6076# SysV /etc/install, /usr/sbin/install
6077# SunOS /usr/etc/install
6078# IRIX /sbin/install
6079# AIX /bin/install
6080# AmigaOS /C/install, which installs bootblocks on floppy discs
6081# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6082# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6083# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6084# OS/2's system install, which has a completely different semantic
6085# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006086# Reject install programs that cannot install multiple files.
6087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6088$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006090if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092else
6093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6094for as_dir in $PATH
6095do
6096 IFS=$as_save_IFS
6097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 # Account for people who put trailing slashes in PATH elements.
6099case $as_dir/ in #((
6100 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103 /usr/ucb/* ) ;;
6104 *)
6105 # OSF1 and SCO ODT 3.0 have their own names for install.
6106 # Don't use installbsd from OSF since it installs stuff as root
6107 # by default.
6108 for ac_prog in ginstall scoinst install; do
6109 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006110 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006111 if test $ac_prog = install &&
6112 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6113 # AIX install. It has an incompatible calling convention.
6114 :
6115 elif test $ac_prog = install &&
6116 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6117 # program-specific install script used by HP pwplus--don't use.
6118 :
6119 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 rm -rf conftest.one conftest.two conftest.dir
6121 echo one > conftest.one
6122 echo two > conftest.two
6123 mkdir conftest.dir
6124 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6125 test -s conftest.one && test -s conftest.two &&
6126 test -s conftest.dir/conftest.one &&
6127 test -s conftest.dir/conftest.two
6128 then
6129 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6130 break 3
6131 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132 fi
6133 fi
6134 done
6135 done
6136 ;;
6137esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006138
6139 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006140IFS=$as_save_IFS
6141
Matthias Kloseb9621712010-04-24 17:59:49 +00006142rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143
6144fi
6145 if test "${ac_cv_path_install+set}" = set; then
6146 INSTALL=$ac_cv_path_install
6147 else
6148 # As a last resort, use the slow shell script. Don't cache a
6149 # value for INSTALL within a source directory, because that will
6150 # break other packages using the cache if that directory is
6151 # removed, or if the value is a relative name.
6152 INSTALL=$ac_install_sh
6153 fi
6154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6156$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157
6158# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6159# It thinks the first close brace ends the variable substitution.
6160test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6161
6162test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6163
6164test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6165
Matthias Klose93a0ef12012-03-15 18:08:34 +01006166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6167$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6168if test -z "$MKDIR_P"; then
6169 if ${ac_cv_path_mkdir+:} false; then :
6170 $as_echo_n "(cached) " >&6
6171else
6172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6174do
6175 IFS=$as_save_IFS
6176 test -z "$as_dir" && as_dir=.
6177 for ac_prog in mkdir gmkdir; do
6178 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006179 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006180 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6181 'mkdir (GNU coreutils) '* | \
6182 'mkdir (coreutils) '* | \
6183 'mkdir (fileutils) '4.1*)
6184 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6185 break 3;;
6186 esac
6187 done
6188 done
6189 done
6190IFS=$as_save_IFS
6191
6192fi
6193
6194 test -d ./--version && rmdir ./--version
6195 if test "${ac_cv_path_mkdir+set}" = set; then
6196 MKDIR_P="$ac_cv_path_mkdir -p"
6197 else
6198 # As a last resort, use the slow shell script. Don't cache a
6199 # value for MKDIR_P within a source directory, because that will
6200 # break other packages using the cache if that directory is
6201 # removed, or if the value is a relative name.
6202 MKDIR_P="$ac_install_sh -d"
6203 fi
6204fi
6205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6206$as_echo "$MKDIR_P" >&6; }
6207
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208
6209# Not every filesystem supports hard links
6210
6211if test -z "$LN" ; then
6212 case $ac_sys_system in
6213 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214 *) LN=ln;;
6215 esac
6216fi
6217
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006218# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006219
6220ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006221
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6224$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225
6226# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006227if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228 withval=$with_pydebug;
6229if test "$withval" != no
6230then
6231
Matthias Kloseb9621712010-04-24 17:59:49 +00006232$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233
Matthias Kloseb9621712010-04-24 17:59:49 +00006234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6235$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006237 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006238else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6239$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240fi
6241else
Matthias Kloseb9621712010-04-24 17:59:49 +00006242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6243$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244fi
6245
6246
6247# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6248# merged with this chunk of code?
6249
6250# Optimizer/debugger flags
6251# ------------------------
6252# (The following bit of code is complicated enough - please keep things
6253# indented properly. Just pretend you're editing Python code. ;-)
6254
6255# There are two parallel sets of case statements below, one that checks to
6256# see if OPT was set and one that does BASECFLAGS setting based upon
6257# compiler and platform. BASECFLAGS tweaks need to be made even if the
6258# user set OPT.
6259
6260# tweak OPT based on compiler and platform, only if the user didn't set
6261# it on the command line
6262
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006263if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264then
6265 case $GCC in
6266 yes)
6267 if test "$CC" != 'g++' ; then
6268 STRICT_PROTO="-Wstrict-prototypes"
6269 fi
6270 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6271 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6272 WRAP="-fwrapv"
6273 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006274
6275 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006276 case $CC in
6277 *clang*) WRAP="-fwrapv"
6278 ;;
6279 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006280
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 case $ac_cv_prog_cc_g in
6282 yes)
6283 if test "$Py_DEBUG" = 'true' ; then
6284 # Optimization messes up debuggers, so turn it off for
6285 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006286 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6287 OPT="-g -Og -Wall $STRICT_PROTO"
6288 else
6289 OPT="-g -O0 -Wall $STRICT_PROTO"
6290 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291 else
6292 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6293 fi
6294 ;;
6295 *)
6296 OPT="-O3 -Wall $STRICT_PROTO"
6297 ;;
6298 esac
6299 case $ac_sys_system in
6300 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6301 ;;
6302 esac
6303 ;;
6304
6305 *)
6306 OPT="-O"
6307 ;;
6308 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309fi
6310
6311
6312
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006313
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314# The -arch flags for universal builds on OSX
6315UNIVERSAL_ARCH_FLAGS=
6316
6317
6318# tweak BASECFLAGS based on compiler and platform
6319case $GCC in
6320yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006321 # Python doesn't violate C99 aliasing rules, but older versions of
6322 # GCC produce warnings for legal Python code. Enable
6323 # -fno-strict-aliasing on versions of GCC that support but produce
6324 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6326$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327 ac_save_cc="$CC"
6328 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006329 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006330 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006331 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006332else
Matthias Kloseb9621712010-04-24 17:59:49 +00006333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006335
Matthias Kloseb159a552010-04-25 21:00:44 +00006336
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006337int
6338main ()
6339{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006340
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006341 ;
6342 return 0;
6343}
Matthias Kloseb159a552010-04-25 21:00:44 +00006344
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006346if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006347
6348 CC="$ac_save_cc -fstrict-aliasing"
6349 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006351/* end confdefs.h. */
6352
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006353 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006354int
6355main ()
6356{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006357double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006358 ;
6359 return 0;
6360}
Matthias Kloseb159a552010-04-25 21:00:44 +00006361
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006363if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006364
6365 ac_cv_no_strict_aliasing=no
6366
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367else
Matthias Kloseb159a552010-04-25 21:00:44 +00006368
6369 ac_cv_no_strict_aliasing=yes
6370
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006371fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006373
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006374else
Matthias Kloseb159a552010-04-25 21:00:44 +00006375
6376 ac_cv_no_strict_aliasing=no
6377
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006380fi
6381
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006382 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6385$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006386 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387 then
6388 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6389 fi
6390
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6392$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6393 ac_save_cc="$CC"
6394 CC="$CC -Wunused-result -Werror"
6395 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006396 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006397 $as_echo_n "(cached) " >&6
6398else
6399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6400/* end confdefs.h. */
6401
6402
6403int
6404main ()
6405{
6406
6407 ;
6408 return 0;
6409}
6410
6411_ACEOF
6412if ac_fn_c_try_compile "$LINENO"; then :
6413
6414 ac_cv_disable_unused_result_warning=yes
6415
6416else
6417
6418 ac_cv_disable_unused_result_warning=no
6419
6420fi
6421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6422fi
6423
6424 CFLAGS="$save_CFLAGS"
6425 CC="$ac_save_cc"
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6427$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6428
6429 if test $ac_cv_disable_unused_result_warning = yes
6430 then
6431 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6432 fi
6433
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6435$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6436 ac_save_cc="$CC"
6437 CC="$CC -Werror=declaration-after-statement"
6438 save_CFLAGS="$CFLAGS"
6439 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6440 $as_echo_n "(cached) " >&6
6441else
6442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6443/* end confdefs.h. */
6444
6445
6446int
6447main ()
6448{
6449
6450 ;
6451 return 0;
6452}
6453
6454_ACEOF
6455if ac_fn_c_try_compile "$LINENO"; then :
6456
6457 ac_cv_declaration_after_statement_warning=yes
6458
6459else
6460
6461 ac_cv_declaration_after_statement_warning=no
6462
6463fi
6464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6465fi
6466
6467 CFLAGS="$save_CFLAGS"
6468 CC="$ac_save_cc"
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6470$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6471
6472 if test $ac_cv_declaration_after_statement_warning = yes
6473 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006474 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006475 fi
6476
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006477 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6478 # support. Without this, treatment of subnormals doesn't follow
6479 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006480 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006481 alpha*)
6482 BASECFLAGS="$BASECFLAGS -mieee"
6483 ;;
6484 esac
6485
6486 case $ac_sys_system in
6487 SCO_SV*)
6488 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6489 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006490
6491 # is there any other compiler on Darwin besides gcc?
6492 Darwin*)
6493 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6494 # used to be here, but non-Apple gcc doesn't accept them.
6495 if test "${CC}" = gcc
6496 then
6497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006498$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006499 case "${UNIVERSALSDK}" in
6500 */MacOSX10.4u.sdk)
6501 # Build using 10.4 SDK, force usage of gcc when the
6502 # compiler is gcc, otherwise the user will get very
6503 # confusing error messages when building on OSX 10.6
6504 CC=gcc-4.0
6505 CPP=cpp-4.0
6506 ;;
6507 esac
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006509$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006510 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511
Ned Deily87adb6e2013-10-18 21:09:56 -07006512 if test "${enable_universalsdk}"
6513 then
6514 case "$UNIVERSAL_ARCHS" in
6515 32-bit)
6516 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6517 LIPO_32BIT_FLAGS=""
6518 ARCH_RUN_32BIT=""
6519 ;;
6520 64-bit)
6521 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6522 LIPO_32BIT_FLAGS=""
6523 ARCH_RUN_32BIT="true"
6524 ;;
6525 all)
6526 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6527 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6528 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6529 ;;
6530 intel)
6531 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6532 LIPO_32BIT_FLAGS="-extract i386"
6533 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6534 ;;
6535 intel-32)
6536 UNIVERSAL_ARCH_FLAGS="-arch i386"
6537 LIPO_32BIT_FLAGS=""
6538 ARCH_RUN_32BIT=""
6539 ;;
6540 3-way)
6541 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6542 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6543 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6544 ;;
6545 *)
6546 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6547 ;;
6548 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006549
Ned Deily87adb6e2013-10-18 21:09:56 -07006550 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6551 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6552 if test "${UNIVERSALSDK}" != "/"
6553 then
6554 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6555 fi
6556 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006557
Ned Deily87adb6e2013-10-18 21:09:56 -07006558 # Calculate an appropriate deployment target for this build:
6559 # The deployment target value is used explicitly to enable certain
6560 # features are enabled (such as builtin libedit support for readline)
6561 # through the use of Apple's Availabiliy Macros and is used as a
6562 # component of the string returned by distutils.get_platform().
6563 #
6564 # Use the value from:
6565 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6566 # 2. the operating system version of the build machine if >= 10.6
6567 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6568 # below to pick either 10.3, 10.4, or 10.5 as the target.
6569 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006570
Ned Deily87adb6e2013-10-18 21:09:56 -07006571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6572$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006573 cur_target_major=`sw_vers -productVersion | \
6574 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6575 cur_target_minor=`sw_vers -productVersion | \
6576 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6577 cur_target="${cur_target_major}.${cur_target_minor}"
6578 if test ${cur_target_major} -eq 10 && \
6579 test ${cur_target_minor} -ge 3 && \
6580 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006581 then
Ned Deily36820b62014-06-25 13:44:22 -07006582 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006583 cur_target=10.3
6584 if test ${enable_universalsdk}
6585 then
6586 case "$UNIVERSAL_ARCHS" in
6587 all|3-way|intel|64-bit)
6588 # These configurations were first supported in 10.5
6589 cur_target='10.5'
6590 ;;
6591 esac
6592 else
6593 if test `/usr/bin/arch` = "i386"
6594 then
6595 # 10.4 was the first release to support Intel archs
6596 cur_target="10.4"
6597 fi
6598 fi
6599 fi
6600 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006601
Ned Deily87adb6e2013-10-18 21:09:56 -07006602 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6603 # environment with a value that is the same as what we'll use
6604 # in the Makefile to ensure that we'll get the same compiler
6605 # environment during configure and build time.
6606 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6607 export MACOSX_DEPLOYMENT_TARGET
6608 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6610$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006611
Ned Deily87adb6e2013-10-18 21:09:56 -07006612 # end of Darwin* tests
6613 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006614 esac
6615 ;;
6616
6617*)
6618 case $ac_sys_system in
6619 OpenUNIX*|UnixWare*)
6620 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6621 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006622 SCO_SV*)
6623 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6624 ;;
6625 esac
6626 ;;
6627esac
6628
6629if test "$Py_DEBUG" = 'true'; then
6630 :
6631else
6632 OPT="-DNDEBUG $OPT"
6633fi
6634
6635if test "$ac_arch_flags"
6636then
6637 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6638fi
6639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640# On some compilers, pthreads are available without further options
6641# (e.g. MacOS X). On some of these systems, the compiler will not
6642# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6643# So we have to see first whether pthreads are available without
6644# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6646$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006647if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006648 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006649else
Matthias Kloseb9621712010-04-24 17:59:49 +00006650 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006651 ac_cv_pthread_is_default=no
6652else
Matthias Kloseb9621712010-04-24 17:59:49 +00006653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006654/* end confdefs.h. */
6655
Stefan Krah7dba5942012-11-22 22:49:11 +01006656#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006657#include <pthread.h>
6658
6659void* routine(void* p){return NULL;}
6660
6661int main(){
6662 pthread_t p;
6663 if(pthread_create(&p,NULL,routine,NULL)!=0)
6664 return 1;
6665 (void)pthread_detach(p);
6666 return 0;
6667}
6668
6669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006670if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006671
6672 ac_cv_pthread_is_default=yes
6673 ac_cv_kthread=no
6674 ac_cv_pthread=no
6675
6676else
Matthias Kloseb9621712010-04-24 17:59:49 +00006677 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6680 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681fi
6682
6683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684fi
6685
Matthias Kloseb9621712010-04-24 17:59:49 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6687$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688
6689
6690if test $ac_cv_pthread_is_default = yes
6691then
6692 ac_cv_kpthread=no
6693else
6694# -Kpthread, if available, provides the right #defines
6695# and linker options to make pthread_create available
6696# Some compilers won't report that they do not support -Kpthread,
6697# so we need to run a program to see whether it really made the
6698# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6700$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006701if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006702 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006703else
6704 ac_save_cc="$CC"
6705CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006706if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006707 ac_cv_kpthread=no
6708else
Matthias Kloseb9621712010-04-24 17:59:49 +00006709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006710/* end confdefs.h. */
6711
Stefan Krah7dba5942012-11-22 22:49:11 +01006712#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713#include <pthread.h>
6714
6715void* routine(void* p){return NULL;}
6716
6717int main(){
6718 pthread_t p;
6719 if(pthread_create(&p,NULL,routine,NULL)!=0)
6720 return 1;
6721 (void)pthread_detach(p);
6722 return 0;
6723}
6724
6725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006726if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727 ac_cv_kpthread=yes
6728else
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733fi
6734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006735CC="$ac_save_cc"
6736fi
6737
Matthias Kloseb9621712010-04-24 17:59:49 +00006738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6739$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740fi
6741
6742if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6743then
6744# -Kthread, if available, provides the right #defines
6745# and linker options to make pthread_create available
6746# Some compilers won't report that they do not support -Kthread,
6747# so we need to run a program to see whether it really made the
6748# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6750$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006751if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006752 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006753else
6754 ac_save_cc="$CC"
6755CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006756if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757 ac_cv_kthread=no
6758else
Matthias Kloseb9621712010-04-24 17:59:49 +00006759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760/* end confdefs.h. */
6761
Stefan Krah7dba5942012-11-22 22:49:11 +01006762#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763#include <pthread.h>
6764
6765void* routine(void* p){return NULL;}
6766
6767int main(){
6768 pthread_t p;
6769 if(pthread_create(&p,NULL,routine,NULL)!=0)
6770 return 1;
6771 (void)pthread_detach(p);
6772 return 0;
6773}
6774
6775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006776if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006777 ac_cv_kthread=yes
6778else
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783fi
6784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006785CC="$ac_save_cc"
6786fi
6787
Matthias Kloseb9621712010-04-24 17:59:49 +00006788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6789$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790fi
6791
6792if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6793then
6794# -pthread, if available, provides the right #defines
6795# and linker options to make pthread_create available
6796# Some compilers won't report that they do not support -pthread,
6797# so we need to run a program to see whether it really made the
6798# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6800$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006801if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006802 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006803else
6804 ac_save_cc="$CC"
6805CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006806if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807 ac_cv_pthread=no
6808else
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810/* end confdefs.h. */
6811
Stefan Krah7dba5942012-11-22 22:49:11 +01006812#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813#include <pthread.h>
6814
6815void* routine(void* p){return NULL;}
6816
6817int main(){
6818 pthread_t p;
6819 if(pthread_create(&p,NULL,routine,NULL)!=0)
6820 return 1;
6821 (void)pthread_detach(p);
6822 return 0;
6823}
6824
6825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006826if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827 ac_cv_pthread=yes
6828else
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006833fi
6834
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835CC="$ac_save_cc"
6836fi
6837
Matthias Kloseb9621712010-04-24 17:59:49 +00006838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6839$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840fi
6841
6842# If we have set a CC compiler flag for thread support then
6843# check if it works for CXX, too.
6844ac_cv_cxx_thread=no
6845if test ! -z "$CXX"
6846then
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6848$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849ac_save_cxx="$CXX"
6850
6851if test "$ac_cv_kpthread" = "yes"
6852then
6853 CXX="$CXX -Kpthread"
6854 ac_cv_cxx_thread=yes
6855elif test "$ac_cv_kthread" = "yes"
6856then
6857 CXX="$CXX -Kthread"
6858 ac_cv_cxx_thread=yes
6859elif test "$ac_cv_pthread" = "yes"
6860then
6861 CXX="$CXX -pthread"
6862 ac_cv_cxx_thread=yes
6863fi
6864
6865if test $ac_cv_cxx_thread = yes
6866then
6867 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6868 $CXX -c conftest.$ac_ext 2>&5
6869 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6870 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6871 then
6872 ac_cv_cxx_thread=yes
6873 else
6874 ac_cv_cxx_thread=no
6875 fi
6876 rm -fr conftest*
6877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6879$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880fi
6881CXX="$ac_save_cxx"
6882
6883
6884# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6886$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006887if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889else
Matthias Kloseb9621712010-04-24 17:59:49 +00006890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891/* end confdefs.h. */
6892#include <stdlib.h>
6893#include <stdarg.h>
6894#include <string.h>
6895#include <float.h>
6896
6897int
6898main ()
6899{
6900
6901 ;
6902 return 0;
6903}
6904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006905if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906 ac_cv_header_stdc=yes
6907else
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6911
6912if test $ac_cv_header_stdc = yes; then
6913 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915/* end confdefs.h. */
6916#include <string.h>
6917
6918_ACEOF
6919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006920 $EGREP "memchr" >/dev/null 2>&1; then :
6921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922else
6923 ac_cv_header_stdc=no
6924fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006925rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926
6927fi
6928
6929if test $ac_cv_header_stdc = yes; then
6930 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932/* end confdefs.h. */
6933#include <stdlib.h>
6934
6935_ACEOF
6936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006937 $EGREP "free" >/dev/null 2>&1; then :
6938
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939else
6940 ac_cv_header_stdc=no
6941fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006942rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006943
6944fi
6945
6946if test $ac_cv_header_stdc = yes; then
6947 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949 :
6950else
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006952/* end confdefs.h. */
6953#include <ctype.h>
6954#include <stdlib.h>
6955#if ((' ' & 0x0FF) == 0x020)
6956# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6957# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6958#else
6959# define ISLOWER(c) \
6960 (('a' <= (c) && (c) <= 'i') \
6961 || ('j' <= (c) && (c) <= 'r') \
6962 || ('s' <= (c) && (c) <= 'z'))
6963# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6964#endif
6965
6966#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6967int
6968main ()
6969{
6970 int i;
6971 for (i = 0; i < 256; i++)
6972 if (XOR (islower (i), ISLOWER (i))
6973 || toupper (i) != TOUPPER (i))
6974 return 2;
6975 return 0;
6976}
6977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006978if ac_fn_c_try_run "$LINENO"; then :
6979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980else
Matthias Kloseb9621712010-04-24 17:59:49 +00006981 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6984 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006985fi
6986
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006987fi
6988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6990$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991if test $ac_cv_header_stdc = yes; then
6992
Matthias Kloseb9621712010-04-24 17:59:49 +00006993$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994
6995fi
6996
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006997for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006998fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006999ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007000sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007001unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007002poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007003sys/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 +01007004sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007005sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007006sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007007sys/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 -07007008libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007009bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7010sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007011do :
7012 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7013ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007014if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007016#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007017_ACEOF
7018
7019fi
7020
Guido van Rossum627b2d71993-12-24 10:39:16 +00007021done
7022
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007023ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007024for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7027$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007028if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007030else
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007032/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007033#include <sys/types.h>
7034#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007035
Martin v. Löwis11437992002-04-12 09:54:03 +00007036int
7037main ()
7038{
7039if ((DIR *) 0)
7040return 0;
7041 ;
7042 return 0;
7043}
7044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007045if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007046 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007047else
Matthias Kloseb9621712010-04-24 17:59:49 +00007048 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007052eval ac_res=\$$as_ac_Header
7053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7054$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007055if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007056 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007057#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007058_ACEOF
7059
7060ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007062
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007063done
7064# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7065if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7067$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007068if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007069 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007070else
Martin v. Löwis11437992002-04-12 09:54:03 +00007071 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007075/* Override any GCC internal prototype to avoid an error.
7076 Use char because int might match the return type of a GCC
7077 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007078#ifdef __cplusplus
7079extern "C"
7080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007081char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007082int
7083main ()
7084{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007085return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007086 ;
7087 return 0;
7088}
7089_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007090for ac_lib in '' dir; do
7091 if test -z "$ac_lib"; then
7092 ac_res="none required"
7093 else
7094 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007095 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007096 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007097 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007098 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007100rm -f core conftest.err conftest.$ac_objext \
7101 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007102 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007103 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007105done
Victor Stinnere0be4232011-10-25 13:06:09 +02007106if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007108else
7109 ac_cv_search_opendir=no
7110fi
7111rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007112LIBS=$ac_func_search_save_LIBS
7113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7115$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007116ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007117if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007118 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007119
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007120fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007121
Michael W. Hudson54241132001-12-07 15:38:26 +00007122else
Matthias Kloseb9621712010-04-24 17:59:49 +00007123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7124$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007125if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007126 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007127else
7128 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007132/* Override any GCC internal prototype to avoid an error.
7133 Use char because int might match the return type of a GCC
7134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007135#ifdef __cplusplus
7136extern "C"
7137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007138char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007139int
7140main ()
7141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007142return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007143 ;
7144 return 0;
7145}
7146_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007147for ac_lib in '' x; do
7148 if test -z "$ac_lib"; then
7149 ac_res="none required"
7150 else
7151 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007152 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007153 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007155 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007157rm -f core conftest.err conftest.$ac_objext \
7158 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007159 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007160 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007162done
Victor Stinnere0be4232011-10-25 13:06:09 +02007163if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007164
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007165else
7166 ac_cv_search_opendir=no
7167fi
7168rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007169LIBS=$ac_func_search_save_LIBS
7170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7172$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007173ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007174if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007175 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007177fi
7178
7179fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007180
Matthias Kloseb9621712010-04-24 17:59:49 +00007181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7182$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007183if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007184 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007185else
Matthias Kloseb9621712010-04-24 17:59:49 +00007186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007187/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007188#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007189int
7190main ()
7191{
7192return makedev(0, 0);
7193 ;
7194 return 0;
7195}
7196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007197if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007198 ac_cv_header_sys_types_h_makedev=yes
7199else
Matthias Kloseb9621712010-04-24 17:59:49 +00007200 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007202rm -f core conftest.err conftest.$ac_objext \
7203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007204
7205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7207$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007208
7209if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007210ac_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 +02007211if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007212
Matthias Kloseb9621712010-04-24 17:59:49 +00007213$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007214
7215fi
7216
7217
7218
7219 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007220 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 +02007221if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007222
Matthias Kloseb9621712010-04-24 17:59:49 +00007223$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007224
7225fi
7226
7227
7228 fi
7229fi
7230
Michael W. Hudson54241132001-12-07 15:38:26 +00007231
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007232# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7233for ac_header in net/if.h
7234do :
7235 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7236#ifdef STDC_HEADERS
7237# include <stdlib.h>
7238# include <stddef.h>
7239#else
7240# ifdef HAVE_STDLIB_H
7241# include <stdlib.h>
7242# endif
7243#endif
7244#ifdef HAVE_SYS_SOCKET_H
7245# include <sys/socket.h>
7246#endif
7247
7248"
Victor Stinnere0be4232011-10-25 13:06:09 +02007249if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007250 cat >>confdefs.h <<_ACEOF
7251#define HAVE_NET_IF_H 1
7252_ACEOF
7253
7254fi
7255
7256done
7257
7258
Martin v. Löwis11017b12006-01-14 18:12:57 +00007259# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007260for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007261do :
7262 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 +00007263#ifdef HAVE_ASM_TYPES_H
7264#include <asm/types.h>
7265#endif
7266#ifdef HAVE_SYS_SOCKET_H
7267#include <sys/socket.h>
7268#endif
7269
Matthias Kloseb9621712010-04-24 17:59:49 +00007270"
Victor Stinnere0be4232011-10-25 13:06:09 +02007271if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007272 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007273#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007274_ACEOF
7275
7276fi
7277
7278done
7279
7280
Charles-François Natali47413c12011-10-06 19:47:44 +02007281# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007282for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007283do :
7284 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7285ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7286#ifdef HAVE_SYS_SOCKET_H
7287#include <sys/socket.h>
7288#endif
7289
7290"
7291if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7292 cat >>confdefs.h <<_ACEOF
7293#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7294_ACEOF
7295
7296fi
7297
7298done
7299
7300
Guido van Rossum627b2d71993-12-24 10:39:16 +00007301# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007302was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7304$as_echo_n "checking for clock_t in time.h... " >&6; }
7305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007306/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007307#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007308
7309_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007310if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007311 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007312 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007313else
Martin v. Löwis11437992002-04-12 09:54:03 +00007314
7315
Matthias Kloseb9621712010-04-24 17:59:49 +00007316$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007317
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007318
Guido van Rossum627b2d71993-12-24 10:39:16 +00007319fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007320rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007321
Matthias Kloseb9621712010-04-24 17:59:49 +00007322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7323$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007324
Matthias Kloseb9621712010-04-24 17:59:49 +00007325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7326$as_echo_n "checking for makedev... " >&6; }
7327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007328/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007329
Jesus Cea740f53a2010-04-28 11:35:30 +00007330#if defined(MAJOR_IN_MKDEV)
7331#include <sys/mkdev.h>
7332#elif defined(MAJOR_IN_SYSMACROS)
7333#include <sys/sysmacros.h>
7334#else
7335#include <sys/types.h>
7336#endif
7337
Neal Norwitz11690112002-07-30 01:08:28 +00007338int
7339main ()
7340{
Jesus Cea740f53a2010-04-28 11:35:30 +00007341
7342 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007343 ;
7344 return 0;
7345}
Matthias Kloseb159a552010-04-25 21:00:44 +00007346
Neal Norwitz11690112002-07-30 01:08:28 +00007347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007348if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007349 ac_cv_has_makedev=yes
7350else
Matthias Kloseb9621712010-04-24 17:59:49 +00007351 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007352fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007353rm -f core conftest.err conftest.$ac_objext \
7354 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7356$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007357if test "$ac_cv_has_makedev" = "yes"; then
7358
Matthias Kloseb9621712010-04-24 17:59:49 +00007359$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007360
7361fi
7362
Christian Heimes985ecdc2013-11-20 11:46:18 +01007363# byte swapping
7364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7365$as_echo_n "checking for le64toh... " >&6; }
7366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7367/* end confdefs.h. */
7368
7369#ifdef HAVE_ENDIAN_H
7370#include <endian.h>
7371#elif defined(HAVE_SYS_ENDIAN_H)
7372#include <sys/endian.h>
7373#endif
7374
7375int
7376main ()
7377{
7378
7379 le64toh(1)
7380 ;
7381 return 0;
7382}
7383
7384_ACEOF
7385if ac_fn_c_try_link "$LINENO"; then :
7386 ac_cv_has_le64toh=yes
7387else
7388 ac_cv_has_le64toh=no
7389fi
7390rm -f core conftest.err conftest.$ac_objext \
7391 conftest$ac_exeext conftest.$ac_ext
7392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7393$as_echo "$ac_cv_has_le64toh" >&6; }
7394if test "$ac_cv_has_le64toh" = "yes"; then
7395
7396$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7397
7398fi
7399
Martin v. Löwis399a6892002-10-04 10:22:02 +00007400# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7401# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7402# defined, but the compiler does not support pragma redefine_extname,
7403# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7404# structures (such as rlimit64) without declaring them. As a
7405# work-around, disable LFS on such configurations
7406
7407use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7409$as_echo_n "checking Solaris LFS bug... " >&6; }
7410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007411/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007412
7413#define _LARGEFILE_SOURCE 1
7414#define _FILE_OFFSET_BITS 64
7415#include <sys/resource.h>
7416
Martin v. Löwis399a6892002-10-04 10:22:02 +00007417int
7418main ()
7419{
7420struct rlimit foo;
7421 ;
7422 return 0;
7423}
7424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007426 sol_lfs_bug=no
7427else
Matthias Kloseb9621712010-04-24 17:59:49 +00007428 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7432$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007433if test "$sol_lfs_bug" = "yes"; then
7434 use_lfs=no
7435fi
7436
7437if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007438# Two defines needed to enable largefile support on various platforms
7439# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007440case $ac_sys_system/$ac_sys_release in
7441AIX*)
7442
7443$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7444
7445 ;;
7446esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007447
Matthias Kloseb9621712010-04-24 17:59:49 +00007448$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007449
7450
Matthias Kloseb9621712010-04-24 17:59:49 +00007451$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007452
Martin v. Löwis399a6892002-10-04 10:22:02 +00007453fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007454
Guido van Rossum84e7b241996-08-19 21:59:00 +00007455# Add some code to confdefs.h so that the test for off_t works on SCO
7456cat >> confdefs.h <<\EOF
7457#if defined(SCO_DS)
7458#undef _OFF_T
7459#endif
7460EOF
7461
Guido van Rossumef2255b2000-03-10 22:30:29 +00007462# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007463ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007464if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007465
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007466else
Martin v. Löwis11437992002-04-12 09:54:03 +00007467
7468cat >>confdefs.h <<_ACEOF
7469#define mode_t int
7470_ACEOF
7471
7472fi
7473
Matthias Kloseb9621712010-04-24 17:59:49 +00007474ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007475if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007476
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007477else
Martin v. Löwis11437992002-04-12 09:54:03 +00007478
7479cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007480#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007481_ACEOF
7482
7483fi
7484
Matthias Kloseb9621712010-04-24 17:59:49 +00007485ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007486if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007487
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007488else
Martin v. Löwis11437992002-04-12 09:54:03 +00007489
7490cat >>confdefs.h <<_ACEOF
7491#define pid_t int
7492_ACEOF
7493
7494fi
7495
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007496
Martin v. Löwis11437992002-04-12 09:54:03 +00007497cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007498#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007499_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007500
Matthias Kloseb9621712010-04-24 17:59:49 +00007501ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007502if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007503
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007504else
Martin v. Löwis11437992002-04-12 09:54:03 +00007505
7506cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007507#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007508_ACEOF
7509
7510fi
7511
Matthias Kloseb9621712010-04-24 17:59:49 +00007512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7513$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007514if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007515 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007516else
Matthias Kloseb9621712010-04-24 17:59:49 +00007517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007518/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007519#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007520
7521_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007523 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007524 ac_cv_type_uid_t=yes
7525else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007526 ac_cv_type_uid_t=no
7527fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007528rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007529
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7532$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007533if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007534
Matthias Kloseb9621712010-04-24 17:59:49 +00007535$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007536
7537
Matthias Kloseb9621712010-04-24 17:59:49 +00007538$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007539
7540fi
7541
Mark Dickinson983bc162012-12-02 12:11:38 +00007542
7543# There are two separate checks for each of the exact-width integer types we
7544# need. First we check whether the type is available using the usual
7545# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7546# and <stdint.h> where available). We then also use the special type checks of
7547# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7548# directly, #define's uint32_t to be a suitable type.
7549
7550ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7551if test "x$ac_cv_type_uint32_t" = xyes; then :
7552
7553$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7554
7555fi
7556
Matthias Kloseb9621712010-04-24 17:59:49 +00007557ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7558case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007559 no|yes) ;; #(
7560 *)
7561
Matthias Kloseb9621712010-04-24 17:59:49 +00007562$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007563
7564
7565cat >>confdefs.h <<_ACEOF
7566#define uint32_t $ac_cv_c_uint32_t
7567_ACEOF
7568;;
7569 esac
7570
Mark Dickinson983bc162012-12-02 12:11:38 +00007571
7572ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7573if test "x$ac_cv_type_uint64_t" = xyes; then :
7574
7575$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7576
7577fi
7578
Matthias Kloseb9621712010-04-24 17:59:49 +00007579ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7580case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007581 no|yes) ;; #(
7582 *)
7583
Matthias Kloseb9621712010-04-24 17:59:49 +00007584$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007585
7586
7587cat >>confdefs.h <<_ACEOF
7588#define uint64_t $ac_cv_c_uint64_t
7589_ACEOF
7590;;
7591 esac
7592
Mark Dickinson983bc162012-12-02 12:11:38 +00007593
7594ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7595if test "x$ac_cv_type_int32_t" = xyes; then :
7596
7597$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7598
7599fi
7600
Matthias Kloseb9621712010-04-24 17:59:49 +00007601ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7602case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007603 no|yes) ;; #(
7604 *)
7605
7606cat >>confdefs.h <<_ACEOF
7607#define int32_t $ac_cv_c_int32_t
7608_ACEOF
7609;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007610esac
7611
Mark Dickinson983bc162012-12-02 12:11:38 +00007612
7613ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7614if test "x$ac_cv_type_int64_t" = xyes; then :
7615
7616$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7617
7618fi
7619
Matthias Kloseb9621712010-04-24 17:59:49 +00007620ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7621case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007622 no|yes) ;; #(
7623 *)
7624
7625cat >>confdefs.h <<_ACEOF
7626#define int64_t $ac_cv_c_int64_t
7627_ACEOF
7628;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007629esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007630
Mark Dickinson983bc162012-12-02 12:11:38 +00007631
Matthias Kloseb9621712010-04-24 17:59:49 +00007632ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007633if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007634
Matthias Kloseb9621712010-04-24 17:59:49 +00007635$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007636
7637fi
7638
Stefan Krah1919b7e2012-03-21 18:25:23 +01007639ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7640if test "x$ac_cv_type___uint128_t" = xyes; then :
7641
7642$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7643
7644fi
7645
Jack Jansendd19cf82001-12-06 22:36:17 +00007646
Michael W. Hudson54241132001-12-07 15:38:26 +00007647# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007648# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007649# The cast to long int works around a bug in the HP C Compiler
7650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7652# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7654$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007655if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007656 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007657else
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 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 +00007659
Martin v. Löwis11437992002-04-12 09:54:03 +00007660else
Matthias Kloseb9621712010-04-24 17:59:49 +00007661 if test "$ac_cv_type_int" = yes; then
7662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007664as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007665See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007666 else
7667 ac_cv_sizeof_int=0
7668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670
Martin v. Löwis11437992002-04-12 09:54:03 +00007671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7673$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007674
7675
7676
Martin v. Löwis11437992002-04-12 09:54:03 +00007677cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007678#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007679_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007680
7681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682# The cast to long int works around a bug in the HP C Compiler
7683# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7684# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7685# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7687$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007688if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007689 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007690else
Matthias Kloseb9621712010-04-24 17:59:49 +00007691 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 +00007692
Martin v. Löwis11437992002-04-12 09:54:03 +00007693else
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 if test "$ac_cv_type_long" = yes; then
7695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007697as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007698See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699 else
7700 ac_cv_sizeof_long=0
7701 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007703
Martin v. Löwis11437992002-04-12 09:54:03 +00007704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7706$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007707
7708
7709
Martin v. Löwis11437992002-04-12 09:54:03 +00007710cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007711#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007712_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007713
7714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715# The cast to long int works around a bug in the HP C Compiler
7716# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7717# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7718# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7720$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007721if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007722 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007723else
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 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 +00007725
Martin v. Löwis11437992002-04-12 09:54:03 +00007726else
Matthias Kloseb9621712010-04-24 17:59:49 +00007727 if test "$ac_cv_type_void_p" = yes; then
7728 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7729$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007730as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007731See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732 else
7733 ac_cv_sizeof_void_p=0
7734 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007736
Martin v. Löwis11437992002-04-12 09:54:03 +00007737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7739$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740
7741
7742
Martin v. Löwis11437992002-04-12 09:54:03 +00007743cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007744#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007745_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007746
7747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748# The cast to long int works around a bug in the HP C Compiler
7749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7751# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7753$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007754if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007755 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007756else
Matthias Kloseb9621712010-04-24 17:59:49 +00007757 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 +00007758
Martin v. Löwis11437992002-04-12 09:54:03 +00007759else
Matthias Kloseb9621712010-04-24 17:59:49 +00007760 if test "$ac_cv_type_short" = yes; then
7761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007763as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007764See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007765 else
7766 ac_cv_sizeof_short=0
7767 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007769
Martin v. Löwis11437992002-04-12 09:54:03 +00007770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7772$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773
7774
7775
Martin v. Löwis11437992002-04-12 09:54:03 +00007776cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007777#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007778_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007779
7780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781# The cast to long int works around a bug in the HP C Compiler
7782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7784# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7786$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007787if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007789else
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 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 +00007791
Martin v. Löwis11437992002-04-12 09:54:03 +00007792else
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 if test "$ac_cv_type_float" = yes; then
7794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007796as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007797See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798 else
7799 ac_cv_sizeof_float=0
7800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007802
Martin v. Löwis11437992002-04-12 09:54:03 +00007803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7805$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806
7807
7808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007810#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007811_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007812
7813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814# The cast to long int works around a bug in the HP C Compiler
7815# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7816# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7817# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7819$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007820if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 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 +00007824
Martin v. Löwis11437992002-04-12 09:54:03 +00007825else
Matthias Kloseb9621712010-04-24 17:59:49 +00007826 if test "$ac_cv_type_double" = yes; then
7827 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007829as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007830See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831 else
7832 ac_cv_sizeof_double=0
7833 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007835
Martin v. Löwis11437992002-04-12 09:54:03 +00007836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7838$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839
7840
7841
Martin v. Löwis11437992002-04-12 09:54:03 +00007842cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007843#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007844_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007845
7846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847# The cast to long int works around a bug in the HP C Compiler
7848# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7849# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7850# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7852$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007853if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007854 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007855else
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 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 +00007857
Martin v. Löwis11437992002-04-12 09:54:03 +00007858else
Matthias Kloseb9621712010-04-24 17:59:49 +00007859 if test "$ac_cv_type_fpos_t" = yes; then
7860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007862as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007863See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864 else
7865 ac_cv_sizeof_fpos_t=0
7866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007868
Martin v. Löwis11437992002-04-12 09:54:03 +00007869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7871$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872
7873
7874
Martin v. Löwis11437992002-04-12 09:54:03 +00007875cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007876#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007877_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007878
Michael W. Hudson54241132001-12-07 15:38:26 +00007879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880# The cast to long int works around a bug in the HP C Compiler
7881# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7882# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7883# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7885$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007886if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007888else
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 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 +00007890
Martin v. Löwis18e16552006-02-15 17:27:45 +00007891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 if test "$ac_cv_type_size_t" = yes; then
7893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007895as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007896See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897 else
7898 ac_cv_sizeof_size_t=0
7899 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007901
Martin v. Löwis18e16552006-02-15 17:27:45 +00007902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7904$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905
7906
7907
Martin v. Löwis18e16552006-02-15 17:27:45 +00007908cat >>confdefs.h <<_ACEOF
7909#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7910_ACEOF
7911
7912
Christian Heimes400adb02008-02-01 08:12:03 +00007913# The cast to long int works around a bug in the HP C Compiler
7914# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7915# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7916# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7918$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007919if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007920 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007921else
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 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 +00007923
Christian Heimes400adb02008-02-01 08:12:03 +00007924else
Matthias Kloseb9621712010-04-24 17:59:49 +00007925 if test "$ac_cv_type_pid_t" = yes; then
7926 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7927$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007928as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007929See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007930 else
7931 ac_cv_sizeof_pid_t=0
7932 fi
7933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007934
Christian Heimes400adb02008-02-01 08:12:03 +00007935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7937$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007938
7939
7940
7941cat >>confdefs.h <<_ACEOF
7942#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7943_ACEOF
7944
7945
Michael W. Hudson54241132001-12-07 15:38:26 +00007946
Matthias Kloseb9621712010-04-24 17:59:49 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7948$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007949have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007951/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007952
Martin v. Löwis11437992002-04-12 09:54:03 +00007953int
7954main ()
7955{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007956long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 ;
7958 return 0;
7959}
7960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007961if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007962
7963
Matthias Kloseb9621712010-04-24 17:59:49 +00007964$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007966 have_long_long=yes
7967
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7971$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007972if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973# The cast to long int works around a bug in the HP C Compiler
7974# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7975# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7976# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7978$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007979if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007980 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007981else
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 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 +00007983
Martin v. Löwis11437992002-04-12 09:54:03 +00007984else
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 if test "$ac_cv_type_long_long" = yes; then
7986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007988as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007989See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990 else
7991 ac_cv_sizeof_long_long=0
7992 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007994
Martin v. Löwis11437992002-04-12 09:54:03 +00007995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7997$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998
7999
8000
Martin v. Löwis11437992002-04-12 09:54:03 +00008001cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008002#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008003_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008004
Michael W. Hudson54241132001-12-07 15:38:26 +00008005
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008006fi
8007
Matthias Kloseb9621712010-04-24 17:59:49 +00008008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8009$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008010have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008012/* end confdefs.h. */
8013
8014int
8015main ()
8016{
8017long double x; x = (long double)0;
8018 ;
8019 return 0;
8020}
8021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008022if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008023
8024
Matthias Kloseb9621712010-04-24 17:59:49 +00008025$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008026
8027 have_long_double=yes
8028
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008029fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8032$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008033if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008034# The cast to long int works around a bug in the HP C Compiler
8035# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8036# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8037# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8039$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008040if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008042else
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 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 +00008044
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008045else
Matthias Kloseb9621712010-04-24 17:59:49 +00008046 if test "$ac_cv_type_long_double" = yes; then
8047 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8048$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008049as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008050See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008051 else
8052 ac_cv_sizeof_long_double=0
8053 fi
8054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008055
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8058$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008059
8060
8061
8062cat >>confdefs.h <<_ACEOF
8063#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8064_ACEOF
8065
8066
8067fi
8068
8069
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8071$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008072have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008074/* end confdefs.h. */
8075
8076int
8077main ()
8078{
8079_Bool x; x = (_Bool)0;
8080 ;
8081 return 0;
8082}
8083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008084if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008085
8086
Matthias Kloseb9621712010-04-24 17:59:49 +00008087$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008088
8089 have_c99_bool=yes
8090
Thomas Woutersb2137042007-02-01 18:02:27 +00008091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8094$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008095if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096# The cast to long int works around a bug in the HP C Compiler
8097# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8098# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8099# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8101$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008102if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008104else
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 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 +00008106
Thomas Woutersb2137042007-02-01 18:02:27 +00008107else
Matthias Kloseb9621712010-04-24 17:59:49 +00008108 if test "$ac_cv_type__Bool" = yes; then
8109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008111as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008112See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113 else
8114 ac_cv_sizeof__Bool=0
8115 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008117
Thomas Woutersb2137042007-02-01 18:02:27 +00008118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8120$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121
8122
8123
Thomas Woutersb2137042007-02-01 18:02:27 +00008124cat >>confdefs.h <<_ACEOF
8125#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8126_ACEOF
8127
8128
8129fi
8130
Matthias Kloseb9621712010-04-24 17:59:49 +00008131ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008132 #include <stdint.h>
8133 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008134 #ifdef HAVE_INTTYPES_H
8135 #include <inttypes.h>
8136 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008137"
Victor Stinnere0be4232011-10-25 13:06:09 +02008138if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008139
8140cat >>confdefs.h <<_ACEOF
8141#define HAVE_UINTPTR_T 1
8142_ACEOF
8143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144# The cast to long int works around a bug in the HP C Compiler
8145# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8146# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8147# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8149$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008150if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008151 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008152else
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 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 +00008154
Martin v. Löwis11437992002-04-12 09:54:03 +00008155else
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 if test "$ac_cv_type_uintptr_t" = yes; then
8157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008159as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008160See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008161 else
8162 ac_cv_sizeof_uintptr_t=0
8163 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008165
Martin v. Löwis11437992002-04-12 09:54:03 +00008166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8168$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008169
8170
8171
Martin v. Löwis11437992002-04-12 09:54:03 +00008172cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008173#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008174_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008175
Michael W. Hudson54241132001-12-07 15:38:26 +00008176
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008177fi
8178
Thomas Wouters89f507f2006-12-13 04:49:30 +00008179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +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 off_t" >&5
8185$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008186if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008188else
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008190#ifdef HAVE_SYS_TYPES_H
8191#include <sys/types.h>
8192#endif
8193
Matthias Kloseb9621712010-04-24 17:59:49 +00008194"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008195
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008196else
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 if test "$ac_cv_type_off_t" = yes; then
8198 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8199$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008200as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008201See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008202 else
8203 ac_cv_sizeof_off_t=0
8204 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008206
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8209$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008210
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008211
8212
Martin v. Löwis11437992002-04-12 09:54:03 +00008213cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008214#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008215_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008216
Michael W. Hudson54241132001-12-07 15:38:26 +00008217
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008218
Matthias Kloseb9621712010-04-24 17:59:49 +00008219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8220$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008221if test "$have_long_long" = yes
8222then
8223if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008224 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008225
Matthias Kloseb9621712010-04-24 17:59:49 +00008226$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008227
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8229$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008230else
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8232$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008233fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008234else
Matthias Kloseb9621712010-04-24 17:59:49 +00008235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008237fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008239# The cast to long int works around a bug in the HP C Compiler
8240# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8241# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8242# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8244$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008245if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008247else
Matthias Kloseb9621712010-04-24 17:59:49 +00008248 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008249#ifdef HAVE_SYS_TYPES_H
8250#include <sys/types.h>
8251#endif
8252#ifdef HAVE_TIME_H
8253#include <time.h>
8254#endif
8255
Matthias Kloseb9621712010-04-24 17:59:49 +00008256"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008257
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008258else
Matthias Kloseb9621712010-04-24 17:59:49 +00008259 if test "$ac_cv_type_time_t" = yes; then
8260 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8261$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008262as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008263See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008264 else
8265 ac_cv_sizeof_time_t=0
8266 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008268
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8271$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008272
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008273
8274
Martin v. Löwis11437992002-04-12 09:54:03 +00008275cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008276#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008277_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008278
Michael W. Hudson54241132001-12-07 15:38:26 +00008279
8280
Trent Mick635f6fb2000-08-23 21:33:05 +00008281# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008282ac_save_cc="$CC"
8283if test "$ac_cv_kpthread" = "yes"
8284then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008285elif test "$ac_cv_kthread" = "yes"
8286then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008287elif test "$ac_cv_pthread" = "yes"
8288then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008289fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008290
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8292$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008293have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008295/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008296
8297 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008298int
8299main ()
8300{
Guido van Rossum12580492000-09-24 16:47:19 +00008301pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008302 ;
8303 return 0;
8304}
Matthias Kloseb159a552010-04-25 21:00:44 +00008305
Martin v. Löwis11437992002-04-12 09:54:03 +00008306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008307if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008308 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8312$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008313if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008314 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008315# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8316# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8317# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8319$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008320if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008322else
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008324#ifdef HAVE_PTHREAD_H
8325#include <pthread.h>
8326#endif
8327
Matthias Kloseb9621712010-04-24 17:59:49 +00008328"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008329
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008330else
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 if test "$ac_cv_type_pthread_t" = yes; then
8332 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008334as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008335See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008336 else
8337 ac_cv_sizeof_pthread_t=0
8338 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008340
Trent Mick635f6fb2000-08-23 21:33:05 +00008341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8343$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008344
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008345
8346
Martin v. Löwis11437992002-04-12 09:54:03 +00008347cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008348#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008349_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008350
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008351
Trent Mick635f6fb2000-08-23 21:33:05 +00008352fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008353CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008354
Michael W. Hudson54241132001-12-07 15:38:26 +00008355
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008356case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008357 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008358 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8359 ;;
8360 Darwin/*)
8361 OTHER_LIBTOOL_OPT=""
8362 ;;
8363esac
8364
8365
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008366
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008367case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008368 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008369 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8370 if test "${enable_universalsdk}"; then
8371 :
8372 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008373 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008374 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008375 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008376 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008377 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008378 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008379 if test ${gcc_version} '<' 4.0
8380 then
8381 LIBTOOL_CRUFT="-lcc_dynamic"
8382 else
8383 LIBTOOL_CRUFT=""
8384 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008386 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008387else
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008389/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008390
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008391 #include <unistd.h>
8392 int main(int argc, char*argv[])
8393 {
8394 if (sizeof(long) == 4) {
8395 return 0;
8396 } else {
8397 return 1;
8398 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008399 }
8400
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008402if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008403 ac_osx_32bit=yes
8404else
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8408 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008409fi
8410
8411
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008412 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008413 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008414 i386)
8415 MACOSX_DEFAULT_ARCH="i386"
8416 ;;
8417 ppc)
8418 MACOSX_DEFAULT_ARCH="ppc"
8419 ;;
8420 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008421 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008422 ;;
8423 esac
8424 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008425 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008426 i386)
8427 MACOSX_DEFAULT_ARCH="x86_64"
8428 ;;
8429 ppc)
8430 MACOSX_DEFAULT_ARCH="ppc64"
8431 ;;
8432 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008433 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008434 ;;
8435 esac
8436
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008437 fi
8438
8439 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008440 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008441 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008442esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8444$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008445if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008446then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008447 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008448 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008449 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008450
Matthias Kloseb9621712010-04-24 17:59:49 +00008451$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008452
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8454$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008455 if test $enable_shared = "yes"
8456 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008457 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 +00008458 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008459else
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8461$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008462fi
8463
Matthias Kloseb9621712010-04-24 17:59:49 +00008464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8465$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008466case $ac_sys_system/$ac_sys_release in
8467 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008468
Matthias Kloseb9621712010-04-24 17:59:49 +00008469$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008470
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8472$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008473 ;;
8474 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8476$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008477 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008478esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008479
Guido van Rossum0a516c91994-09-12 10:58:40 +00008480# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008481
Michael W. Hudson54241132001-12-07 15:38:26 +00008482
8483
8484
8485
Benjamin Peterson99f03762010-04-11 22:15:28 +00008486
Thomas Wouters477c8d52006-05-27 19:21:47 +00008487
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008488# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8489# -- usually .so, .sl on HP-UX, .dll on Cygwin
8490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8491$as_echo_n "checking the extension of shared libraries... " >&6; }
8492if test -z "$SHLIB_SUFFIX"; then
8493 case $ac_sys_system in
8494 hp*|HP*)
8495 case `uname -m` in
8496 ia64) SHLIB_SUFFIX=.so;;
8497 *) SHLIB_SUFFIX=.sl;;
8498 esac
8499 ;;
8500 CYGWIN*) SHLIB_SUFFIX=.dll;;
8501 *) SHLIB_SUFFIX=.so;;
8502 esac
8503fi
8504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8505$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008506
Guido van Rossum0a516c91994-09-12 10:58:40 +00008507# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008508# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008509# (Shared libraries in this instance are shared modules to be loaded into
8510# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8512$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008513if test -z "$LDSHARED"
8514then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008515 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008516 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008517 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008518 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008519 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008520 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008521 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008522 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008523 if test "$GCC" = "yes" ; then
8524 LDSHARED='$(CC) -shared'
8525 LDCXXSHARED='$(CXX) -shared'
8526 else
8527 LDSHARED='$(CC) -G'
8528 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008529 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008530 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008531 if test "$GCC" = "yes" ; then
8532 LDSHARED='$(CC) -shared'
8533 LDCXXSHARED='$(CXX) -shared'
8534 else
8535 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008536 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008537 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008538 LDSHARED='$(CC) -bundle'
8539 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008540 if test "$enable_framework" ; then
8541 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008542 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8543 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008544 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008545 else
8546 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008547 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008548 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008549 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008550 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008551 LDSHARED='$(CC) -bundle'
8552 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008553 if test "$enable_framework" ; then
8554 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008555 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8556 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008557 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008558 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008559 # No framework, use the Python app as bundle-loader
8560 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008561 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008562 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008563 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008564 Darwin/*)
8565 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8566 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008567
Ned Deily36820b62014-06-25 13:44:22 -07008568 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8569 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8570 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8571 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8572 if test ${dep_target_major} -eq 10 && \
8573 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008574 then
Ned Deily36820b62014-06-25 13:44:22 -07008575 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008576 LDSHARED='$(CC) -bundle'
8577 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008578 if test "$enable_framework" ; then
8579 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008580 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8581 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008582 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008583 else
8584 # No framework, use the Python app as bundle-loader
8585 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8586 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008587 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008588 fi
Ned Deily36820b62014-06-25 13:44:22 -07008589 else
8590 # building for OS X 10.3 and later
8591 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8592 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8593 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008594 fi
8595 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008596 Linux*|GNU*|QNX*)
8597 LDSHARED='$(CC) -shared'
8598 LDCXXSHARED='$(CXX) -shared';;
8599 BSD/OS*/4*)
8600 LDSHARED="gcc -shared"
8601 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008602 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008603 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008604 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008605 LDSHARED='$(CC) -shared'
8606 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008607 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008608 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008609 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008610 OpenBSD*)
8611 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8612 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008613 LDSHARED='$(CC) -shared $(CCSHARED)'
8614 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008615 else
8616 case `uname -r` in
8617 [01].* | 2.[0-7] | 2.[0-7].*)
8618 LDSHARED="ld -Bshareable ${LDFLAGS}"
8619 ;;
8620 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008621 LDSHARED='$(CC) -shared $(CCSHARED)'
8622 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008623 ;;
8624 esac
8625 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008626 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008627 LDSHARED='$(CC) -shared'
8628 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008629 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008630 if test "$GCC" = "yes" ; then
8631 LDSHARED='$(CC) -shared'
8632 LDCXXSHARED='$(CXX) -shared'
8633 else
8634 LDSHARED='$(CC) -G'
8635 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008636 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008637 SCO_SV*)
8638 LDSHARED='$(CC) -Wl,-G,-Bexport'
8639 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8640 CYGWIN*)
8641 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8642 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008643 *) LDSHARED="ld";;
8644 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8647$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008648LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008649BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008650# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008651# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8653$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008654if test -z "$CCSHARED"
8655then
Guido van Rossum07397971997-04-29 21:49:50 +00008656 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008657 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008658 then CCSHARED="-fPIC";
8659 elif test `uname -p` = sparc;
8660 then CCSHARED="-xcode=pic32";
8661 else CCSHARED="-Kpic";
8662 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008663 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008664 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008665 else CCSHARED="+z";
8666 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008667 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008668 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008669 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008670 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008671 if test "$GCC" = "yes"
8672 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008673 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008674 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008675 SCO_SV*)
8676 if test "$GCC" = "yes"
8677 then CCSHARED="-fPIC"
8678 else CCSHARED="-Kpic -belf"
8679 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008680 IRIX*/6*) case $CC in
8681 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008682 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008683 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008684 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8687$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008688# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008689# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8691$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008692if test -z "$LINKFORSHARED"
8693then
Guido van Rossum07397971997-04-29 21:49:50 +00008694 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008695 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008696 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008697 LINKFORSHARED="-Wl,-E -Wl,+s";;
8698# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008699 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008700 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008701 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008703 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008704
8705 # Issue #18075: the default maximum stack size (8MBytes) is too
8706 # small for the default recursion limit. Increase the stack size
8707 # to ensure that tests don't crash
8708 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8709
Jack Jansene578a632001-08-15 01:27:14 +00008710 if test "$enable_framework"
8711 then
Jack Jansenda49e192005-01-07 13:08:22 +00008712 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008713 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008714 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008715 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008716 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008717 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008718 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008719 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8720 then
8721 LINKFORSHARED="-Wl,--export-dynamic"
8722 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008723 SunOS/5*) case $CC in
8724 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008725 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008726 then
8727 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008728 fi;;
8729 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008730 CYGWIN*)
8731 if test $enable_shared = "no"
8732 then
8733 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8734 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008735 QNX*)
8736 # -Wl,-E causes the symbols to be added to the dynamic
8737 # symbol table so that they can be found when a module
8738 # is loaded. -N 2048K causes the stack size to be set
8739 # to 2048 kilobytes so that the stack doesn't overflow
8740 # when running test_compile.py.
8741 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008742 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8745$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008746
Michael W. Hudson54241132001-12-07 15:38:26 +00008747
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008748
Matthias Kloseb9621712010-04-24 17:59:49 +00008749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8750$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008751if test ! "$LIBRARY" = "$LDLIBRARY"
8752then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008753 case $ac_sys_system in
8754 CYGWIN*)
8755 # Cygwin needs CCSHARED when building extension DLLs
8756 # but not when building the interpreter DLL.
8757 CFLAGSFORSHARED='';;
8758 *)
8759 CFLAGSFORSHARED='$(CCSHARED)'
8760 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8763$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008764
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008765# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8766# library (with --enable-shared).
8767# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008768# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8769# if it is not required, since it creates a dependency of the shared library
8770# to LIBS. This, in turn, means that applications linking the shared libpython
8771# don't need to link LIBS explicitly. The default should be only changed
8772# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008773
Matthias Kloseb9621712010-04-24 17:59:49 +00008774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8775$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008776case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008777 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008778 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008779esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8781$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008782
8783
Guido van Rossum627b2d71993-12-24 10:39:16 +00008784# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8786$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008787if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008788 $as_echo_n "(cached) " >&6
8789else
8790 ac_check_lib_save_LIBS=$LIBS
8791LIBS="-lsendfile $LIBS"
8792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8793/* end confdefs.h. */
8794
8795/* Override any GCC internal prototype to avoid an error.
8796 Use char because int might match the return type of a GCC
8797 builtin and then its argument prototype would still apply. */
8798#ifdef __cplusplus
8799extern "C"
8800#endif
8801char sendfile ();
8802int
8803main ()
8804{
8805return sendfile ();
8806 ;
8807 return 0;
8808}
8809_ACEOF
8810if ac_fn_c_try_link "$LINENO"; then :
8811 ac_cv_lib_sendfile_sendfile=yes
8812else
8813 ac_cv_lib_sendfile_sendfile=no
8814fi
8815rm -f core conftest.err conftest.$ac_objext \
8816 conftest$ac_exeext conftest.$ac_ext
8817LIBS=$ac_check_lib_save_LIBS
8818fi
8819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8820$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008821if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008822 cat >>confdefs.h <<_ACEOF
8823#define HAVE_LIBSENDFILE 1
8824_ACEOF
8825
8826 LIBS="-lsendfile $LIBS"
8827
8828fi
8829
Matthias Kloseb9621712010-04-24 17:59:49 +00008830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8831$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008832if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008834else
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008836LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840/* Override any GCC internal prototype to avoid an error.
8841 Use char because int might match the return type of a GCC
8842 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008843#ifdef __cplusplus
8844extern "C"
8845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008846char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008847int
8848main ()
8849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008850return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ;
8852 return 0;
8853}
8854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008855if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008857else
Matthias Kloseb9621712010-04-24 17:59:49 +00008858 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008860rm -f core conftest.err conftest.$ac_objext \
8861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008862LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8865$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008866if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 cat >>confdefs.h <<_ACEOF
8868#define HAVE_LIBDL 1
8869_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008870
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008871 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008872
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008873fi
8874 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8876$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008877if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008878 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008879else
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008881LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885/* Override any GCC internal prototype to avoid an error.
8886 Use char because int might match the return type of a GCC
8887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888#ifdef __cplusplus
8889extern "C"
8890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008891char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008892int
8893main ()
8894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008895return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 ;
8897 return 0;
8898}
8899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008900if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008901 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008902else
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008905rm -f core conftest.err conftest.$ac_objext \
8906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008907LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8910$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008911if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 cat >>confdefs.h <<_ACEOF
8913#define HAVE_LIBDLD 1
8914_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008915
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008916 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008917
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008918fi
8919 # Dynamic linking for HP-UX
Victor Stinnerfcfed192015-01-06 13:54:58 +01008920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8921$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
8922if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
8923 $as_echo_n "(cached) " >&6
8924else
8925 ac_check_lib_save_LIBS=$LIBS
8926LIBS="-lcrypto $LIBS"
8927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8928/* end confdefs.h. */
8929
8930/* Override any GCC internal prototype to avoid an error.
8931 Use char because int might match the return type of a GCC
8932 builtin and then its argument prototype would still apply. */
8933#ifdef __cplusplus
8934extern "C"
8935#endif
8936char RAND_egd ();
8937int
8938main ()
8939{
8940return RAND_egd ();
8941 ;
8942 return 0;
8943}
8944_ACEOF
8945if ac_fn_c_try_link "$LINENO"; then :
8946 ac_cv_lib_crypto_RAND_egd=yes
8947else
8948 ac_cv_lib_crypto_RAND_egd=no
8949fi
8950rm -f core conftest.err conftest.$ac_objext \
8951 conftest$ac_exeext conftest.$ac_ext
8952LIBS=$ac_check_lib_save_LIBS
8953fi
8954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
8955$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
8956if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
8957
8958$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
8959
8960fi
8961
Martin v. Löwis519adae2003-09-20 10:47:47 +00008962
Georg Brandlb1441c72009-01-03 22:33:39 +00008963# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008964if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8966$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008967if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008969else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008970 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974/* Override any GCC internal prototype to avoid an error.
8975 Use char because int might match the return type of a GCC
8976 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008977#ifdef __cplusplus
8978extern "C"
8979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008980char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008981int
8982main ()
8983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008984return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 ;
8986 return 0;
8987}
8988_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008989for ac_lib in '' pthread rt posix4; do
8990 if test -z "$ac_lib"; then
8991 ac_res="none required"
8992 else
8993 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008994 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008995 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008996 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008997 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008999rm -f core conftest.err conftest.$ac_objext \
9000 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009001 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009002 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009004done
Victor Stinnere0be4232011-10-25 13:06:09 +02009005if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009007else
9008 ac_cv_search_sem_init=no
9009fi
9010rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009011LIBS=$ac_func_search_save_LIBS
9012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9014$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009016if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009018
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009019fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009020 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009021 # posix4 on Solaris 2.6
9022 # pthread (first!) on Linux
9023fi
9024
Martin v. Löwis19d17342003-06-14 21:03:05 +00009025# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9027$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009028if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009030else
9031 ac_check_lib_save_LIBS=$LIBS
9032LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009034/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009036/* Override any GCC internal prototype to avoid an error.
9037 Use char because int might match the return type of a GCC
9038 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009039#ifdef __cplusplus
9040extern "C"
9041#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009042char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009043int
9044main ()
9045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009046return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009047 ;
9048 return 0;
9049}
9050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009051if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009052 ac_cv_lib_intl_textdomain=yes
9053else
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009056rm -f core conftest.err conftest.$ac_objext \
9057 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009058LIBS=$ac_check_lib_save_LIBS
9059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9061$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009062if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009063
Matthias Kloseb9621712010-04-24 17:59:49 +00009064$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009065
Brett Cannonc6d936e2009-06-07 20:09:53 +00009066 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009067fi
9068
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009069
9070# checks for system dependent C++ extensions support
9071case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9073$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009075/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009076
Georg Brandl59e87bd2011-02-15 19:48:59 +00009077 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009078int
9079main ()
9080{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009081loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009082 ;
9083 return 0;
9084}
Matthias Kloseb159a552010-04-25 21:00:44 +00009085
Martin v. Löwis11437992002-04-12 09:54:03 +00009086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009087if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009088
Matthias Kloseb159a552010-04-25 21:00:44 +00009089
Matthias Kloseb9621712010-04-24 17:59:49 +00009090$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009091
Matthias Kloseb159a552010-04-25 21:00:44 +00009092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009093$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009094
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009095else
Matthias Kloseb159a552010-04-25 21:00:44 +00009096
9097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009098$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009099
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009101rm -f core conftest.err conftest.$ac_objext \
9102 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009103 *) ;;
9104esac
9105
Christian Heimes985ecdc2013-11-20 11:46:18 +01009106# check for systems that require aligned memory access
9107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9108$as_echo_n "checking aligned memory access is required... " >&6; }
9109if test "$cross_compiling" = yes; then :
9110 aligned_required=yes
9111else
9112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9113/* end confdefs.h. */
9114
9115int main()
9116{
9117 char s[16];
9118 int i, *p1, *p2;
9119 for (i=0; i < 16; i++)
9120 s[i] = i;
9121 p1 = (int*)(s+1);
9122 p2 = (int*)(s+2);
9123 if (*p1 == *p2)
9124 return 1;
9125 return 0;
9126}
9127
9128_ACEOF
9129if ac_fn_c_try_run "$LINENO"; then :
9130 aligned_required=no
9131else
9132 aligned_required=yes
9133fi
9134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9135 conftest.$ac_objext conftest.beam conftest.$ac_ext
9136fi
9137
9138
9139if test "$aligned_required" = yes ; then
9140
9141$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9142
9143fi
9144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9145$as_echo "$aligned_required" >&6; }
9146
9147
9148# str, bytes and memoryview hash algorithm
9149
9150
9151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9152$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9153
9154# Check whether --with-hash_algorithm was given.
9155if test "${with_hash_algorithm+set}" = set; then :
9156 withval=$with_hash_algorithm;
9157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9158$as_echo "$withval" >&6; }
9159case "$withval" in
9160 siphash24)
9161 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9162
9163 ;;
9164 fnv)
9165 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9166
9167 ;;
9168 *)
9169 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9170 ;;
9171esac
9172
9173else
9174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9175$as_echo "default" >&6; }
9176fi
9177
9178
Guido van Rossum70c7f481998-03-26 18:44:10 +00009179# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9181$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009182if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009183 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009184else
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009186LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009190/* Override any GCC internal prototype to avoid an error.
9191 Use char because int might match the return type of a GCC
9192 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009193#ifdef __cplusplus
9194extern "C"
9195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009196char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009197int
9198main ()
9199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009200return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 ;
9202 return 0;
9203}
9204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009205if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009207else
Matthias Kloseb9621712010-04-24 17:59:49 +00009208 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009210rm -f core conftest.err conftest.$ac_objext \
9211 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009212LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9215$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009216if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009217 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009218fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009219 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9221$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009222if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009223 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009224else
Martin v. Löwis11437992002-04-12 09:54:03 +00009225 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009226LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230/* Override any GCC internal prototype to avoid an error.
9231 Use char because int might match the return type of a GCC
9232 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009233#ifdef __cplusplus
9234extern "C"
9235#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009236char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009237int
9238main ()
9239{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009241 ;
9242 return 0;
9243}
9244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009245if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009246 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009247else
Matthias Kloseb9621712010-04-24 17:59:49 +00009248 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009250rm -f core conftest.err conftest.$ac_objext \
9251 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009252LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9255$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009256if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009257 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009258fi
9259 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009260
Matthias Kloseb9621712010-04-24 17:59:49 +00009261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9262$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009265if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009266 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9268$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009269LIBS="$withval $LIBS"
9270
9271else
Matthias Kloseb9621712010-04-24 17:59:49 +00009272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9273$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009274fi
9275
Guido van Rossum7f43da71994-08-01 12:15:30 +00009276
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009277
9278
9279
9280
9281
9282
9283
9284if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9285 if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009286 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9287set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9289$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009290if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009291 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009292else
9293 case $PKG_CONFIG in
9294 [\\/]* | ?:[\\/]*)
9295 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9296 ;;
9297 *)
9298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9299for as_dir in $PATH
9300do
9301 IFS=$as_save_IFS
9302 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009304 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009305 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009307 break 2
9308 fi
9309done
Matthias Kloseb9621712010-04-24 17:59:49 +00009310 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009311IFS=$as_save_IFS
9312
9313 ;;
9314esac
9315fi
9316PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9317if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9319$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009320else
Matthias Kloseb9621712010-04-24 17:59:49 +00009321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9322$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009323fi
9324
9325
9326fi
9327if test -z "$ac_cv_path_PKG_CONFIG"; then
9328 ac_pt_PKG_CONFIG=$PKG_CONFIG
9329 # Extract the first word of "pkg-config", so it can be a program name with args.
9330set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9332$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009333if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009334 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009335else
9336 case $ac_pt_PKG_CONFIG in
9337 [\\/]* | ?:[\\/]*)
9338 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9339 ;;
9340 *)
9341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9342for as_dir in $PATH
9343do
9344 IFS=$as_save_IFS
9345 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009346 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009347 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009348 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009350 break 2
9351 fi
9352done
Matthias Kloseb9621712010-04-24 17:59:49 +00009353 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009354IFS=$as_save_IFS
9355
9356 ;;
9357esac
9358fi
9359ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9360if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9362$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009363else
Matthias Kloseb9621712010-04-24 17:59:49 +00009364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9365$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009366fi
9367
9368 if test "x$ac_pt_PKG_CONFIG" = x; then
9369 PKG_CONFIG=""
9370 else
9371 case $cross_compiling:$ac_tool_warned in
9372yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9374$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009375ac_tool_warned=yes ;;
9376esac
9377 PKG_CONFIG=$ac_pt_PKG_CONFIG
9378 fi
9379else
9380 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9381fi
9382
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009383fi
9384if test -n "$PKG_CONFIG"; then
9385 _pkg_min_version=0.9.0
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9387$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9388 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9390$as_echo "yes" >&6; }
9391 else
9392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9393$as_echo "no" >&6; }
9394 PKG_CONFIG=""
9395 fi
9396fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009397
9398# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9400$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009401
9402# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009403if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009404 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009405else
9406 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009407fi
9408
9409
Matthias Kloseb9621712010-04-24 17:59:49 +00009410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9411$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009412
9413# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9415$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009416
9417# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009418if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009419 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009420else
9421 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009422fi
9423
9424
9425if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009426 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9427else
9428 LIBFFI_INCLUDEDIR=""
9429fi
9430
9431
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9433$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009434
Stefan Krah60187b52012-03-23 19:06:27 +01009435# Check for use of the system libmpdec library
9436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9437$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9438
9439# Check whether --with-system_libmpdec was given.
9440if test "${with_system_libmpdec+set}" = set; then :
9441 withval=$with_system_libmpdec;
9442else
9443 with_system_libmpdec="no"
9444fi
9445
9446
9447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9448$as_echo "$with_system_libmpdec" >&6; }
9449
Benjamin Peterson076ed002010-10-31 17:11:02 +00009450# Check for support for loadable sqlite extensions
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9452$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9453# Check whether --enable-loadable-sqlite-extensions was given.
9454if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9455 enableval=$enable_loadable_sqlite_extensions;
9456else
9457 enable_loadable_sqlite_extensions="no"
9458fi
9459
9460
9461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9462$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9463
Ned Deilyd819b932013-09-06 01:07:05 -07009464# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9465
9466
9467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9468$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9469
9470# Check whether --with-tcltk-includes was given.
9471if test "${with_tcltk_includes+set}" = set; then :
9472 withval=$with_tcltk_includes;
9473else
9474 with_tcltk_includes="default"
9475fi
9476
9477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9478$as_echo "$with_tcltk_includes" >&6; }
9479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9480$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9481
9482# Check whether --with-tcltk-libs was given.
9483if test "${with_tcltk_libs+set}" = set; then :
9484 withval=$with_tcltk_libs;
9485else
9486 with_tcltk_libs="default"
9487fi
9488
9489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9490$as_echo "$with_tcltk_libs" >&6; }
9491if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9492then
9493 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9494 then
9495 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9496 fi
9497 TCLTK_INCLUDES=""
9498 TCLTK_LIBS=""
9499else
9500 TCLTK_INCLUDES="$with_tcltk_includes"
9501 TCLTK_LIBS="$with_tcltk_libs"
9502fi
9503
Matthias Klose55708cc2009-04-30 08:06:49 +00009504# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9506$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009507
9508# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009509if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009510 withval=$with_dbmliborder;
9511if test x$with_dbmliborder = xyes
9512then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009513as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009514else
9515 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9516 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9517 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009518 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009519 fi
9520 done
9521fi
9522fi
9523
Matthias Kloseb9621712010-04-24 17:59:49 +00009524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9525$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009526
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009527# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009528
9529
Matthias Kloseb9621712010-04-24 17:59:49 +00009530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9531$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009533# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009534if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009535 withval=$with_signal_module;
9536fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009537
9538
9539if test -z "$with_signal_module"
9540then with_signal_module="yes"
9541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9543$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009544
9545if test "${with_signal_module}" = "yes"; then
9546 USE_SIGNAL_MODULE=""
9547 SIGNAL_OBJS=""
9548else
9549 USE_SIGNAL_MODULE="#"
9550 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9551fi
9552
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009553# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009554
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009555USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009557
Martin v. Löwis11437992002-04-12 09:54:03 +00009558
9559# Templates for things AC_DEFINEd more than once.
9560# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009561
9562
Martin v. Löwis11437992002-04-12 09:54:03 +00009563
Matthias Kloseb9621712010-04-24 17:59:49 +00009564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9565$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009566
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009568if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569 withval=$with_threads;
9570fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009571
9572
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009573# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009576if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009577 withval=$with_thread; with_threads=$with_thread
9578fi
9579
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009580
9581if test -z "$with_threads"
9582then with_threads="yes"
9583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9585$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009586
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009587
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009588if test "$with_threads" = "no"
9589then
9590 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009591elif test "$ac_cv_pthread_is_default" = yes
9592then
Matthias Kloseb9621712010-04-24 17:59:49 +00009593 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009594
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009595 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009596 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009597
9598 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009600elif test "$ac_cv_kpthread" = "yes"
9601then
9602 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009603 if test "$ac_cv_cxx_thread" = "yes"; then
9604 CXX="$CXX -Kpthread"
9605 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009606 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009607
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009608 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009609 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009610elif test "$ac_cv_kthread" = "yes"
9611then
9612 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009613 if test "$ac_cv_cxx_thread" = "yes"; then
9614 CXX="$CXX -Kthread"
9615 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009616 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009617
9618 posix_threads=yes
9619 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009620elif test "$ac_cv_pthread" = "yes"
9621then
9622 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009623 if test "$ac_cv_cxx_thread" = "yes"; then
9624 CXX="$CXX -pthread"
9625 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009626 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009627
9628 posix_threads=yes
9629 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009630else
9631 if test ! -z "$with_threads" -a -d "$with_threads"
9632 then LDFLAGS="$LDFLAGS -L$with_threads"
9633 fi
9634 if test ! -z "$withval" -a -d "$withval"
9635 then LDFLAGS="$LDFLAGS -L$withval"
9636 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009637
9638 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009639 # define _POSIX_THREADS in unistd.h. Some apparently don't
9640 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9642$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009644/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009645
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009646#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009647#ifdef _POSIX_THREADS
9648yes
9649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009650
9651_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009653 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009654 unistd_defines_pthreads=yes
9655else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009656 unistd_defines_pthreads=no
9657fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009658rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009659
Matthias Kloseb9621712010-04-24 17:59:49 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9661$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009662
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009664
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009665 # Just looking for pthread_create in libpthread is not enough:
9666 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9667 # So we really have to include pthread.h, and then link.
9668 _libs=$LIBS
9669 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9671$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009673/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009674
9675#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009676#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009677
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009678void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009679int
9680main ()
9681{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009682
9683pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 ;
9685 return 0;
9686}
9687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009688if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009689
Matthias Kloseb9621712010-04-24 17:59:49 +00009690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9691$as_echo "yes" >&6; }
9692 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009693
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009694 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009695 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009696else
Martin v. Löwis11437992002-04-12 09:54:03 +00009697
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009698 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009700if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009702
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009703 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009704 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009705else
Guido van Rossumad678af1998-10-02 14:42:15 +00009706
Matthias Kloseb9621712010-04-24 17:59:49 +00009707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9708$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009709if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009711else
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009713LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717/* Override any GCC internal prototype to avoid an error.
9718 Use char because int might match the return type of a GCC
9719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009720#ifdef __cplusplus
9721extern "C"
9722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009723char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009724int
9725main ()
9726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 ;
9729 return 0;
9730}
9731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009732if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009734else
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009737rm -f core conftest.err conftest.$ac_objext \
9738 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009739LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9742$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009743if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009745
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009746 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009747 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009748 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009749else
Greg Steinadf63d62000-07-05 10:38:09 +00009750
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9752$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009753if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009755else
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009757LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761/* Override any GCC internal prototype to avoid an error.
9762 Use char because int might match the return type of a GCC
9763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009764#ifdef __cplusplus
9765extern "C"
9766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009767char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009768int
9769main ()
9770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ;
9773 return 0;
9774}
9775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009776if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009778else
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009781rm -f core conftest.err conftest.$ac_objext \
9782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9786$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009787if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009789
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009790 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009791 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009792 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009793else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009794
Matthias Kloseb9621712010-04-24 17:59:49 +00009795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9796$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009797if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009799else
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009801LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805/* Override any GCC internal prototype to avoid an error.
9806 Use char because int might match the return type of a GCC
9807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009808#ifdef __cplusplus
9809extern "C"
9810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009811char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009812int
9813main ()
9814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 ;
9817 return 0;
9818}
9819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009820if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009822else
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009825rm -f core conftest.err conftest.$ac_objext \
9826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009827LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9830$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009831if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009833
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009834 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009835 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009836 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009837else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009838
Matthias Kloseb9621712010-04-24 17:59:49 +00009839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9840$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009841if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009842 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009843else
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009845LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849/* Override any GCC internal prototype to avoid an error.
9850 Use char because int might match the return type of a GCC
9851 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009852#ifdef __cplusplus
9853extern "C"
9854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009855char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009856int
9857main ()
9858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 ;
9861 return 0;
9862}
9863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009864if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009865 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009866else
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009869rm -f core conftest.err conftest.$ac_objext \
9870 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009871LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9874$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009875if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009877
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009878 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009879 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009880 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009881else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009882
Martin v. Löwis130fb172001-07-19 11:00:41 +00009883 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009884fi
9885
Guido van Rossum627b2d71993-12-24 10:39:16 +00009886
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009887fi
9888
Guido van Rossum0be3e491997-05-22 20:33:33 +00009889fi
9890
Guido van Rossum49545951997-12-02 19:28:29 +00009891fi
9892
Guido van Rossumb93a8621998-05-07 13:27:32 +00009893fi
9894
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009896rm -f core conftest.err conftest.$ac_objext \
9897 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009898
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9900$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009901if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009903else
Martin v. Löwis11437992002-04-12 09:54:03 +00009904 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009905LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909/* Override any GCC internal prototype to avoid an error.
9910 Use char because int might match the return type of a GCC
9911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009912#ifdef __cplusplus
9913extern "C"
9914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009915char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009916int
9917main ()
9918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009919return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 ;
9921 return 0;
9922}
9923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009926else
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009929rm -f core conftest.err conftest.$ac_objext \
9930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009931LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9934$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009935if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009937
Martin v. Löwis130fb172001-07-19 11:00:41 +00009938 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009939 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009940 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009941fi
9942
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009943
Neal Norwitza978ab02002-11-02 16:58:05 +00009944 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9946$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009947if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009948 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009949else
Martin v. Löwis11437992002-04-12 09:54:03 +00009950 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009951LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009955/* Override any GCC internal prototype to avoid an error.
9956 Use char because int might match the return type of a GCC
9957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009958#ifdef __cplusplus
9959extern "C"
9960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009961char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009962int
9963main ()
9964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009966 ;
9967 return 0;
9968}
9969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009970if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009971 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009972else
Matthias Kloseb9621712010-04-24 17:59:49 +00009973 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009975rm -f core conftest.err conftest.$ac_objext \
9976 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009977LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9980$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009981if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009983
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009984 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009985 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009986 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009987fi
9988
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009989 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009990fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009991
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009992if test "$posix_threads" = "yes"; then
9993 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009994
Matthias Kloseb9621712010-04-24 17:59:49 +00009995$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009996
9997 fi
9998
9999 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10000 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010001 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010002$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010003
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010004 ;;
10005 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010007
10008 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010009 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010010$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010011
10012 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010013 esac
10014
Matthias Kloseb9621712010-04-24 17:59:49 +000010015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10016$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010017 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010018 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010019else
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010021 ac_cv_pthread_system_supported=no
10022else
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010024/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010025
10026 #include <stdio.h>
10027 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010028 void *foo(void *parm) {
10029 return NULL;
10030 }
10031 main() {
10032 pthread_attr_t attr;
10033 pthread_t id;
10034 if (pthread_attr_init(&attr)) exit(-1);
10035 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10036 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10037 exit(0);
10038 }
10039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010040if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010041 ac_cv_pthread_system_supported=yes
10042else
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10046 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010047fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010049
Guido van Rossum627b2d71993-12-24 10:39:16 +000010050fi
10051
Matthias Kloseb9621712010-04-24 17:59:49 +000010052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10053$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010054 if test "$ac_cv_pthread_system_supported" = "yes"; then
10055
Matthias Kloseb9621712010-04-24 17:59:49 +000010056$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010057
10058 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010059 for ac_func in pthread_sigmask
10060do :
10061 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010062if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010063 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010064#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010065_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010066 case $ac_sys_system in
10067 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010068
Matthias Kloseb9621712010-04-24 17:59:49 +000010069$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010070
10071 ;;
10072 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010073fi
10074done
10075
Christian Heimesf77b4b22013-08-21 13:26:05 +020010076 for ac_func in pthread_atfork
10077do :
10078 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10079if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10080 cat >>confdefs.h <<_ACEOF
10081#define HAVE_PTHREAD_ATFORK 1
10082_ACEOF
10083
10084fi
10085done
10086
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010087fi
10088
10089
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010090# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010091
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10093$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010095if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010096 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010097 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10099$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010100 ipv6=no
10101 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10103$as_echo "yes" >&6; }
10104 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010105
10106 ipv6=yes
10107 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010109else
Martin v. Löwis11437992002-04-12 09:54:03 +000010110
Matthias Kloseb9621712010-04-24 17:59:49 +000010111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010112/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010113 /* AF_INET6 available check */
10114#include <sys/types.h>
10115#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010116int
10117main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010118{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010119int domain = AF_INET6;
10120 ;
10121 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010122}
Martin v. Löwis11437992002-04-12 09:54:03 +000010123_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010124if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010125
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10127$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010128 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010129
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010130else
Matthias Kloseb159a552010-04-25 21:00:44 +000010131
Matthias Kloseb9621712010-04-24 17:59:49 +000010132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010134 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010135
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010136fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010138
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010139if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10141$as_echo_n "checking if RFC2553 API is available... " >&6; }
10142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010143/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010144
10145 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010146#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010147int
10148main ()
10149{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010150struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010151 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ;
10153 return 0;
10154}
Matthias Kloseb159a552010-04-25 21:00:44 +000010155
Martin v. Löwis11437992002-04-12 09:54:03 +000010156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010157if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010158
10159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010160$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010161 ipv6=yes
10162
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010163else
Matthias Kloseb159a552010-04-25 21:00:44 +000010164
10165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010166$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010167 ipv6=no
10168
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010171fi
10172
10173if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010175
10176fi
10177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178fi
10179
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010180
10181ipv6type=unknown
10182ipv6lib=none
10183ipv6trylibc=no
10184
10185if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10187$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010188 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10189 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010190 case $i in
10191 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010193/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010194
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010195#include <netinet/in.h>
10196#ifdef IPV6_INRIA_VERSION
10197yes
10198#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010199_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010202 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010203fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010204rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010205
10206 ;;
10207 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010209/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010210
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010211#include <netinet/in.h>
10212#ifdef __KAME__
10213yes
10214#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010215_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010216if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010217 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010218 ipv6type=$i;
10219 ipv6lib=inet6
10220 ipv6libdir=/usr/local/v6/lib
10221 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010222fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010223rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010224
10225 ;;
10226 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010228/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010229
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010230#include <features.h>
10231#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10232yes
10233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010234_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010237 ipv6type=$i;
10238 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010239fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010240rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010241
10242 ;;
10243 linux-inet6)
10244 if test -d /usr/inet6; then
10245 ipv6type=$i
10246 ipv6lib=inet6
10247 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010248 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010249 fi
10250 ;;
10251 solaris)
10252 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010253 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010254 ipv6type=$i
10255 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010256 fi
10257 fi
10258 ;;
10259 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010261/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010262
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010263#include <sys/param.h>
10264#ifdef _TOSHIBA_INET6
10265yes
10266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010267_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010270 ipv6type=$i;
10271 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010272 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010273fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010274rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010275
10276 ;;
10277 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010279/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010280
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010281#include </usr/local/v6/include/sys/v6config.h>
10282#ifdef __V6D__
10283yes
10284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010285_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010286if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010288 ipv6type=$i;
10289 ipv6lib=v6;
10290 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010291 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010292fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010293rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010294
10295 ;;
10296 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010298/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010299
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010300#include <sys/param.h>
10301#ifdef _ZETA_MINAMI_INET6
10302yes
10303#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010304_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010307 ipv6type=$i;
10308 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010309 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010310fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010311rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010312
10313 ;;
10314 esac
10315 if test "$ipv6type" != "unknown"; then
10316 break
10317 fi
10318 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10320$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010321fi
10322
10323if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10324 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10325 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10326 echo "using lib$ipv6lib"
10327 else
10328 if test $ipv6trylibc = "yes"; then
10329 echo "using libc"
10330 else
10331 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10332 echo "You need to fetch lib$ipv6lib.a from appropriate"
10333 echo 'ipv6 kit and compile beforehand.'
10334 exit 1
10335 fi
10336 fi
10337fi
10338
Matthias Kloseb9621712010-04-24 17:59:49 +000010339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10340$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010342/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010343
10344 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010345int
10346main ()
10347{
10348FSIORefNum fRef = 0
10349 ;
10350 return 0;
10351}
Matthias Kloseb159a552010-04-25 21:00:44 +000010352
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010354if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010355
Matthias Kloseb159a552010-04-25 21:00:44 +000010356
Matthias Kloseb9621712010-04-24 17:59:49 +000010357$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010358
Matthias Kloseb9621712010-04-24 17:59:49 +000010359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10360$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010361
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010362else
Matthias Kloseb159a552010-04-25 21:00:44 +000010363
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010366
10367fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10369
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010370# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10372$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010374# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010375if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376 withval=$with_doc_strings;
10377fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010378
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010379
10380if test -z "$with_doc_strings"
10381then with_doc_strings="yes"
10382fi
10383if test "$with_doc_strings" != "no"
10384then
10385
Matthias Kloseb9621712010-04-24 17:59:49 +000010386$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010387
10388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10390$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010391
Antoine Pitrou042b1282010-08-13 21:15:58 +000010392# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10394$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010397if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010399if test "$withval" != no
10400then
10401
Matthias Kloseb9621712010-04-24 17:59:49 +000010402$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010403
Matthias Kloseb9621712010-04-24 17:59:49 +000010404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10405$as_echo "yes" >&6; }
10406else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10407$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010408fi
10409else
Matthias Kloseb9621712010-04-24 17:59:49 +000010410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010412fi
10413
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010414
10415# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10417$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010419# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010420if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010421 withval=$with_pymalloc;
10422fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010423
Neil Schemenauera35c6882001-02-27 04:45:05 +000010424
Neil Schemenauer16c22972002-03-22 15:34:49 +000010425if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010426then
10427 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010428fi
10429if test "$with_pymalloc" != "no"
10430then
Martin v. Löwis11437992002-04-12 09:54:03 +000010431
Matthias Kloseb9621712010-04-24 17:59:49 +000010432$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010433
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010434 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10437$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010438
Benjamin Peterson05159c42009-12-03 03:01:27 +000010439# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10441$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010442
10443# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010444if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010445 withval=$with_valgrind;
10446else
10447 with_valgrind=no
10448fi
10449
Matthias Kloseb9621712010-04-24 17:59:49 +000010450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10451$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010452if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 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 +020010454if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010455
Matthias Kloseb9621712010-04-24 17:59:49 +000010456$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010457
10458else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010459 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010460
10461fi
10462
10463
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010464 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010465fi
10466
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010467# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010468
Guido van Rossum98935bf2001-09-05 19:13:16 +000010469DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010470
Guido van Rossume97ee181999-12-20 21:27:22 +000010471# the dlopen() function means we might want to use dynload_shlib.o. some
10472# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010473for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010474do :
10475 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010476if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010478#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010479_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010480
Guido van Rossume97ee181999-12-20 21:27:22 +000010481fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010482done
Guido van Rossume97ee181999-12-20 21:27:22 +000010483
Michael W. Hudson54241132001-12-07 15:38:26 +000010484
Guido van Rossume97ee181999-12-20 21:27:22 +000010485# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10486# loading of modules.
10487
Matthias Kloseb9621712010-04-24 17:59:49 +000010488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10489$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010490if test -z "$DYNLOADFILE"
10491then
10492 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010493 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10494 if test "$ac_cv_func_dlopen" = yes
10495 then DYNLOADFILE="dynload_shlib.o"
10496 else DYNLOADFILE="dynload_aix.o"
10497 fi
10498 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010499 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010500 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10501 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010502 *)
10503 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10504 # out any dynamic loading
10505 if test "$ac_cv_func_dlopen" = yes
10506 then DYNLOADFILE="dynload_shlib.o"
10507 else DYNLOADFILE="dynload_stub.o"
10508 fi
10509 ;;
10510 esac
10511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10513$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010514if test "$DYNLOADFILE" != "dynload_stub.o"
10515then
Martin v. Löwis11437992002-04-12 09:54:03 +000010516
Matthias Kloseb9621712010-04-24 17:59:49 +000010517$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010518
10519fi
10520
Neil Schemenauer4e425612001-06-19 15:44:15 +000010521# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10522
Michael W. Hudson54241132001-12-07 15:38:26 +000010523
Matthias Kloseb9621712010-04-24 17:59:49 +000010524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10525$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010526if test -z "$MACHDEP_OBJS"
10527then
Jack Jansene578a632001-08-15 01:27:14 +000010528 MACHDEP_OBJS=$extra_machdep_objs
10529else
10530 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010531fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010532if test -z "$MACHDEP_OBJS"; then
10533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10534$as_echo "none" >&6; }
10535else
10536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10537$as_echo "$MACHDEP_OBJS" >&6; }
10538fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010539
Guido van Rossum627b2d71993-12-24 10:39:16 +000010540# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010541for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010542 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010543 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinnerfe02e392014-12-21 01:16:38 +010010544 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010545 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010546 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010547 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010548 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10549 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010550 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010551 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010552 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010553 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010554 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010555 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010556 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10557 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010558 sigaction sigaltstack siginterrupt sigpending sigrelse \
10559 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010560 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010561 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010562 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010563do :
10564 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10565ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010566if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010568#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010569_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010570
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010571fi
10572done
10573
Michael W. Hudson54241132001-12-07 15:38:26 +000010574
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010575ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10576 #include <dirent.h>
10577"
10578if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10579
10580$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10581
10582fi
10583
10584
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010585# For some functions, having a definition is not sufficient, since
10586# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10588$as_echo_n "checking for chroot... " >&6; }
10589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010590/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010591#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010592int
10593main ()
10594{
10595void *x=chroot
10596 ;
10597 return 0;
10598}
10599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010600if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010601
Matthias Kloseb9621712010-04-24 17:59:49 +000010602$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010603
Matthias Kloseb159a552010-04-25 21:00:44 +000010604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010605$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010606else
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10608$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010609
10610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10613$as_echo_n "checking for link... " >&6; }
10614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010615/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010616#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010617int
10618main ()
10619{
10620void *x=link
10621 ;
10622 return 0;
10623}
10624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010626
Matthias Kloseb9621712010-04-24 17:59:49 +000010627$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010628
Matthias Kloseb159a552010-04-25 21:00:44 +000010629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010630$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010631else
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10633$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010634
10635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10638$as_echo_n "checking for symlink... " >&6; }
10639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010640/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010641#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010642int
10643main ()
10644{
10645void *x=symlink
10646 ;
10647 return 0;
10648}
10649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010650if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010651
Matthias Kloseb9621712010-04-24 17:59:49 +000010652$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010653
Matthias Kloseb159a552010-04-25 21:00:44 +000010654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010655$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010656else
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10658$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010659
10660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10663$as_echo_n "checking for fchdir... " >&6; }
10664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010666#include <unistd.h>
10667int
10668main ()
10669{
10670void *x=fchdir
10671 ;
10672 return 0;
10673}
10674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010675if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010676
Matthias Kloseb9621712010-04-24 17:59:49 +000010677$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010678
Matthias Kloseb159a552010-04-25 21:00:44 +000010679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010680$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010681else
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10683$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010684
10685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10688$as_echo_n "checking for fsync... " >&6; }
10689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010690/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010691#include <unistd.h>
10692int
10693main ()
10694{
10695void *x=fsync
10696 ;
10697 return 0;
10698}
10699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010701
Matthias Kloseb9621712010-04-24 17:59:49 +000010702$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010703
Matthias Kloseb159a552010-04-25 21:00:44 +000010704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010705$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010706else
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010709
10710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10713$as_echo_n "checking for fdatasync... " >&6; }
10714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010715/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010716#include <unistd.h>
10717int
10718main ()
10719{
10720void *x=fdatasync
10721 ;
10722 return 0;
10723}
10724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010725if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010728
Matthias Kloseb159a552010-04-25 21:00:44 +000010729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010730$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010731else
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10733$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010734
10735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10738$as_echo_n "checking for epoll... " >&6; }
10739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010740/* end confdefs.h. */
10741#include <sys/epoll.h>
10742int
10743main ()
10744{
10745void *x=epoll_create
10746 ;
10747 return 0;
10748}
10749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010750if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010751
Matthias Kloseb9621712010-04-24 17:59:49 +000010752$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010753
Matthias Kloseb159a552010-04-25 21:00:44 +000010754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010755$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010756else
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10758$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010759
10760fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10763$as_echo_n "checking for epoll_create1... " >&6; }
10764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10765/* end confdefs.h. */
10766#include <sys/epoll.h>
10767int
10768main ()
10769{
10770void *x=epoll_create1
10771 ;
10772 return 0;
10773}
10774_ACEOF
10775if ac_fn_c_try_compile "$LINENO"; then :
10776
10777$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10778
10779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10780$as_echo "yes" >&6; }
10781else
10782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10783$as_echo "no" >&6; }
10784
10785fi
10786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10788$as_echo_n "checking for kqueue... " >&6; }
10789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010790/* end confdefs.h. */
10791
10792#include <sys/types.h>
10793#include <sys/event.h>
10794
10795int
10796main ()
10797{
10798int x=kqueue()
10799 ;
10800 return 0;
10801}
10802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010803if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010804
Matthias Kloseb9621712010-04-24 17:59:49 +000010805$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010806
Matthias Kloseb159a552010-04-25 21:00:44 +000010807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010808$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010809else
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10811$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010812
10813fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10816$as_echo_n "checking for prlimit... " >&6; }
10817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10818/* end confdefs.h. */
10819
10820#include <sys/time.h>
10821#include <sys/resource.h>
10822
10823int
10824main ()
10825{
10826void *x=prlimit
10827 ;
10828 return 0;
10829}
10830_ACEOF
10831if ac_fn_c_try_compile "$LINENO"; then :
10832
10833$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10834
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10836$as_echo "yes" >&6; }
10837else
10838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10839$as_echo "no" >&6; }
10840
10841fi
10842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10843
Martin v. Löwisd5843682002-11-21 20:41:28 +000010844# On some systems (eg. FreeBSD 5), we would find a definition of the
10845# functions ctermid_r, setgroups in the library, but no prototype
10846# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10847# address to avoid compiler warnings and potential miscompilations
10848# because of the missing prototypes.
10849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10851$as_echo_n "checking for ctermid_r... " >&6; }
10852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010853/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010854
Martin v. Löwisd5843682002-11-21 20:41:28 +000010855#include <stdio.h>
10856
Martin v. Löwisd5843682002-11-21 20:41:28 +000010857int
10858main ()
10859{
10860void* p = ctermid_r
10861 ;
10862 return 0;
10863}
10864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010865if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010866
Matthias Kloseb9621712010-04-24 17:59:49 +000010867$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010868
Matthias Kloseb159a552010-04-25 21:00:44 +000010869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010870$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010871else
Matthias Kloseb9621712010-04-24 17:59:49 +000010872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10873$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010874
10875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10877
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10879$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010880if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010881 $as_echo_n "(cached) " >&6
10882else
10883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010884/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010885#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010886int
10887main ()
10888{
10889void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010890
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010891 ;
10892 return 0;
10893}
10894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010895if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010896 ac_cv_flock_decl=yes
10897else
10898 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010899
10900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010902
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010903fi
10904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10905$as_echo "$ac_cv_flock_decl" >&6; }
10906if test "x${ac_cv_flock_decl}" = xyes; then
10907 for ac_func in flock
10908do :
10909 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010910if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010911 cat >>confdefs.h <<_ACEOF
10912#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010913_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010914
Antoine Pitroua3000072010-09-07 14:52:42 +000010915else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010917$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010918if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010919 $as_echo_n "(cached) " >&6
10920else
10921 ac_check_lib_save_LIBS=$LIBS
10922LIBS="-lbsd $LIBS"
10923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10924/* end confdefs.h. */
10925
10926/* Override any GCC internal prototype to avoid an error.
10927 Use char because int might match the return type of a GCC
10928 builtin and then its argument prototype would still apply. */
10929#ifdef __cplusplus
10930extern "C"
10931#endif
10932char flock ();
10933int
10934main ()
10935{
10936return flock ();
10937 ;
10938 return 0;
10939}
10940_ACEOF
10941if ac_fn_c_try_link "$LINENO"; then :
10942 ac_cv_lib_bsd_flock=yes
10943else
10944 ac_cv_lib_bsd_flock=no
10945fi
10946rm -f core conftest.err conftest.$ac_objext \
10947 conftest$ac_exeext conftest.$ac_ext
10948LIBS=$ac_check_lib_save_LIBS
10949fi
10950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10951$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010952if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010953 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010954
10955
10956$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10957
10958
10959fi
10960
10961
10962fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010963done
10964
Antoine Pitroua3000072010-09-07 14:52:42 +000010965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10968$as_echo_n "checking for getpagesize... " >&6; }
10969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010970/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010971
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010972#include <unistd.h>
10973
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010974int
10975main ()
10976{
10977void* p = getpagesize
10978 ;
10979 return 0;
10980}
10981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010982if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010985
Matthias Kloseb159a552010-04-25 21:00:44 +000010986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010987$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10990$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010991
10992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010994
Victor Stinner984890f2011-11-24 13:53:38 +010010995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10996$as_echo_n "checking for broken unsetenv... " >&6; }
10997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10998/* end confdefs.h. */
10999
11000#include <stdlib.h>
11001
11002int
11003main ()
11004{
11005int res = unsetenv("DUMMY")
11006 ;
11007 return 0;
11008}
11009_ACEOF
11010if ac_fn_c_try_compile "$LINENO"; then :
11011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11012$as_echo "no" >&6; }
11013else
11014
11015$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11016
11017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11018$as_echo "yes" >&6; }
11019
11020fi
11021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11022
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011023for ac_prog in true
11024do
11025 # Extract the first word of "$ac_prog", so it can be a program name with args.
11026set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11028$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011029if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011031else
11032 if test -n "$TRUE"; then
11033 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11034else
11035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11036for as_dir in $PATH
11037do
11038 IFS=$as_save_IFS
11039 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011040 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011042 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 $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 +000011044 break 2
11045 fi
11046done
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011048IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011049
11050fi
11051fi
11052TRUE=$ac_cv_prog_TRUE
11053if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11055$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011056else
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11058$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011059fi
11060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011062 test -n "$TRUE" && break
11063done
11064test -n "$TRUE" || TRUE="/bin/true"
11065
11066
Matthias Kloseb9621712010-04-24 17:59:49 +000011067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11068$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011069if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011070 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011071else
11072 ac_check_lib_save_LIBS=$LIBS
11073LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011075/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011077/* Override any GCC internal prototype to avoid an error.
11078 Use char because int might match the return type of a GCC
11079 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011080#ifdef __cplusplus
11081extern "C"
11082#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011083char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011084int
11085main ()
11086{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011087return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011088 ;
11089 return 0;
11090}
11091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011092if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011093 ac_cv_lib_c_inet_aton=yes
11094else
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011097rm -f core conftest.err conftest.$ac_objext \
11098 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011099LIBS=$ac_check_lib_save_LIBS
11100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11102$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011103if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011104 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011105else
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11107$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011108if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011110else
11111 ac_check_lib_save_LIBS=$LIBS
11112LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011114/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116/* Override any GCC internal prototype to avoid an error.
11117 Use char because int might match the return type of a GCC
11118 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011119#ifdef __cplusplus
11120extern "C"
11121#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011122char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011123int
11124main ()
11125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011127 ;
11128 return 0;
11129}
11130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011131if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011132 ac_cv_lib_resolv_inet_aton=yes
11133else
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011136rm -f core conftest.err conftest.$ac_objext \
11137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011138LIBS=$ac_check_lib_save_LIBS
11139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11141$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011142if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011143 cat >>confdefs.h <<_ACEOF
11144#define HAVE_LIBRESOLV 1
11145_ACEOF
11146
11147 LIBS="-lresolv $LIBS"
11148
11149fi
11150
11151
11152fi
11153
11154
Christian Heimesd0764e22007-12-04 15:00:33 +000011155# On Tru64, chflags seems to be present, but calling it will
11156# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11158$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011159if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011161else
Matthias Kloseb9621712010-04-24 17:59:49 +000011162 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011163 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011164else
Matthias Kloseb9621712010-04-24 17:59:49 +000011165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011166/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011167
Christian Heimesd0764e22007-12-04 15:00:33 +000011168#include <sys/stat.h>
11169#include <unistd.h>
11170int main(int argc, char*argv[])
11171{
11172 if(chflags(argv[0], 0) != 0)
11173 return 1;
11174 return 0;
11175}
Ned Deily3eb67d52011-06-28 00:00:28 -070011176
Christian Heimesd0764e22007-12-04 15:00:33 +000011177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011178if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011179 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011180else
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11184 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011185fi
11186
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011187
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11190$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011191if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011193if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011194 ac_cv_have_chflags="yes"
11195else
11196 ac_cv_have_chflags="no"
11197fi
11198
11199fi
11200if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011201
Matthias Kloseb9621712010-04-24 17:59:49 +000011202$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011203
11204fi
11205
Matthias Kloseb9621712010-04-24 17:59:49 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11207$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011208if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011210else
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011212 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011213else
Matthias Kloseb9621712010-04-24 17:59:49 +000011214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011215/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011216
Christian Heimesd0764e22007-12-04 15:00:33 +000011217#include <sys/stat.h>
11218#include <unistd.h>
11219int main(int argc, char*argv[])
11220{
11221 if(lchflags(argv[0], 0) != 0)
11222 return 1;
11223 return 0;
11224}
Ned Deily3eb67d52011-06-28 00:00:28 -070011225
Christian Heimesd0764e22007-12-04 15:00:33 +000011226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011227if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011228 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011229else
Matthias Kloseb9621712010-04-24 17:59:49 +000011230 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11233 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011234fi
11235
11236
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11239$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011240if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011242if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011243 ac_cv_have_lchflags="yes"
11244else
11245 ac_cv_have_lchflags="no"
11246fi
11247
11248fi
11249if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011250
Matthias Kloseb9621712010-04-24 17:59:49 +000011251$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011252
11253fi
11254
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011255case $ac_sys_system/$ac_sys_release in
11256Darwin/*)
11257 _CUR_CFLAGS="${CFLAGS}"
11258 _CUR_LDFLAGS="${LDFLAGS}"
11259 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11260 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11261 ;;
11262esac
11263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11265$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011266if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011267 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011268else
11269 ac_check_lib_save_LIBS=$LIBS
11270LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011272/* end confdefs.h. */
11273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011274/* Override any GCC internal prototype to avoid an error.
11275 Use char because int might match the return type of a GCC
11276 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011277#ifdef __cplusplus
11278extern "C"
11279#endif
11280char inflateCopy ();
11281int
11282main ()
11283{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011284return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011285 ;
11286 return 0;
11287}
11288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011289if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011290 ac_cv_lib_z_inflateCopy=yes
11291else
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011294rm -f core conftest.err conftest.$ac_objext \
11295 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011296LIBS=$ac_check_lib_save_LIBS
11297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11299$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011300if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011301
Matthias Kloseb9621712010-04-24 17:59:49 +000011302$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011303
11304fi
11305
11306
11307case $ac_sys_system/$ac_sys_release in
11308Darwin/*)
11309 CFLAGS="${_CUR_CFLAGS}"
11310 LDFLAGS="${_CUR_LDFLAGS}"
11311 ;;
11312esac
11313
Matthias Kloseb9621712010-04-24 17:59:49 +000011314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11315$as_echo_n "checking for hstrerror... " >&6; }
11316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011318
Martin v. Löwise9416172003-05-03 10:12:45 +000011319#include <netdb.h>
11320
Martin v. Löwise9416172003-05-03 10:12:45 +000011321int
11322main ()
11323{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011324void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011325 ;
11326 return 0;
11327}
11328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011330
Matthias Kloseb9621712010-04-24 17:59:49 +000011331$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011332
Matthias Kloseb159a552010-04-25 21:00:44 +000011333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011334$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011335else
Matthias Kloseb9621712010-04-24 17:59:49 +000011336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11337$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011338
11339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011340rm -f core conftest.err conftest.$ac_objext \
11341 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011342
Matthias Kloseb9621712010-04-24 17:59:49 +000011343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11344$as_echo_n "checking for inet_aton... " >&6; }
11345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011347
Martin v. Löwis86d66262006-02-17 08:40:11 +000011348#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011349#include <sys/socket.h>
11350#include <netinet/in.h>
11351#include <arpa/inet.h>
11352
Martin v. Löwise9416172003-05-03 10:12:45 +000011353int
11354main ()
11355{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011356void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011357 ;
11358 return 0;
11359}
11360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011362
Matthias Kloseb9621712010-04-24 17:59:49 +000011363$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011364
Matthias Kloseb159a552010-04-25 21:00:44 +000011365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011366$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011367else
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011370
11371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011372rm -f core conftest.err conftest.$ac_objext \
11373 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374
Matthias Kloseb9621712010-04-24 17:59:49 +000011375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11376$as_echo_n "checking for inet_pton... " >&6; }
11377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011378/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011379
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011380#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011381#include <sys/socket.h>
11382#include <netinet/in.h>
11383#include <arpa/inet.h>
11384
Martin v. Löwise9416172003-05-03 10:12:45 +000011385int
11386main ()
11387{
11388void* p = inet_pton
11389 ;
11390 return 0;
11391}
11392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011394
Matthias Kloseb9621712010-04-24 17:59:49 +000011395$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011396
Matthias Kloseb159a552010-04-25 21:00:44 +000011397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011398$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011399else
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11401$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011402
11403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011405
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011406# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11408$as_echo_n "checking for setgroups... " >&6; }
11409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011410/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011411
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011412#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011413#ifdef HAVE_GRP_H
11414#include <grp.h>
11415#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011416
Martin v. Löwisd5843682002-11-21 20:41:28 +000011417int
11418main ()
11419{
11420void* p = setgroups
11421 ;
11422 return 0;
11423}
11424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011426
Matthias Kloseb9621712010-04-24 17:59:49 +000011427$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011428
Matthias Kloseb159a552010-04-25 21:00:44 +000011429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011430$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011431else
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11433$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011434
11435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011437
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011438# check for openpty and forkpty
11439
11440for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011441do :
11442 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011443if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011445#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011446_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011447
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011448else
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11450$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011451if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011452 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011453else
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011455LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459/* Override any GCC internal prototype to avoid an error.
11460 Use char because int might match the return type of a GCC
11461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011462#ifdef __cplusplus
11463extern "C"
11464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011465char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011466int
11467main ()
11468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 ;
11471 return 0;
11472}
11473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011474if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011476else
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011479rm -f core conftest.err conftest.$ac_objext \
11480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011481LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11484$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011485if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011487 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011488else
Matthias Kloseb9621712010-04-24 17:59:49 +000011489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11490$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011491if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011492 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011493else
11494 ac_check_lib_save_LIBS=$LIBS
11495LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011497/* end confdefs.h. */
11498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499/* Override any GCC internal prototype to avoid an error.
11500 Use char because int might match the return type of a GCC
11501 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011502#ifdef __cplusplus
11503extern "C"
11504#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011505char openpty ();
11506int
11507main ()
11508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011510 ;
11511 return 0;
11512}
11513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011515 ac_cv_lib_bsd_openpty=yes
11516else
Matthias Kloseb9621712010-04-24 17:59:49 +000011517 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011519rm -f core conftest.err conftest.$ac_objext \
11520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011521LIBS=$ac_check_lib_save_LIBS
11522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11524$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011525if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011526 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011527 LIBS="$LIBS -lbsd"
11528fi
11529
11530
11531fi
11532
Fred Drake8cef4cf2000-06-28 16:40:38 +000011533
11534fi
11535done
11536
11537for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011538do :
11539 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011540if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011542#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011543_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011544
Fred Drake8cef4cf2000-06-28 16:40:38 +000011545else
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11547$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011548if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011550else
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011552LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556/* Override any GCC internal prototype to avoid an error.
11557 Use char because int might match the return type of a GCC
11558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011559#ifdef __cplusplus
11560extern "C"
11561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011562char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011563int
11564main ()
11565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011566return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 ;
11568 return 0;
11569}
11570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011573else
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011576rm -f core conftest.err conftest.$ac_objext \
11577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011578LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11581$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011582if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011583 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011584 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011585else
Matthias Kloseb9621712010-04-24 17:59:49 +000011586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11587$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011588if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011589 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011590else
11591 ac_check_lib_save_LIBS=$LIBS
11592LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011594/* end confdefs.h. */
11595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596/* Override any GCC internal prototype to avoid an error.
11597 Use char because int might match the return type of a GCC
11598 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011599#ifdef __cplusplus
11600extern "C"
11601#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011602char forkpty ();
11603int
11604main ()
11605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011606return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011607 ;
11608 return 0;
11609}
11610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011611if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011612 ac_cv_lib_bsd_forkpty=yes
11613else
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011616rm -f core conftest.err conftest.$ac_objext \
11617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011618LIBS=$ac_check_lib_save_LIBS
11619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11621$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011622if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011624 LIBS="$LIBS -lbsd"
11625fi
11626
11627
11628fi
11629
Fred Drake8cef4cf2000-06-28 16:40:38 +000011630
11631fi
11632done
11633
Jack Jansendd19cf82001-12-06 22:36:17 +000011634
Christian Heimesb186d002008-03-18 15:15:01 +000011635# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011636for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011637do :
11638 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011639if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011640 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011642_ACEOF
11643
11644fi
11645done
11646
11647
Michael W. Hudson54241132001-12-07 15:38:26 +000011648# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011649for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011650do :
11651 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11652ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011653if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011655#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011656_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011657
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011658fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011659done
11660
Michael W. Hudson54241132001-12-07 15:38:26 +000011661
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011662ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011663if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011664 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011665
Martin v. Löwis1142de32002-03-29 16:28:31 +000011666else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011668 *" dup2.$ac_objext "* ) ;;
11669 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011671esac
11672
Martin v. Löwis1142de32002-03-29 16:28:31 +000011673fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011674
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011675ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011676if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011677 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11678
11679else
11680 case " $LIBOBJS " in
11681 *" strdup.$ac_objext "* ) ;;
11682 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11683 ;;
11684esac
11685
11686fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011687
11688
11689for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011690do :
11691 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011692if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011693 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011694#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011697/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011698#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011699int
11700main ()
11701{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011702getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011703 ;
11704 return 0;
11705}
11706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011710
Guido van Rossum627b2d71993-12-24 10:39:16 +000011711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011713
Guido van Rossum627b2d71993-12-24 10:39:16 +000011714fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011715done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011716
Jack Jansen150753c2003-03-29 22:07:47 +000011717for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011718do :
11719 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011720if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011721 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011722#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011725/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011726#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011727int
11728main ()
11729{
11730setpgrp(0,0);
11731 ;
11732 return 0;
11733}
11734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011735if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011736
Matthias Kloseb9621712010-04-24 17:59:49 +000011737$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011738
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011741
11742fi
11743done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011744
Thomas Wouters3a584202000-08-05 23:28:51 +000011745for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011746do :
11747 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011748if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011749 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011750#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011753/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011754#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011755int
11756main ()
11757{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011758gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011759 ;
11760 return 0;
11761}
11762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011763if ac_fn_c_try_compile "$LINENO"; then :
11764
Guido van Rossum627b2d71993-12-24 10:39:16 +000011765else
Skip Montanaro6dead952003-09-25 14:50:04 +000011766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011768
Martin v. Löwis11437992002-04-12 09:54:03 +000011769
Guido van Rossum627b2d71993-12-24 10:39:16 +000011770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011772
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011773fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011774done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011775
Michael W. Hudson54241132001-12-07 15:38:26 +000011776
Victor Stinnere0be4232011-10-25 13:06:09 +020011777for ac_func in clock_gettime
11778do :
11779 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11780if test "x$ac_cv_func_clock_gettime" = xyes; then :
11781 cat >>confdefs.h <<_ACEOF
11782#define HAVE_CLOCK_GETTIME 1
11783_ACEOF
11784
11785else
11786
11787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11788$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11789if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11790 $as_echo_n "(cached) " >&6
11791else
11792 ac_check_lib_save_LIBS=$LIBS
11793LIBS="-lrt $LIBS"
11794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11795/* end confdefs.h. */
11796
11797/* Override any GCC internal prototype to avoid an error.
11798 Use char because int might match the return type of a GCC
11799 builtin and then its argument prototype would still apply. */
11800#ifdef __cplusplus
11801extern "C"
11802#endif
11803char clock_gettime ();
11804int
11805main ()
11806{
11807return clock_gettime ();
11808 ;
11809 return 0;
11810}
11811_ACEOF
11812if ac_fn_c_try_link "$LINENO"; then :
11813 ac_cv_lib_rt_clock_gettime=yes
11814else
11815 ac_cv_lib_rt_clock_gettime=no
11816fi
11817rm -f core conftest.err conftest.$ac_objext \
11818 conftest$ac_exeext conftest.$ac_ext
11819LIBS=$ac_check_lib_save_LIBS
11820fi
11821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11822$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11823if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11824
11825 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11826
11827
11828$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11829
11830
11831fi
11832
11833
11834fi
11835done
11836
11837
11838for ac_func in clock_getres
11839do :
11840 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11841if test "x$ac_cv_func_clock_getres" = xyes; then :
11842 cat >>confdefs.h <<_ACEOF
11843#define HAVE_CLOCK_GETRES 1
11844_ACEOF
11845
11846else
11847
11848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11849$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11850if ${ac_cv_lib_rt_clock_getres+:} false; then :
11851 $as_echo_n "(cached) " >&6
11852else
11853 ac_check_lib_save_LIBS=$LIBS
11854LIBS="-lrt $LIBS"
11855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11856/* end confdefs.h. */
11857
11858/* Override any GCC internal prototype to avoid an error.
11859 Use char because int might match the return type of a GCC
11860 builtin and then its argument prototype would still apply. */
11861#ifdef __cplusplus
11862extern "C"
11863#endif
11864char clock_getres ();
11865int
11866main ()
11867{
11868return clock_getres ();
11869 ;
11870 return 0;
11871}
11872_ACEOF
11873if ac_fn_c_try_link "$LINENO"; then :
11874 ac_cv_lib_rt_clock_getres=yes
11875else
11876 ac_cv_lib_rt_clock_getres=no
11877fi
11878rm -f core conftest.err conftest.$ac_objext \
11879 conftest$ac_exeext conftest.$ac_ext
11880LIBS=$ac_check_lib_save_LIBS
11881fi
11882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11883$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11884if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11885
11886 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11887
11888
11889fi
11890
11891
11892fi
11893done
11894
11895
Matthias Kloseb9621712010-04-24 17:59:49 +000011896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11897$as_echo_n "checking for major... " >&6; }
11898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011899/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011900
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011901#if defined(MAJOR_IN_MKDEV)
11902#include <sys/mkdev.h>
11903#elif defined(MAJOR_IN_SYSMACROS)
11904#include <sys/sysmacros.h>
11905#else
11906#include <sys/types.h>
11907#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011908
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011909int
11910main ()
11911{
11912
11913 makedev(major(0),minor(0));
11914
11915 ;
11916 return 0;
11917}
11918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011919if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011920
11921
Matthias Kloseb9621712010-04-24 17:59:49 +000011922$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11925$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011926
11927else
Skip Montanaro6dead952003-09-25 14:50:04 +000011928
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011931
11932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011933rm -f core conftest.err conftest.$ac_objext \
11934 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011935
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011936# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011937# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11939$as_echo_n "checking for getaddrinfo... " >&6; }
11940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011941/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011942
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011943#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011944#include <sys/socket.h>
11945#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011946#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011947
Martin v. Löwis11437992002-04-12 09:54:03 +000011948int
11949main ()
11950{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011951getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011952 ;
11953 return 0;
11954}
11955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011956if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011957 have_getaddrinfo=yes
11958else
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011961rm -f core conftest.err conftest.$ac_objext \
11962 conftest$ac_exeext conftest.$ac_ext
11963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11964$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011965if test $have_getaddrinfo = yes
11966then
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11968$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011969 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011971else
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011973
11974if test "${enable_ipv6+set}" = set; then
11975 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11976else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011977 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011978fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011979else
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011981/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011982
Stefan Krah19c21392012-11-22 23:47:32 +010011983#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011984#include <sys/types.h>
11985#include <netdb.h>
11986#include <string.h>
11987#include <sys/socket.h>
11988#include <netinet/in.h>
11989
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011990int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011991{
11992 int passive, gaierr, inet4 = 0, inet6 = 0;
11993 struct addrinfo hints, *ai, *aitop;
11994 char straddr[INET6_ADDRSTRLEN], strport[16];
11995
11996 for (passive = 0; passive <= 1; passive++) {
11997 memset(&hints, 0, sizeof(hints));
11998 hints.ai_family = AF_UNSPEC;
11999 hints.ai_flags = passive ? AI_PASSIVE : 0;
12000 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012001 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012002 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12003 (void)gai_strerror(gaierr);
12004 goto bad;
12005 }
12006 for (ai = aitop; ai; ai = ai->ai_next) {
12007 if (ai->ai_addr == NULL ||
12008 ai->ai_addrlen == 0 ||
12009 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12010 straddr, sizeof(straddr), strport, sizeof(strport),
12011 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12012 goto bad;
12013 }
12014 switch (ai->ai_family) {
12015 case AF_INET:
12016 if (strcmp(strport, "54321") != 0) {
12017 goto bad;
12018 }
12019 if (passive) {
12020 if (strcmp(straddr, "0.0.0.0") != 0) {
12021 goto bad;
12022 }
12023 } else {
12024 if (strcmp(straddr, "127.0.0.1") != 0) {
12025 goto bad;
12026 }
12027 }
12028 inet4++;
12029 break;
12030 case AF_INET6:
12031 if (strcmp(strport, "54321") != 0) {
12032 goto bad;
12033 }
12034 if (passive) {
12035 if (strcmp(straddr, "::") != 0) {
12036 goto bad;
12037 }
12038 } else {
12039 if (strcmp(straddr, "::1") != 0) {
12040 goto bad;
12041 }
12042 }
12043 inet6++;
12044 break;
12045 case AF_UNSPEC:
12046 goto bad;
12047 break;
12048 default:
12049 /* another family support? */
12050 break;
12051 }
12052 }
12053 }
12054
12055 if (!(inet4 == 0 || inet4 == 2))
12056 goto bad;
12057 if (!(inet6 == 0 || inet6 == 2))
12058 goto bad;
12059
12060 if (aitop)
12061 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012062 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012063
12064 bad:
12065 if (aitop)
12066 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012067 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012068}
12069
Martin v. Löwis11437992002-04-12 09:54:03 +000012070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012071if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012072 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012073else
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12077 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012080fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012081
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12085$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12086
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012087if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012088then
12089 if test $ipv6 = yes
12090 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012091 echo 'Fatal: You must get working getaddrinfo() function.'
12092 echo ' or you can specify "--disable-ipv6"'.
12093 exit 1
12094 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012095else
Martin v. Löwis11437992002-04-12 09:54:03 +000012096
Matthias Kloseb9621712010-04-24 17:59:49 +000012097$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012098
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012099fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012100
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012101for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012102do :
12103 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012104if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012105 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012106#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012107_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012108
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012109fi
12110done
12111
Michael W. Hudson54241132001-12-07 15:38:26 +000012112
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012113# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12115$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012116if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012120/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012121#include <sys/types.h>
12122#include <sys/time.h>
12123#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012124
Martin v. Löwis11437992002-04-12 09:54:03 +000012125int
12126main ()
12127{
12128if ((struct tm *) 0)
12129return 0;
12130 ;
12131 return 0;
12132}
12133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012134if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012135 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012136else
Matthias Kloseb9621712010-04-24 17:59:49 +000012137 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12142$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012143if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012144
Matthias Kloseb9621712010-04-24 17:59:49 +000012145$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012146
12147fi
12148
Matthias Kloseb9621712010-04-24 17:59:49 +000012149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12150$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012151if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012155/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156#include <sys/types.h>
12157#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012158
Martin v. Löwis11437992002-04-12 09:54:03 +000012159int
12160main ()
12161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162struct tm tm;
12163 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012165 ;
12166 return 0;
12167}
12168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012169if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012170 ac_cv_struct_tm=time.h
12171else
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12177$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012178if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012179
Matthias Kloseb9621712010-04-24 17:59:49 +000012180$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012181
12182fi
12183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184ac_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 +000012185#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012186
Matthias Kloseb9621712010-04-24 17:59:49 +000012187"
Victor Stinnere0be4232011-10-25 13:06:09 +020012188if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012189
12190cat >>confdefs.h <<_ACEOF
12191#define HAVE_STRUCT_TM_TM_ZONE 1
12192_ACEOF
12193
12194
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012195fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012196
Martin v. Löwis11437992002-04-12 09:54:03 +000012197if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12198
Matthias Kloseb9621712010-04-24 17:59:49 +000012199$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012200
12201else
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12203"
Victor Stinnere0be4232011-10-25 13:06:09 +020012204if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206else
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208fi
12209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012210cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012211#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212_ACEOF
12213
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12215$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012216if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218else
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012220/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012221#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012222#if !HAVE_DECL_TZNAME
12223extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012225
Martin v. Löwis11437992002-04-12 09:54:03 +000012226int
12227main ()
12228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 ;
12231 return 0;
12232}
12233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012234if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012235 ac_cv_var_tzname=yes
12236else
Matthias Kloseb9621712010-04-24 17:59:49 +000012237 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012239rm -f core conftest.err conftest.$ac_objext \
12240 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12243$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012244 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012245
Matthias Kloseb9621712010-04-24 17:59:49 +000012246$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012247
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248 fi
12249fi
12250
Matthias Kloseb9621712010-04-24 17:59:49 +000012251ac_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 +020012252if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012253
12254cat >>confdefs.h <<_ACEOF
12255#define HAVE_STRUCT_STAT_ST_RDEV 1
12256_ACEOF
12257
12258
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012259fi
12260
Matthias Kloseb9621712010-04-24 17:59:49 +000012261ac_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 +020012262if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012263
Martin v. Löwis11437992002-04-12 09:54:03 +000012264cat >>confdefs.h <<_ACEOF
12265#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12266_ACEOF
12267
12268
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012269fi
12270
Matthias Kloseb9621712010-04-24 17:59:49 +000012271ac_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 +020012272if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012273
12274cat >>confdefs.h <<_ACEOF
12275#define HAVE_STRUCT_STAT_ST_FLAGS 1
12276_ACEOF
12277
12278
12279fi
12280
Matthias Kloseb9621712010-04-24 17:59:49 +000012281ac_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 +020012282if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012283
12284cat >>confdefs.h <<_ACEOF
12285#define HAVE_STRUCT_STAT_ST_GEN 1
12286_ACEOF
12287
12288
12289fi
12290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291ac_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 +020012292if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012293
12294cat >>confdefs.h <<_ACEOF
12295#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12296_ACEOF
12297
12298
12299fi
12300
Matthias Kloseb9621712010-04-24 17:59:49 +000012301ac_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 +020012302if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012303
Martin v. Löwis11437992002-04-12 09:54:03 +000012304cat >>confdefs.h <<_ACEOF
12305#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12306_ACEOF
12307
12308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012310
12311else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012313 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012314 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12315 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012316esac
12317
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012318fi
12319
Michael W. Hudson54241132001-12-07 15:38:26 +000012320
Martin v. Löwis11437992002-04-12 09:54:03 +000012321
Matthias Kloseb9621712010-04-24 17:59:49 +000012322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12323$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012324if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012325 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012326else
Matthias Kloseb159a552010-04-25 21:00:44 +000012327
Matthias Kloseb9621712010-04-24 17:59:49 +000012328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012329/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012330#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012331int
12332main ()
12333{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012334return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 ;
12336 return 0;
12337}
12338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012339if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012340 ac_cv_header_time_altzone=yes
12341else
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012346fi
12347
Matthias Kloseb9621712010-04-24 17:59:49 +000012348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12349$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012350if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012351
Matthias Kloseb9621712010-04-24 17:59:49 +000012352$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012353
12354fi
12355
Guido van Rossumda88dad1995-01-26 00:46:29 +000012356was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12358$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012360/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012361
12362#include <sys/types.h>
12363#include <sys/select.h>
12364#include <sys/time.h>
12365
Martin v. Löwis11437992002-04-12 09:54:03 +000012366int
12367main ()
12368{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012369;
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 ;
12371 return 0;
12372}
12373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012375
12376
Matthias Kloseb9621712010-04-24 17:59:49 +000012377$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012378
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012379 was_it_defined=yes
12380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12384$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12387$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012388if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012389 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012390else
Matthias Kloseb9621712010-04-24 17:59:49 +000012391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012392/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012393#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012394int
12395main ()
12396{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012397struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012398 ;
12399 return 0;
12400}
12401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012403 ac_cv_struct_addrinfo=yes
12404else
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12408fi
12409
Matthias Kloseb9621712010-04-24 17:59:49 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12411$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012412if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012413
Matthias Kloseb9621712010-04-24 17:59:49 +000012414$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012415
12416fi
12417
Matthias Kloseb9621712010-04-24 17:59:49 +000012418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12419$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012420if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012421 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012422else
Matthias Kloseb9621712010-04-24 17:59:49 +000012423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012424/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012425
12426# include <sys/types.h>
12427# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012428int
12429main ()
12430{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012431struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 ;
12433 return 0;
12434}
12435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012436if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012437 ac_cv_struct_sockaddr_storage=yes
12438else
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12442fi
12443
Matthias Kloseb9621712010-04-24 17:59:49 +000012444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12445$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012446if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012449
12450fi
12451
Guido van Rossum627b2d71993-12-24 10:39:16 +000012452# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12455$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012456if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012458else
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012461$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012462int
12463main ()
12464{
12465static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012466test_array [0] = 0;
12467return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012468
12469 ;
12470 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012471}
Martin v. Löwis11437992002-04-12 09:54:03 +000012472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012473if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012474 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012475else
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12481$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012482if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012483 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012484
12485fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12488$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012489if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012491else
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012493/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494
Martin v. Löwis11437992002-04-12 09:54:03 +000012495int
12496main ()
12497{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012498
Martin v. Löwis11437992002-04-12 09:54:03 +000012499#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012500 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012501 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012502 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012503 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012504 char const *const *pcpcc;
12505 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012506 /* NEC SVR4.0.2 mips cc rejects this. */
12507 struct point {int x, y;};
12508 static struct point const zero = {0,0};
12509 /* AIX XL C 1.02.0.0 rejects this.
12510 It does not let you subtract one const X* pointer from another in
12511 an arm of an if-expression whose if-part is not a constant
12512 expression */
12513 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012514 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516 ++pcpcc;
12517 ppc = (char**) pcpcc;
12518 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012519 { /* SCO 3.2v4 cc rejects this sort of thing. */
12520 char tx;
12521 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012522 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012523
Martin v. Löwis11437992002-04-12 09:54:03 +000012524 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 }
12527 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12528 int x[] = {25, 17};
12529 const int *foo = &x[0];
12530 ++foo;
12531 }
12532 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12533 typedef const int *iptr;
12534 iptr p = 0;
12535 ++p;
12536 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012537 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012539 struct s { int j; const int *ap[3]; } bx;
12540 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012541 }
12542 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12543 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012546 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012547#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012548
Martin v. Löwis11437992002-04-12 09:54:03 +000012549 ;
12550 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012551}
Martin v. Löwis11437992002-04-12 09:54:03 +000012552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012553if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012554 ac_cv_c_const=yes
12555else
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12561$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012562if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012563
Matthias Kloseb9621712010-04-24 17:59:49 +000012564$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012565
12566fi
12567
Michael W. Hudson54241132001-12-07 15:38:26 +000012568
Guido van Rossumda88dad1995-01-26 00:46:29 +000012569works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12571$as_echo_n "checking for working volatile... " >&6; }
12572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012573/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012574
Martin v. Löwis11437992002-04-12 09:54:03 +000012575int
12576main ()
12577{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012578volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012579 ;
12580 return 0;
12581}
12582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012583if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012584 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012585else
Skip Montanaro6dead952003-09-25 14:50:04 +000012586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012588
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012589
Guido van Rossum627b2d71993-12-24 10:39:16 +000012590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12593$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012594
Guido van Rossumda88dad1995-01-26 00:46:29 +000012595works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12597$as_echo_n "checking for working signed char... " >&6; }
12598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012599/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012600
Martin v. Löwis11437992002-04-12 09:54:03 +000012601int
12602main ()
12603{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012604signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012605 ;
12606 return 0;
12607}
12608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012609if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012610 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012611else
Skip Montanaro6dead952003-09-25 14:50:04 +000012612
Matthias Kloseb9621712010-04-24 17:59:49 +000012613$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012614
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012615
Guido van Rossum7f43da71994-08-01 12:15:30 +000012616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12619$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012620
Guido van Rossumda88dad1995-01-26 00:46:29 +000012621have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12623$as_echo_n "checking for prototypes... " >&6; }
12624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012625/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012626int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012627int
12628main ()
12629{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012630return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 ;
12632 return 0;
12633}
12634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012636
Matthias Kloseb9621712010-04-24 17:59:49 +000012637$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012638
Matthias Kloseb159a552010-04-25 21:00:44 +000012639 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12643$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012644
Guido van Rossumda88dad1995-01-26 00:46:29 +000012645works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12647$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012649/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012650
12651#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012652int foo(int x, ...) {
12653 va_list va;
12654 va_start(va, x);
12655 va_arg(va, int);
12656 va_arg(va, char *);
12657 va_arg(va, double);
12658 return 0;
12659}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012660
Martin v. Löwis11437992002-04-12 09:54:03 +000012661int
12662main ()
12663{
Guido van Rossum90eea071996-08-30 20:58:57 +000012664return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 ;
12666 return 0;
12667}
12668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012669if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
12671
Matthias Kloseb9621712010-04-24 17:59:49 +000012672$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012673
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012674 works=yes
12675
Guido van Rossum627b2d71993-12-24 10:39:16 +000012676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12679$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012680
Martin v. Löwisd6320502004-08-12 13:45:08 +000012681# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12683$as_echo_n "checking for socketpair... " >&6; }
12684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012685/* end confdefs.h. */
12686
12687#include <sys/types.h>
12688#include <sys/socket.h>
12689
12690int
12691main ()
12692{
12693void *x=socketpair
12694 ;
12695 return 0;
12696}
12697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012699
Matthias Kloseb9621712010-04-24 17:59:49 +000012700$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012701
Matthias Kloseb159a552010-04-25 21:00:44 +000012702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012703$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012704else
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12706$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012707
12708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012710
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012711# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12713$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012715/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012716#include <sys/types.h>
12717#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012718int
12719main ()
12720{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012721struct sockaddr x;
12722x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012723 ;
12724 return 0;
12725}
12726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012727if ac_fn_c_try_compile "$LINENO"; then :
12728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12729$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012732
12733else
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12735$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012736
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012739
Guido van Rossumda88dad1995-01-26 00:46:29 +000012740va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12742$as_echo_n "checking whether va_list is an array... " >&6; }
12743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012744/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745
12746#ifdef HAVE_STDARG_PROTOTYPES
12747#include <stdarg.h>
12748#else
12749#include <varargs.h>
12750#endif
12751
Martin v. Löwis11437992002-04-12 09:54:03 +000012752int
12753main ()
12754{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012755va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 ;
12757 return 0;
12758}
12759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012760if ac_fn_c_try_compile "$LINENO"; then :
12761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762else
Skip Montanaro6dead952003-09-25 14:50:04 +000012763
Martin v. Löwis11437992002-04-12 09:54:03 +000012764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012766
Guido van Rossumda88dad1995-01-26 00:46:29 +000012767 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012768
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12772$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012773
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012774# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
12776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012778if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012779
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012781
Matthias Kloseb9621712010-04-24 17:59:49 +000012782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12783$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012784 OLD_CFLAGS=$CFLAGS
12785 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012787/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012788
12789# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012790
Martin v. Löwis11437992002-04-12 09:54:03 +000012791int
12792main ()
12793{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012794
12795 char *name;
12796 struct hostent *he, *res;
12797 char buffer[2048];
12798 int buflen = 2048;
12799 int h_errnop;
12800
12801 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012802
12803 ;
12804 return 0;
12805}
12806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012808
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012810
Martin v. Löwis11437992002-04-12 09:54:03 +000012811
Matthias Kloseb9621712010-04-24 17:59:49 +000012812$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12815$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012816
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012817else
Skip Montanaro6dead952003-09-25 14:50:04 +000012818
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12820$as_echo "no" >&6; }
12821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12822$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012824/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012825
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012826# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
Martin v. Löwis11437992002-04-12 09:54:03 +000012828int
12829main ()
12830{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012831
12832 char *name;
12833 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012834 char buffer[2048];
12835 int buflen = 2048;
12836 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012837
Matthias Kloseb159a552010-04-25 21:00:44 +000012838 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012839
12840 ;
12841 return 0;
12842}
12843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012844if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012845
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012847
Martin v. Löwis11437992002-04-12 09:54:03 +000012848
Matthias Kloseb159a552010-04-25 21:00:44 +000012849$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12852$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012853
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012854else
Skip Montanaro6dead952003-09-25 14:50:04 +000012855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12857$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12859$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12861/* end confdefs.h. */
12862
12863# include <netdb.h>
12864
12865int
12866main ()
12867{
12868
12869 char *name;
12870 struct hostent *he;
12871 struct hostent_data data;
12872
12873 (void) gethostbyname_r(name, he, &data);
12874
12875 ;
12876 return 0;
12877}
12878_ACEOF
12879if ac_fn_c_try_compile "$LINENO"; then :
12880
12881 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12882
12883
12884$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12885
12886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12887$as_echo "yes" >&6; }
12888
12889else
12890
12891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12892$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012893
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012902 CFLAGS=$OLD_CFLAGS
12903
12904else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012905
Matthias Kloseb9621712010-04-24 17:59:49 +000012906 for ac_func in gethostbyname
12907do :
12908 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012909if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012911#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012912_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012913
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012914fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012915done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012916
Michael W. Hudson54241132001-12-07 15:38:26 +000012917
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012918fi
12919
Michael W. Hudson54241132001-12-07 15:38:26 +000012920
12921
12922
12923
12924
12925
Guido van Rossum627b2d71993-12-24 10:39:16 +000012926# checks for system services
12927# (none yet)
12928
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012930ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012931if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012932
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012933else
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12935$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012936if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012938else
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012940LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944/* Override any GCC internal prototype to avoid an error.
12945 Use char because int might match the return type of a GCC
12946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012947#ifdef __cplusplus
12948extern "C"
12949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012950char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012951int
12952main ()
12953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012954return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 ;
12956 return 0;
12957}
12958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012961else
Matthias Kloseb9621712010-04-24 17:59:49 +000012962 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012964rm -f core conftest.err conftest.$ac_objext \
12965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012966LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12969$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012970if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012971 cat >>confdefs.h <<_ACEOF
12972#define HAVE_LIBIEEE 1
12973_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012974
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012975 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012976
Guido van Rossum627b2d71993-12-24 10:39:16 +000012977fi
12978
Michael W. Hudson54241132001-12-07 15:38:26 +000012979
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012980fi
12981
Michael W. Hudson54241132001-12-07 15:38:26 +000012982
Guido van Rossum7f253911997-05-09 02:42:48 +000012983# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12985$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012987# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012988if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012989 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012990if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012991then
12992
Matthias Kloseb9621712010-04-24 17:59:49 +000012993$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012994
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12996$as_echo "yes" >&6; }
12997else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12998$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012999fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013000else
Matthias Kloseb9621712010-04-24 17:59:49 +000013001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13002$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003fi
13004
Guido van Rossum7f253911997-05-09 02:42:48 +000013005
Guido van Rossum7f43da71994-08-01 12:15:30 +000013006# check for --with-libm=...
13007
Guido van Rossum563e7081996-09-10 18:20:48 +000013008case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013009Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013010*) LIBM=-lm
13011esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13013$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013015# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013016if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013017 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013018if test "$withval" = no
13019then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13021$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013022elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013023then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13025$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013026else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013027fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013028else
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13030$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031fi
13032
Guido van Rossum7f43da71994-08-01 12:15:30 +000013033
13034# check for --with-libc=...
13035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13037$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013039# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013040if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013041 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013042if test "$withval" = no
13043then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13045$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013046elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013047then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13049$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013050else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013051fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013052else
Matthias Kloseb9621712010-04-24 17:59:49 +000013053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13054$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013055fi
13056
Guido van Rossum7f43da71994-08-01 12:15:30 +000013057
Stefan Krah1919b7e2012-03-21 18:25:23 +010013058# **************************************
13059# * Check for gcc x64 inline assembler *
13060# **************************************
13061
13062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13063$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13065/* end confdefs.h. */
13066
13067int
13068main ()
13069{
13070
13071 __asm__ __volatile__ ("movq %rcx, %rax");
13072
13073 ;
13074 return 0;
13075}
13076_ACEOF
13077if ac_fn_c_try_compile "$LINENO"; then :
13078 have_gcc_asm_for_x64=yes
13079else
13080 have_gcc_asm_for_x64=no
13081fi
13082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13084$as_echo "$have_gcc_asm_for_x64" >&6; }
13085if test "$have_gcc_asm_for_x64" = yes
13086then
13087
13088$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13089
13090fi
13091
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013092# **************************************************
13093# * Check for various properties of floating point *
13094# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13097$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013098if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013100else
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013103 ac_cv_little_endian_double=no
13104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013106/* end confdefs.h. */
13107
13108#include <string.h>
13109int main() {
13110 double x = 9006104071832581.0;
13111 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13112 return 0;
13113 else
13114 return 1;
13115}
13116
13117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013118if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013119 ac_cv_little_endian_double=yes
13120else
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13124 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013125fi
13126
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013127fi
13128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13130$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013131if test "$ac_cv_little_endian_double" = yes
13132then
13133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013135
13136fi
13137
Matthias Kloseb9621712010-04-24 17:59:49 +000013138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13139$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013140if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013141 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013142else
13143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013145 ac_cv_big_endian_double=no
13146else
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013148/* end confdefs.h. */
13149
13150#include <string.h>
13151int main() {
13152 double x = 9006104071832581.0;
13153 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13154 return 0;
13155 else
13156 return 1;
13157}
13158
13159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013160if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013161 ac_cv_big_endian_double=yes
13162else
Matthias Kloseb9621712010-04-24 17:59:49 +000013163 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13166 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013167fi
13168
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013169fi
13170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13172$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013173if test "$ac_cv_big_endian_double" = yes
13174then
13175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013177
13178fi
13179
13180# Some ARM platforms use a mixed-endian representation for doubles.
13181# While Python doesn't currently have full support for these platforms
13182# (see e.g., issue 1762561), we can at least make sure that float <-> string
13183# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13185$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013186if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013188else
13189
Matthias Kloseb9621712010-04-24 17:59:49 +000013190if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013191 ac_cv_mixed_endian_double=no
13192else
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013194/* end confdefs.h. */
13195
13196#include <string.h>
13197int main() {
13198 double x = 9006104071832581.0;
13199 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13200 return 0;
13201 else
13202 return 1;
13203}
13204
13205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013206if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013207 ac_cv_mixed_endian_double=yes
13208else
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13212 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013213fi
13214
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013215fi
13216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13218$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013219if test "$ac_cv_mixed_endian_double" = yes
13220then
13221
Matthias Kloseb9621712010-04-24 17:59:49 +000013222$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013223
13224fi
13225
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013226# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013227# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013228# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013229# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013230# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013231# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013232
13233# This inline assembler syntax may also work for suncc and icc,
13234# so we try it on all platforms.
13235
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13237$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013239/* end confdefs.h. */
13240
13241int
13242main ()
13243{
13244
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013245 unsigned short cw;
13246 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13247 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013248
13249 ;
13250 return 0;
13251}
13252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013253if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013254 have_gcc_asm_for_x87=yes
13255else
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013257fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13260$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013261if test "$have_gcc_asm_for_x87" = yes
13262then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013263
Matthias Kloseb9621712010-04-24 17:59:49 +000013264$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013265
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013266fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013267
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013268# Detect whether system arithmetic is subject to x87-style double
13269# rounding issues. The result of this test has little meaning on non
13270# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13271# mode is round-to-nearest and double rounding issues are present, and
13272# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13274$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013275# $BASECFLAGS may affect the result
13276ac_save_cc="$CC"
13277CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013278if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013279 ac_cv_x87_double_rounding=no
13280else
Matthias Kloseb9621712010-04-24 17:59:49 +000013281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013282/* end confdefs.h. */
13283
13284#include <stdlib.h>
13285#include <math.h>
13286int main() {
13287 volatile double x, y, z;
13288 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13289 x = 0.99999999999999989; /* 1-2**-53 */
13290 y = 1./x;
13291 if (y != 1.)
13292 exit(0);
13293 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13294 x = 1e16;
13295 y = 2.99999;
13296 z = x + y;
13297 if (z != 1e16+4.)
13298 exit(0);
13299 /* both tests show evidence of double rounding */
13300 exit(1);
13301}
13302
13303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013304if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013305 ac_cv_x87_double_rounding=no
13306else
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13310 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013311fi
13312
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013313CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13315$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013316if test "$ac_cv_x87_double_rounding" = yes
13317then
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013320
13321fi
13322
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013323# ************************************
13324# * Check for mathematical functions *
13325# ************************************
13326
13327LIBS_SAVE=$LIBS
13328LIBS="$LIBS $LIBM"
13329
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013330for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13331do :
13332 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13333ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013334if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013335 cat >>confdefs.h <<_ACEOF
13336#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13337_ACEOF
13338
13339fi
13340done
13341
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013342for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013343do :
13344 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13345ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013346if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013347 cat >>confdefs.h <<_ACEOF
13348#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13349_ACEOF
13350
13351fi
13352done
13353
13354ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13355"
Victor Stinnere0be4232011-10-25 13:06:09 +020013356if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013357 ac_have_decl=1
13358else
13359 ac_have_decl=0
13360fi
13361
13362cat >>confdefs.h <<_ACEOF
13363#define HAVE_DECL_ISINF $ac_have_decl
13364_ACEOF
13365ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13366"
Victor Stinnere0be4232011-10-25 13:06:09 +020013367if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013368 ac_have_decl=1
13369else
13370 ac_have_decl=0
13371fi
13372
13373cat >>confdefs.h <<_ACEOF
13374#define HAVE_DECL_ISNAN $ac_have_decl
13375_ACEOF
13376ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13377"
Victor Stinnere0be4232011-10-25 13:06:09 +020013378if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013379 ac_have_decl=1
13380else
13381 ac_have_decl=0
13382fi
13383
13384cat >>confdefs.h <<_ACEOF
13385#define HAVE_DECL_ISFINITE $ac_have_decl
13386_ACEOF
13387
13388
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013389# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13390# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13392$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013393if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013395else
13396
Matthias Kloseb9621712010-04-24 17:59:49 +000013397if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013398 ac_cv_tanh_preserves_zero_sign=no
13399else
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013401/* end confdefs.h. */
13402
13403#include <math.h>
13404#include <stdlib.h>
13405int main() {
13406 /* return 0 if either negative zeros don't exist
13407 on this platform or if negative zeros exist
13408 and tanh(-0.) == -0. */
13409 if (atan2(0., -1.) == atan2(-0., -1.) ||
13410 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13411 else exit(1);
13412}
13413
13414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013415if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013416 ac_cv_tanh_preserves_zero_sign=yes
13417else
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13421 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013422fi
13423
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013424fi
13425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13427$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013428if test "$ac_cv_tanh_preserves_zero_sign" = yes
13429then
13430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013432
13433fi
13434
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013435if test "$ac_cv_func_log1p" = yes
13436then
13437 # On some versions of AIX, log1p(-0.) returns 0. instead of
13438 # -0. See issue #9920.
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13440$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013441 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013442 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013443else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013444
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013445 if test "$cross_compiling" = yes; then :
13446 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013447else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13449/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013450
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013451 #include <math.h>
13452 #include <stdlib.h>
13453 int main() {
13454 /* Fail if the signs of log1p(-0.) and -0. can be
13455 distinguished. */
13456 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13457 return 0;
13458 else
13459 return 1;
13460 }
13461
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013462_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013463if ac_fn_c_try_run "$LINENO"; then :
13464 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013465else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013466 ac_cv_log1p_drops_zero_sign=yes
13467fi
13468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13469 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013470fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013471
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013472fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013473
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13475$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13476fi
13477if test "$ac_cv_log1p_drops_zero_sign" = yes
13478then
13479
13480$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13481
13482fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013483
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013484LIBS=$LIBS_SAVE
13485
Mark Dickinsona614f042009-11-28 12:48:43 +000013486# For multiprocessing module, check that sem_open
13487# actually works. For FreeBSD versions <= 7.2,
13488# the kernel module that provides POSIX semaphores
13489# isn't loaded by default, so an attempt to call
13490# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13492$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013493if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013494 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013495else
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013497 ac_cv_posix_semaphores_enabled=yes
13498else
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013500/* end confdefs.h. */
13501
13502#include <unistd.h>
13503#include <fcntl.h>
13504#include <stdio.h>
13505#include <semaphore.h>
13506#include <sys/stat.h>
13507
13508int main(void) {
13509 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13510 if (a == SEM_FAILED) {
13511 perror("sem_open");
13512 return 1;
13513 }
13514 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013515 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013516 return 0;
13517}
13518
13519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013520if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013521 ac_cv_posix_semaphores_enabled=yes
13522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13526 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013527fi
13528
13529
Mark Dickinsona614f042009-11-28 12:48:43 +000013530fi
13531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13533$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013534if test $ac_cv_posix_semaphores_enabled = no
13535then
13536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013538
13539fi
13540
Mark Dickinson10683072009-04-18 21:18:19 +000013541# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13543$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013544if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013548 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013549else
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013551/* end confdefs.h. */
13552
13553#include <unistd.h>
13554#include <fcntl.h>
13555#include <stdio.h>
13556#include <semaphore.h>
13557#include <sys/stat.h>
13558
13559int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013560 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013561 int count;
13562 int res;
13563 if(a==SEM_FAILED){
13564 perror("sem_open");
13565 return 1;
13566
13567 }
13568 res = sem_getvalue(a, &count);
13569 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013570 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013571 return res==-1 ? 1 : 0;
13572}
13573
Mark Dickinson10683072009-04-18 21:18:19 +000013574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013575if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013576 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013577else
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13581 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013582fi
13583
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013584
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013585fi
13586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13588$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013589if test $ac_cv_broken_sem_getvalue = yes
13590then
13591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013593
13594fi
13595
Mark Dickinsonbd792642009-03-18 20:06:12 +000013596# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13598$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013599# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013600if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013601 enableval=$enable_big_digits; case $enable_big_digits in
13602yes)
13603 enable_big_digits=30 ;;
13604no)
13605 enable_big_digits=15 ;;
1360615|30)
13607 ;;
13608*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013609 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 +000013610esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13612$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013613
13614cat >>confdefs.h <<_ACEOF
13615#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13616_ACEOF
13617
13618
13619else
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13621$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013622fi
13623
13624
Guido van Rossumef2255b2000-03-10 22:30:29 +000013625# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013626ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013627if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
13629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013631
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013632 wchar_h="yes"
13633
Guido van Rossumef2255b2000-03-10 22:30:29 +000013634else
Martin v. Löwis11437992002-04-12 09:54:03 +000013635 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013636
13637fi
13638
Michael W. Hudson54241132001-12-07 15:38:26 +000013639
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013641# determine wchar_t size
13642if test "$wchar_h" = yes
13643then
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013645# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13646# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13647# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13649$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013650if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013652else
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13654"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013655
Martin v. Löwis11437992002-04-12 09:54:03 +000013656else
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 if test "$ac_cv_type_wchar_t" = yes; then
13658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013660as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013661See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013662 else
13663 ac_cv_sizeof_wchar_t=0
13664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013666
Martin v. Löwis11437992002-04-12 09:54:03 +000013667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13669$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670
13671
13672
Martin v. Löwis11437992002-04-12 09:54:03 +000013673cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013674#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013675_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013676
Michael W. Hudson54241132001-12-07 15:38:26 +000013677
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013678fi
13679
Matthias Kloseb9621712010-04-24 17:59:49 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13681$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013682have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013684/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013685
13686#include <tcl.h>
13687#if TCL_UTF_MAX != 6
13688# error "NOT UCS4_TCL"
13689#endif
13690int
13691main ()
13692{
13693
13694 ;
13695 return 0;
13696}
13697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013699
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013702
13703 have_ucs4_tcl=yes
13704
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13708$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013709
Skip Montanaro6dead952003-09-25 14:50:04 +000013710# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013711if test "$wchar_h" = yes
13712then
13713 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13715$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013716 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013718else
13719
Matthias Kloseb9621712010-04-24 17:59:49 +000013720 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013721 ac_cv_wchar_t_signed=yes
13722else
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013724/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013725
13726 #include <wchar.h>
13727 int main()
13728 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013729 /* Success: exit code 0 */
13730 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013731 }
13732
13733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013734if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013735 ac_cv_wchar_t_signed=yes
13736else
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13740 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013741fi
13742
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013743fi
13744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13746$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013747fi
13748
Georg Brandl52d168a2008-01-07 18:10:24 +000013749# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013750if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013751 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013752then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013753 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013756
Georg Brandl52d168a2008-01-07 18:10:24 +000013757else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013758 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013759fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13761$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013762
13763# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13765$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013766if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013768else
Matthias Kloseb9621712010-04-24 17:59:49 +000013769 ac_cv_c_bigendian=unknown
13770 # See if we're dealing with a universal compiler.
13771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13772/* end confdefs.h. */
13773#ifndef __APPLE_CC__
13774 not a universal capable compiler
13775 #endif
13776 typedef int dummy;
13777
Skip Montanaro6dead952003-09-25 14:50:04 +000013778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013779if ac_fn_c_try_compile "$LINENO"; then :
13780
13781 # Check for potential -arch flags. It is not universal unless
13782 # there are at least two -arch flags with different values.
13783 ac_arch=
13784 ac_prev=
13785 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13786 if test -n "$ac_prev"; then
13787 case $ac_word in
13788 i?86 | x86_64 | ppc | ppc64)
13789 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13790 ac_arch=$ac_word
13791 else
13792 ac_cv_c_bigendian=universal
13793 break
13794 fi
13795 ;;
13796 esac
13797 ac_prev=
13798 elif test "x$ac_word" = "x-arch"; then
13799 ac_prev=arch
13800 fi
13801 done
13802fi
13803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13804 if test $ac_cv_c_bigendian = unknown; then
13805 # See if sys/param.h defines the BYTE_ORDER macro.
13806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013807/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013808#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013810
Martin v. Löwis11437992002-04-12 09:54:03 +000013811int
13812main ()
13813{
Matthias Kloseb9621712010-04-24 17:59:49 +000013814#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13815 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13816 && LITTLE_ENDIAN)
13817 bogus endian macros
13818 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
13820 ;
13821 return 0;
13822}
13823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013824if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013825 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013827/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013828#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013830
Martin v. Löwis11437992002-04-12 09:54:03 +000013831int
13832main ()
13833{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013834#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 not big endian
13836 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
13838 ;
13839 return 0;
13840}
13841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013842if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013843 ac_cv_c_bigendian=yes
13844else
Matthias Kloseb9621712010-04-24 17:59:49 +000013845 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013848fi
13849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13850 fi
13851 if test $ac_cv_c_bigendian = unknown; then
13852 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013854/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013855#include <limits.h>
13856
Martin v. Löwis11437992002-04-12 09:54:03 +000013857int
13858main ()
13859{
Matthias Kloseb9621712010-04-24 17:59:49 +000013860#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13861 bogus endian macros
13862 #endif
13863
Martin v. Löwis11437992002-04-12 09:54:03 +000013864 ;
13865 return 0;
13866}
13867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013868if ac_fn_c_try_compile "$LINENO"; then :
13869 # It does; now see whether it defined to _BIG_ENDIAN or not.
13870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13871/* end confdefs.h. */
13872#include <limits.h>
13873
13874int
13875main ()
13876{
13877#ifndef _BIG_ENDIAN
13878 not big endian
13879 #endif
13880
13881 ;
13882 return 0;
13883}
13884_ACEOF
13885if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013886 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013887else
Matthias Kloseb9621712010-04-24 17:59:49 +000013888 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13891fi
13892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13893 fi
13894 if test $ac_cv_c_bigendian = unknown; then
13895 # Compile a test program.
13896 if test "$cross_compiling" = yes; then :
13897 # Try to guess by grepping values from an object file.
13898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13899/* end confdefs.h. */
13900short int ascii_mm[] =
13901 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13902 short int ascii_ii[] =
13903 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13904 int use_ascii (int i) {
13905 return ascii_mm[i] + ascii_ii[i];
13906 }
13907 short int ebcdic_ii[] =
13908 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13909 short int ebcdic_mm[] =
13910 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13911 int use_ebcdic (int i) {
13912 return ebcdic_mm[i] + ebcdic_ii[i];
13913 }
13914 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915
Matthias Kloseb9621712010-04-24 17:59:49 +000013916int
13917main ()
13918{
13919return use_ascii (foo) == use_ebcdic (foo);
13920 ;
13921 return 0;
13922}
13923_ACEOF
13924if ac_fn_c_try_compile "$LINENO"; then :
13925 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13926 ac_cv_c_bigendian=yes
13927 fi
13928 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13929 if test "$ac_cv_c_bigendian" = unknown; then
13930 ac_cv_c_bigendian=no
13931 else
13932 # finding both strings is unlikely to happen, but who knows?
13933 ac_cv_c_bigendian=unknown
13934 fi
13935 fi
13936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013938else
Matthias Kloseb9621712010-04-24 17:59:49 +000013939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013940/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013942int
13943main ()
13944{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 /* Are we little or big endian? From Harbison&Steele. */
13947 union
13948 {
13949 long int l;
13950 char c[sizeof (long int)];
13951 } u;
13952 u.l = 1;
13953 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954
13955 ;
13956 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013957}
Martin v. Löwis11437992002-04-12 09:54:03 +000013958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013959if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013960 ac_cv_c_bigendian=no
13961else
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13971$as_echo "$ac_cv_c_bigendian" >&6; }
13972 case $ac_cv_c_bigendian in #(
13973 yes)
13974 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13975;; #(
13976 no)
13977 ;; #(
13978 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013979
Matthias Kloseb9621712010-04-24 17:59:49 +000013980$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982 ;; #(
13983 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013984 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013985 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013987
Michael W. Hudson54241132001-12-07 15:38:26 +000013988
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013989# ABI version string for Python extension modules. This appears between the
13990# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13991# from the following attributes which affect the ABI of this Python build (in
13992# this order):
13993#
13994# * The Python implementation (always 'cpython-' for us)
13995# * The major and minor version numbers
13996# * --with-pydebug (adds a 'd')
13997# * --with-pymalloc (adds a 'm')
13998# * --with-wide-unicode (adds a 'u')
13999#
14000# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014001# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14002# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014003
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14005$as_echo_n "checking ABIFLAGS... " >&6; }
14006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14007$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14009$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014010SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14012$as_echo "$SOABI" >&6; }
14013
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014014
14015case $ac_sys_system in
14016 Linux*|GNU*)
14017 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14018 *)
14019 EXT_SUFFIX=${SHLIB_SUFFIX};;
14020esac
14021
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14023$as_echo_n "checking LDVERSION... " >&6; }
14024LDVERSION='$(VERSION)$(ABIFLAGS)'
14025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14026$as_echo "$LDVERSION" >&6; }
14027
doko@python.org87421192013-01-26 11:39:31 +010014028
14029LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14030
14031
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014032# Check whether right shifting a negative integer extends the sign bit
14033# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14035$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014036if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014037 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014038else
Martin v. Löwis11437992002-04-12 09:54:03 +000014039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014041 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014042else
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014044/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014045
14046int main()
14047{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014048 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014049}
14050
Martin v. Löwis11437992002-04-12 09:54:03 +000014051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014052if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014053 ac_cv_rshift_extends_sign=yes
14054else
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14058 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014059fi
14060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014061fi
14062
Matthias Kloseb9621712010-04-24 17:59:49 +000014063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14064$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014065if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014066then
Martin v. Löwis11437992002-04-12 09:54:03 +000014067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014069
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014070fi
14071
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014072# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14074$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014075if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014077else
Martin v. Löwis11437992002-04-12 09:54:03 +000014078
Matthias Kloseb9621712010-04-24 17:59:49 +000014079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014080/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014081#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014082int
14083main ()
14084{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014085
14086 FILE *f = fopen("/dev/null", "r");
14087 flockfile(f);
14088 getc_unlocked(f);
14089 funlockfile(f);
14090
Martin v. Löwis11437992002-04-12 09:54:03 +000014091 ;
14092 return 0;
14093}
14094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014095if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014096 ac_cv_have_getc_unlocked=yes
14097else
Matthias Kloseb9621712010-04-24 17:59:49 +000014098 ac_cv_have_getc_unlocked=no
14099fi
14100rm -f core conftest.err conftest.$ac_objext \
14101 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103
Matthias Kloseb9621712010-04-24 17:59:49 +000014104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14105$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014106if test "$ac_cv_have_getc_unlocked" = yes
14107then
Martin v. Löwis11437992002-04-12 09:54:03 +000014108
Matthias Kloseb9621712010-04-24 17:59:49 +000014109$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014110
14111fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014112
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014113# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014114# save the value of LIBS so we don't actually link Python with readline
14115LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014116
Gregory P. Smith18820942008-09-07 06:24:49 +000014117# On some systems we need to link readline to a termcap compatible
14118# library. NOTE: Keep the precedence of listed libraries synchronised
14119# with setup.py.
14120py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14122$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014123for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014124 if test -z "$py_libtermcap"; then
14125 READLINE_LIBS="-lreadline"
14126 else
14127 READLINE_LIBS="-lreadline -l$py_libtermcap"
14128 fi
14129 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014131/* end confdefs.h. */
14132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133/* Override any GCC internal prototype to avoid an error.
14134 Use char because int might match the return type of a GCC
14135 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014136#ifdef __cplusplus
14137extern "C"
14138#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014139char readline ();
14140int
14141main ()
14142{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014143return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014144 ;
14145 return 0;
14146}
14147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014148if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014149 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014151rm -f core conftest.err conftest.$ac_objext \
14152 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014153 if test $py_cv_lib_readline = yes; then
14154 break
14155 fi
14156done
14157# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14158#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014159if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14161$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014162else
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14164$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014165
Matthias Kloseb9621712010-04-24 17:59:49 +000014166$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014167
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014168fi
14169
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014170# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14172$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014173if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014174 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014175else
14176 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014177LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014179/* end confdefs.h. */
14180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181/* Override any GCC internal prototype to avoid an error.
14182 Use char because int might match the return type of a GCC
14183 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014184#ifdef __cplusplus
14185extern "C"
14186#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014187char rl_callback_handler_install ();
14188int
14189main ()
14190{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014191return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014192 ;
14193 return 0;
14194}
14195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014196if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014197 ac_cv_lib_readline_rl_callback_handler_install=yes
14198else
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014201rm -f core conftest.err conftest.$ac_objext \
14202 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014203LIBS=$ac_check_lib_save_LIBS
14204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14206$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014207if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014210
14211fi
14212
14213
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014214# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014216/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014217#include <readline/readline.h>
14218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014219if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014220 have_readline=yes
14221else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014222 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014223
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014224fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014225rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014226if test $have_readline = yes
14227then
Matthias Kloseb9621712010-04-24 17:59:49 +000014228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014229/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014230#include <readline/readline.h>
14231
14232_ACEOF
14233if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014237
14238fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014239rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014240
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014242/* end confdefs.h. */
14243#include <readline/readline.h>
14244
14245_ACEOF
14246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014250
14251fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014252rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014253
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014254fi
14255
Martin v. Löwis0daad592001-09-30 21:09:59 +000014256# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14258$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014259if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014260 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014261else
Martin v. Löwis11437992002-04-12 09:54:03 +000014262 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014263LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267/* Override any GCC internal prototype to avoid an error.
14268 Use char because int might match the return type of a GCC
14269 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014270#ifdef __cplusplus
14271extern "C"
14272#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014273char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014274int
14275main ()
14276{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014278 ;
14279 return 0;
14280}
14281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014282if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014284else
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014287rm -f core conftest.err conftest.$ac_objext \
14288 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014289LIBS=$ac_check_lib_save_LIBS
14290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14292$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014293if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014294
Matthias Kloseb9621712010-04-24 17:59:49 +000014295$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014296
Martin v. Löwis0daad592001-09-30 21:09:59 +000014297fi
14298
Michael W. Hudson54241132001-12-07 15:38:26 +000014299
Thomas Wouters89d996e2007-09-08 17:39:28 +000014300# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14302$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014303if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014304 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014305else
14306 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014307LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014309/* end confdefs.h. */
14310
14311/* Override any GCC internal prototype to avoid an error.
14312 Use char because int might match the return type of a GCC
14313 builtin and then its argument prototype would still apply. */
14314#ifdef __cplusplus
14315extern "C"
14316#endif
14317char rl_completion_display_matches_hook ();
14318int
14319main ()
14320{
14321return rl_completion_display_matches_hook ();
14322 ;
14323 return 0;
14324}
14325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014326if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014327 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14328else
Matthias Kloseb9621712010-04-24 17:59:49 +000014329 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014331rm -f core conftest.err conftest.$ac_objext \
14332 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014333LIBS=$ac_check_lib_save_LIBS
14334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14336$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014337if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014338
Matthias Kloseb9621712010-04-24 17:59:49 +000014339$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014340
14341fi
14342
14343
Martin v. Löwis0daad592001-09-30 21:09:59 +000014344# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14346$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014347if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014349else
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014351LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355/* Override any GCC internal prototype to avoid an error.
14356 Use char because int might match the return type of a GCC
14357 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014358#ifdef __cplusplus
14359extern "C"
14360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014361char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014362int
14363main ()
14364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014366 ;
14367 return 0;
14368}
14369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014370if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014371 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014372else
Matthias Kloseb9621712010-04-24 17:59:49 +000014373 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014375rm -f core conftest.err conftest.$ac_objext \
14376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014377LIBS=$ac_check_lib_save_LIBS
14378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14380$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014381if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014382
Matthias Kloseb9621712010-04-24 17:59:49 +000014383$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014384
Guido van Rossum353ae582001-07-10 16:45:32 +000014385fi
14386
Jack Jansendd19cf82001-12-06 22:36:17 +000014387
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014388# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014390/* end confdefs.h. */
14391#include <readline/readline.h>
14392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014393if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014394 have_readline=yes
14395else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014396 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014397
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014398fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014399rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014400if test $have_readline = yes
14401then
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014403/* end confdefs.h. */
14404#include <readline/readline.h>
14405
14406_ACEOF
14407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014411
14412fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014413rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014414
14415fi
14416
Martin v. Löwis82bca632006-02-10 20:49:30 +000014417# End of readline checks: restore LIBS
14418LIBS=$LIBS_no_readline
14419
Matthias Kloseb9621712010-04-24 17:59:49 +000014420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14421$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014422if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014424else
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014427 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014428else
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014430/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014431
14432int main()
14433{
14434 int val1 = nice(1);
14435 if (val1 != -1 && val1 == nice(2))
14436 exit(0);
14437 exit(1);
14438}
14439
Martin v. Löwis11437992002-04-12 09:54:03 +000014440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014441if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014442 ac_cv_broken_nice=yes
14443else
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14447 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014448fi
14449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014450fi
14451
Matthias Kloseb9621712010-04-24 17:59:49 +000014452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14453$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014454if test "$ac_cv_broken_nice" = yes
14455then
Martin v. Löwis11437992002-04-12 09:54:03 +000014456
Matthias Kloseb9621712010-04-24 17:59:49 +000014457$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014458
14459fi
14460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14462$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014463if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014465else
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014467 ac_cv_broken_poll=no
14468else
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014470/* end confdefs.h. */
14471
14472#include <poll.h>
14473
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014474int main()
14475{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014476 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014477 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014478
14479 close (42);
14480
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014481 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014482 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014483 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014484 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014485 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014486 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014487 return 1;
14488}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014489
14490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014491if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014492 ac_cv_broken_poll=yes
14493else
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14497 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014500fi
14501
Matthias Kloseb9621712010-04-24 17:59:49 +000014502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14503$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014504if test "$ac_cv_broken_poll" = yes
14505then
14506
Matthias Kloseb9621712010-04-24 17:59:49 +000014507$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014508
14509fi
14510
Brett Cannon43802422005-02-10 20:48:03 +000014511# 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 +000014512# (which is not required by ISO C or UNIX spec) and/or if we support
14513# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014514ac_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 +000014515#include <$ac_cv_struct_tm>
14516
Matthias Kloseb9621712010-04-24 17:59:49 +000014517"
Victor Stinnere0be4232011-10-25 13:06:09 +020014518if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014519
14520cat >>confdefs.h <<_ACEOF
14521#define HAVE_STRUCT_TM_TM_ZONE 1
14522_ACEOF
14523
14524
14525fi
14526
14527if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14528
Matthias Kloseb9621712010-04-24 17:59:49 +000014529$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014530
14531else
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14533"
Victor Stinnere0be4232011-10-25 13:06:09 +020014534if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536else
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538fi
14539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014541#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542_ACEOF
14543
Matthias Kloseb9621712010-04-24 17:59:49 +000014544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14545$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014546if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014547 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548else
Matthias Kloseb9621712010-04-24 17:59:49 +000014549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014550/* end confdefs.h. */
14551#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552#if !HAVE_DECL_TZNAME
14553extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014554#endif
14555
14556int
14557main ()
14558{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014560 ;
14561 return 0;
14562}
14563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014564if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014565 ac_cv_var_tzname=yes
14566else
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014569rm -f core conftest.err conftest.$ac_objext \
14570 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14573$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014574 if test $ac_cv_var_tzname = yes; then
14575
Matthias Kloseb9621712010-04-24 17:59:49 +000014576$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014577
14578 fi
14579fi
14580
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014581
Martin v. Löwis1d459062005-03-14 21:23:33 +000014582# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14584$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014585if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014587else
14588
Matthias Kloseb9621712010-04-24 17:59:49 +000014589if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014590 ac_cv_working_tzset=no
14591else
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014593/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014594
14595#include <stdlib.h>
14596#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014597#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014598
14599#if HAVE_TZNAME
14600extern char *tzname[];
14601#endif
14602
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014603int main()
14604{
Brett Cannon18367812003-09-19 00:59:16 +000014605 /* Note that we need to ensure that not only does tzset(3)
14606 do 'something' with localtime, but it works as documented
14607 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014608 This includes making sure that tzname is set properly if
14609 tm->tm_zone does not exist since it is the alternative way
14610 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014611
14612 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014613 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014614 */
14615
Martin v. Löwis1d459062005-03-14 21:23:33 +000014616 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014617 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14618
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014619 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014620 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014621 if (localtime(&groundhogday)->tm_hour != 0)
14622 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014623#if HAVE_TZNAME
14624 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14625 if (strcmp(tzname[0], "UTC") ||
14626 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14627 exit(1);
14628#endif
Brett Cannon18367812003-09-19 00:59:16 +000014629
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014630 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014631 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014632 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014633 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014634#if HAVE_TZNAME
14635 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14636 exit(1);
14637#endif
Brett Cannon18367812003-09-19 00:59:16 +000014638
14639 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14640 tzset();
14641 if (localtime(&groundhogday)->tm_hour != 11)
14642 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014643#if HAVE_TZNAME
14644 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14645 exit(1);
14646#endif
14647
14648#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014649 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14650 exit(1);
14651 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14652 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014653#endif
Brett Cannon18367812003-09-19 00:59:16 +000014654
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014655 exit(0);
14656}
14657
14658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014659if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014660 ac_cv_working_tzset=yes
14661else
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14665 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014666fi
14667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668fi
14669
Matthias Kloseb9621712010-04-24 17:59:49 +000014670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14671$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014672if test "$ac_cv_working_tzset" = yes
14673then
14674
Matthias Kloseb9621712010-04-24 17:59:49 +000014675$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014676
14677fi
14678
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014679# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14681$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014682if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014684else
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014686/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014687#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014688int
14689main ()
14690{
14691
14692struct stat st;
14693st.st_mtim.tv_nsec = 1;
14694
14695 ;
14696 return 0;
14697}
14698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014699if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014700 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014701else
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14705fi
14706
Matthias Kloseb9621712010-04-24 17:59:49 +000014707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14708$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014709if test "$ac_cv_stat_tv_nsec" = yes
14710then
14711
Matthias Kloseb9621712010-04-24 17:59:49 +000014712$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014713
14714fi
14715
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014716# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14718$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014719if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014721else
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014723/* end confdefs.h. */
14724#include <sys/stat.h>
14725int
14726main ()
14727{
14728
14729struct stat st;
14730st.st_mtimespec.tv_nsec = 1;
14731
14732 ;
14733 return 0;
14734}
14735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014736if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014737 ac_cv_stat_tv_nsec2=yes
14738else
Matthias Kloseb9621712010-04-24 17:59:49 +000014739 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14742fi
14743
Matthias Kloseb9621712010-04-24 17:59:49 +000014744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14745$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014746if test "$ac_cv_stat_tv_nsec2" = yes
14747then
14748
Matthias Kloseb9621712010-04-24 17:59:49 +000014749$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014750
14751fi
14752
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014753# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014754ac_save_cppflags="$CPPFLAGS"
14755CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014756
14757for ac_header in curses.h ncurses.h
14758do :
14759 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14760ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14761if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14762 cat >>confdefs.h <<_ACEOF
14763#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14764_ACEOF
14765
14766fi
14767
14768done
14769
14770
14771# On Solaris, term.h requires curses.h
14772for ac_header in term.h
14773do :
14774 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14775#ifdef HAVE_CURSES_H
14776#include <curses.h>
14777#endif
14778
14779"
14780if test "x$ac_cv_header_term_h" = xyes; then :
14781 cat >>confdefs.h <<_ACEOF
14782#define HAVE_TERM_H 1
14783_ACEOF
14784
14785fi
14786
14787done
14788
14789
Jack Jansen666b1e72001-10-31 12:11:48 +000014790# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14792$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014793if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014795else
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014797/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014798#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014799int
14800main ()
14801{
Jack Jansen666b1e72001-10-31 12:11:48 +000014802
14803 int rtn;
14804 rtn = mvwdelch(0,0,0);
14805
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 ;
14807 return 0;
14808}
14809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014810if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014811 ac_cv_mvwdelch_is_expression=yes
14812else
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14816fi
14817
Matthias Kloseb9621712010-04-24 17:59:49 +000014818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14819$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014820
14821if test "$ac_cv_mvwdelch_is_expression" = yes
14822then
Martin v. Löwis11437992002-04-12 09:54:03 +000014823
Matthias Kloseb9621712010-04-24 17:59:49 +000014824$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014825
14826fi
14827
Matthias Kloseb9621712010-04-24 17:59:49 +000014828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14829$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014830if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014832else
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014834/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014835#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014836int
14837main ()
14838{
Jack Jansen666b1e72001-10-31 12:11:48 +000014839
14840 WINDOW *w;
14841 w->_flags = 0;
14842
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 ;
14844 return 0;
14845}
14846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014847if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014848 ac_cv_window_has_flags=yes
14849else
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14853fi
14854
Matthias Kloseb9621712010-04-24 17:59:49 +000014855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14856$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014857
Jack Jansen666b1e72001-10-31 12:11:48 +000014858
14859if test "$ac_cv_window_has_flags" = yes
14860then
Martin v. Löwis11437992002-04-12 09:54:03 +000014861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014863
14864fi
14865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14867$as_echo_n "checking for is_term_resized... " >&6; }
14868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014869/* end confdefs.h. */
14870#include <curses.h>
14871int
14872main ()
14873{
14874void *x=is_term_resized
14875 ;
14876 return 0;
14877}
14878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014879if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014880
Matthias Kloseb9621712010-04-24 17:59:49 +000014881$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014882
Matthias Kloseb159a552010-04-25 21:00:44 +000014883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014884$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014885else
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14887$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014888
14889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14891
Matthias Kloseb9621712010-04-24 17:59:49 +000014892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14893$as_echo_n "checking for resize_term... " >&6; }
14894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014895/* end confdefs.h. */
14896#include <curses.h>
14897int
14898main ()
14899{
14900void *x=resize_term
14901 ;
14902 return 0;
14903}
14904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014905if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014906
Matthias Kloseb9621712010-04-24 17:59:49 +000014907$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014908
Matthias Kloseb159a552010-04-25 21:00:44 +000014909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014910$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014911else
Matthias Kloseb9621712010-04-24 17:59:49 +000014912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14913$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014914
14915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14917
Matthias Kloseb9621712010-04-24 17:59:49 +000014918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14919$as_echo_n "checking for resizeterm... " >&6; }
14920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014921/* end confdefs.h. */
14922#include <curses.h>
14923int
14924main ()
14925{
14926void *x=resizeterm
14927 ;
14928 return 0;
14929}
14930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014931if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014932
Matthias Kloseb9621712010-04-24 17:59:49 +000014933$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014934
Matthias Kloseb159a552010-04-25 21:00:44 +000014935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014936$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014937else
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14939$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014940
14941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014943# last curses configure check
14944CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14947$as_echo "$as_me: checking for device files" >&6;}
14948
14949if test "x$cross_compiling" = xyes; then
14950 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14952$as_echo_n "checking for /dev/ptmx... " >&6; }
14953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14954$as_echo "not set" >&6; }
14955 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14956 fi
14957 if test "${ac_cv_file__dev_ptc+set}" != set; then
14958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14959$as_echo_n "checking for /dev/ptc... " >&6; }
14960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14961$as_echo "not set" >&6; }
14962 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14963 fi
14964fi
14965
Matthias Kloseb9621712010-04-24 17:59:49 +000014966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14967$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014968if ${ac_cv_file__dev_ptmx+:} false; then :
14969 $as_echo_n "(cached) " >&6
14970else
14971 test "$cross_compiling" = yes &&
14972 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14973if test -r "/dev/ptmx"; then
14974 ac_cv_file__dev_ptmx=yes
14975else
14976 ac_cv_file__dev_ptmx=no
14977fi
14978fi
14979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14980$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14981if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014982
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014983fi
14984
14985if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014988
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14991$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014992if ${ac_cv_file__dev_ptc+:} false; then :
14993 $as_echo_n "(cached) " >&6
14994else
14995 test "$cross_compiling" = yes &&
14996 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14997if test -r "/dev/ptc"; then
14998 ac_cv_file__dev_ptc=yes
14999else
15000 ac_cv_file__dev_ptc=no
15001fi
15002fi
15003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15004$as_echo "$ac_cv_file__dev_ptc" >&6; }
15005if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015006
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015007fi
15008
15009if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015010
Matthias Kloseb9621712010-04-24 17:59:49 +000015011$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015012
Neal Norwitz865400f2003-03-21 01:42:58 +000015013fi
15014
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015015if test "$have_long_long" = yes
15016then
Matthias Kloseb9621712010-04-24 17:59:49 +000015017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15018$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015019 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015020 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015021else
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015023 ac_cv_have_long_long_format="cross -- assuming no"
15024 if test x$GCC = xyes; then
15025 save_CFLAGS=$CFLAGS
15026 CFLAGS="$CFLAGS -Werror -Wformat"
15027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15028/* end confdefs.h. */
15029
15030 #include <stdio.h>
15031 #include <stddef.h>
15032
15033int
15034main ()
15035{
15036
15037 char *buffer;
15038 sprintf(buffer, "%lld", (long long)123);
15039 sprintf(buffer, "%lld", (long long)-123);
15040 sprintf(buffer, "%llu", (unsigned long long)123);
15041
15042 ;
15043 return 0;
15044}
15045_ACEOF
15046if ac_fn_c_try_compile "$LINENO"; then :
15047 ac_cv_have_long_long_format=yes
15048
15049fi
15050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15051 CFLAGS=$save_CFLAGS
15052 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015053else
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015055/* end confdefs.h. */
15056
15057 #include <stdio.h>
15058 #include <stddef.h>
15059 #include <string.h>
15060
15061 #ifdef HAVE_SYS_TYPES_H
15062 #include <sys/types.h>
15063 #endif
15064
15065 int main()
15066 {
15067 char buffer[256];
15068
15069 if (sprintf(buffer, "%lld", (long long)123) < 0)
15070 return 1;
15071 if (strcmp(buffer, "123"))
15072 return 1;
15073
15074 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15075 return 1;
15076 if (strcmp(buffer, "-123"))
15077 return 1;
15078
15079 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15080 return 1;
15081 if (strcmp(buffer, "123"))
15082 return 1;
15083
15084 return 0;
15085 }
15086
15087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015088if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015089 ac_cv_have_long_long_format=yes
15090else
Matthias Kloseb9621712010-04-24 17:59:49 +000015091 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15094 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015095fi
15096
15097
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015098fi
15099
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15101$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015102fi
15103
Mark Dickinson89d7d412009-12-31 20:50:59 +000015104if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015105then
15106
Matthias Kloseb9621712010-04-24 17:59:49 +000015107$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015108
15109fi
15110
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015111if test $ac_sys_system = Darwin
15112then
15113 LIBS="$LIBS -framework CoreFoundation"
15114fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015115
Matthias Kloseb9621712010-04-24 17:59:49 +000015116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15117$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015118if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015120else
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015122 ac_cv_have_size_t_format="cross -- assuming yes"
15123
Thomas Wouters477c8d52006-05-27 19:21:47 +000015124else
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015126/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015127
Thomas Wouters477c8d52006-05-27 19:21:47 +000015128#include <stdio.h>
15129#include <stddef.h>
15130#include <string.h>
15131
Christian Heimes2c181612007-12-17 20:04:13 +000015132#ifdef HAVE_SYS_TYPES_H
15133#include <sys/types.h>
15134#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015135
15136#ifdef HAVE_SSIZE_T
15137typedef ssize_t Py_ssize_t;
15138#elif SIZEOF_VOID_P == SIZEOF_LONG
15139typedef long Py_ssize_t;
15140#else
15141typedef int Py_ssize_t;
15142#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015143
Christian Heimes2c181612007-12-17 20:04:13 +000015144int main()
15145{
15146 char buffer[256];
15147
Thomas Wouters477c8d52006-05-27 19:21:47 +000015148 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15149 return 1;
15150
Thomas Wouters89f507f2006-12-13 04:49:30 +000015151 if (strcmp(buffer, "123"))
15152 return 1;
15153
15154 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15155 return 1;
15156
15157 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015158 return 1;
15159
15160 return 0;
15161}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015162
Thomas Wouters477c8d52006-05-27 19:21:47 +000015163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015164if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015165 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015166else
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015171fi
15172
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15175$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015176if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015177
Matthias Kloseb9621712010-04-24 17:59:49 +000015178$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015179
15180fi
15181
Matthias Kloseb9621712010-04-24 17:59:49 +000015182ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015183#ifdef HAVE_SYS_TYPES_H
15184#include <sys/types.h>
15185#endif
15186#ifdef HAVE_SYS_SOCKET_H
15187#include <sys/socket.h>
15188#endif
15189
Matthias Kloseb9621712010-04-24 17:59:49 +000015190"
Victor Stinnere0be4232011-10-25 13:06:09 +020015191if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015192
Martin v. Löwis11437992002-04-12 09:54:03 +000015193else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015194
Matthias Kloseb9621712010-04-24 17:59:49 +000015195$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015196
15197fi
15198
Michael W. Hudson54241132001-12-07 15:38:26 +000015199
Matthias Kloseb9621712010-04-24 17:59:49 +000015200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15201$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015202if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015204else
Matthias Kloseb9621712010-04-24 17:59:49 +000015205 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015206 ac_cv_broken_mbstowcs=no
15207else
Matthias Kloseb9621712010-04-24 17:59:49 +000015208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015209/* end confdefs.h. */
15210
Stefan Krah19c21392012-11-22 23:47:32 +010015211#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015212#include<stdlib.h>
15213int main() {
15214 size_t len = -1;
15215 const char *str = "text";
15216 len = mbstowcs(NULL, str, 0);
15217 return (len != 4);
15218}
15219
15220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015221if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015222 ac_cv_broken_mbstowcs=no
15223else
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15227 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015228fi
15229
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015230fi
15231
Matthias Kloseb9621712010-04-24 17:59:49 +000015232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15233$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015234if test "$ac_cv_broken_mbstowcs" = yes
15235then
15236
Matthias Kloseb9621712010-04-24 17:59:49 +000015237$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015238
15239fi
15240
Antoine Pitroub52ec782009-01-25 16:34:23 +000015241# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15243$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015244
15245# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015246if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015247 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015248if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015249then
15250
Matthias Kloseb9621712010-04-24 17:59:49 +000015251$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015252
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15254$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015255fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015256if test "$withval" = no
15257then
15258
15259$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15262$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015263fi
15264
Antoine Pitrou042b1282010-08-13 21:15:58 +000015265else
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15267$as_echo "no value specified" >&6; }
15268fi
15269
Antoine Pitroub52ec782009-01-25 16:34:23 +000015270
Matthias Kloseb17289e2012-03-15 19:51:34 +010015271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15272$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15273if ${ac_cv_computed_gotos+:} false; then :
15274 $as_echo_n "(cached) " >&6
15275else
15276 if test "$cross_compiling" = yes; then :
15277 if test "${with_computed_gotos+set}" = set; then
15278 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15279 else
15280 ac_cv_computed_gotos=no
15281 fi
15282else
15283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15284/* end confdefs.h. */
15285
15286int main(int argc, char **argv)
15287{
15288 static void *targets[1] = { &&LABEL1 };
15289 goto LABEL2;
15290LABEL1:
15291 return 0;
15292LABEL2:
15293 goto *targets[0];
15294 return 1;
15295}
15296
15297_ACEOF
15298if ac_fn_c_try_run "$LINENO"; then :
15299 ac_cv_computed_gotos=yes
15300else
15301 ac_cv_computed_gotos=no
15302fi
15303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15304 conftest.$ac_objext conftest.beam conftest.$ac_ext
15305fi
15306
15307fi
15308
15309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15310$as_echo "$ac_cv_computed_gotos" >&6; }
15311case "$ac_cv_computed_gotos" in yes*)
15312
15313$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15314
15315esac
15316
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015317case $ac_sys_system in
15318AIX*)
15319
15320$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15321 ;;
15322esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015323
Michael W. Hudson54241132001-12-07 15:38:26 +000015324
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015325
15326
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015327for h in `(cd $srcdir;echo Python/thread_*.h)`
15328do
15329 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15330done
15331
Michael W. Hudson54241132001-12-07 15:38:26 +000015332
Neal Norwitzd24499d2005-12-18 21:36:39 +000015333SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15335$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015336for dir in $SRCDIRS; do
15337 if test ! -d $dir; then
15338 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015339 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015340done
Matthias Kloseb9621712010-04-24 17:59:49 +000015341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15342$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015343
Stefan Krah1919b7e2012-03-21 18:25:23 +010015344# Availability of -O2:
15345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15346$as_echo_n "checking for -O2... " >&6; }
15347saved_cflags="$CFLAGS"
15348CFLAGS="-O2"
15349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15350/* end confdefs.h. */
15351
15352int
15353main ()
15354{
15355
15356
15357 ;
15358 return 0;
15359}
15360_ACEOF
15361if ac_fn_c_try_compile "$LINENO"; then :
15362 have_O2=yes
15363else
15364 have_O2=no
15365fi
15366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15368$as_echo "$have_O2" >&6; }
15369CFLAGS="$saved_cflags"
15370
15371# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15372# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15374$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15375saved_cflags="$CFLAGS"
15376CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15377if test "$have_O2" = no; then
15378 CFLAGS=""
15379fi
15380if test "$cross_compiling" = yes; then :
15381 have_glibc_memmove_bug=undefined
15382else
15383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15384/* end confdefs.h. */
15385
15386#include <stdio.h>
15387#include <stdlib.h>
15388#include <string.h>
15389void foo(void *p, void *q) { memmove(p, q, 19); }
15390int main() {
15391 char a[32] = "123456789000000000";
15392 foo(&a[9], a);
15393 if (strcmp(a, "123456789123456789000000000") != 0)
15394 return 1;
15395 foo(a, &a[9]);
15396 if (strcmp(a, "123456789000000000") != 0)
15397 return 1;
15398 return 0;
15399}
15400
15401_ACEOF
15402if ac_fn_c_try_run "$LINENO"; then :
15403 have_glibc_memmove_bug=no
15404else
15405 have_glibc_memmove_bug=yes
15406fi
15407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15408 conftest.$ac_objext conftest.beam conftest.$ac_ext
15409fi
15410
15411CFLAGS="$saved_cflags"
15412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15413$as_echo "$have_glibc_memmove_bug" >&6; }
15414if test "$have_glibc_memmove_bug" = yes; then
15415
15416$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15417
15418fi
15419
15420if test "$have_gcc_asm_for_x87" = yes; then
15421 # Some versions of gcc miscompile inline asm:
15422 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15423 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15424 case $CC in
15425 *gcc*)
15426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15427$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15428 saved_cflags="$CFLAGS"
15429 CFLAGS="-O2"
15430 if test "$cross_compiling" = yes; then :
15431 have_ipa_pure_const_bug=undefined
15432else
15433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15434/* end confdefs.h. */
15435
15436 __attribute__((noinline)) int
15437 foo(int *p) {
15438 int r;
15439 asm ( "movl \$6, (%1)\n\t"
15440 "xorl %0, %0\n\t"
15441 : "=r" (r) : "r" (p) : "memory"
15442 );
15443 return r;
15444 }
15445 int main() {
15446 int p = 8;
15447 if ((foo(&p) ? : p) != 6)
15448 return 1;
15449 return 0;
15450 }
15451
15452_ACEOF
15453if ac_fn_c_try_run "$LINENO"; then :
15454 have_ipa_pure_const_bug=no
15455else
15456 have_ipa_pure_const_bug=yes
15457fi
15458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15459 conftest.$ac_objext conftest.beam conftest.$ac_ext
15460fi
15461
15462 CFLAGS="$saved_cflags"
15463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15464$as_echo "$have_ipa_pure_const_bug" >&6; }
15465 if test "$have_ipa_pure_const_bug" = yes; then
15466
15467$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15468
15469 fi
15470 ;;
15471 esac
15472fi
15473
Ned Deily322f5ba2013-11-21 23:01:59 -080015474# ensurepip option
15475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15476$as_echo_n "checking for ensurepip... " >&6; }
15477
15478# Check whether --with-ensurepip was given.
15479if test "${with_ensurepip+set}" = set; then :
15480 withval=$with_ensurepip;
15481else
15482 with_ensurepip=upgrade
15483fi
15484
15485case $with_ensurepip in #(
15486 yes|upgrade) :
15487 ENSUREPIP=upgrade ;; #(
15488 install) :
15489 ENSUREPIP=install ;; #(
15490 no) :
15491 ENSUREPIP=no ;; #(
15492 *) :
15493 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15494esac
15495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15496$as_echo "$ENSUREPIP" >&6; }
15497
15498
Guido van Rossum627b2d71993-12-24 10:39:16 +000015499# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015500ac_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 +000015501
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015502ac_config_files="$ac_config_files Modules/ld_so_aix"
15503
Martin v. Löwis11437992002-04-12 09:54:03 +000015504cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015505# This file is a shell script that caches the results of configure
15506# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015507# scripts and configure runs, see configure's option --config-cache.
15508# It is not useful on other systems. If it contains results you don't
15509# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015510#
Martin v. Löwis11437992002-04-12 09:54:03 +000015511# config.status only pays attention to the cache file if you give it
15512# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015513#
Skip Montanaro6dead952003-09-25 14:50:04 +000015514# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015515# loading this file, other *unset* `ac_cv_foo' will be assigned the
15516# following values.
15517
15518_ACEOF
15519
Guido van Rossumf78abae1997-01-21 22:02:36 +000015520# The following way of writing the cache mishandles newlines in values,
15521# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015523# Ultrix sh set writes to stderr and can't be redirected directly,
15524# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015525(
15526 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15527 eval ac_val=\$$ac_var
15528 case $ac_val in #(
15529 *${as_nl}*)
15530 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015531 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15532$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533 esac
15534 case $ac_var in #(
15535 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015536 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15537 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538 esac ;;
15539 esac
15540 done
15541
Martin v. Löwis11437992002-04-12 09:54:03 +000015542 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015543 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15544 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 # `set' does not quote correctly, so add quotes: double-quote
15546 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015547 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015548 "s/'/'\\\\''/g;
15549 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015550 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 *)
15552 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015553 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555 esac |
15556 sort
15557) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015558 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015559 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15563 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015564 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15565 :end' >>confcache
15566if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15567 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015568 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015569 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15570$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015571 if test ! -f "$cache_file" || test -h "$cache_file"; then
15572 cat confcache >"$cache_file"
15573 else
15574 case $cache_file in #(
15575 */* | ?:*)
15576 mv -f confcache "$cache_file"$$ &&
15577 mv -f "$cache_file"$$ "$cache_file" ;; #(
15578 *)
15579 mv -f confcache "$cache_file" ;;
15580 esac
15581 fi
15582 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015583 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015584 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15585$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015586 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015587fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015588rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015589
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015590test "x$prefix" = xNONE && prefix=$ac_default_prefix
15591# Let make expand exec_prefix.
15592test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015593
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015594DEFS=-DHAVE_CONFIG_H
15595
Skip Montanaro6dead952003-09-25 14:50:04 +000015596ac_libobjs=
15597ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015598U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015599for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15600 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015601 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015602 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015603 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15604 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15606 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015607done
15608LIBOBJS=$ac_libobjs
15609
15610LTLIBOBJS=$ac_ltlibobjs
15611
15612
Martin v. Löwis11437992002-04-12 09:54:03 +000015613
Matthias Kloseb9621712010-04-24 17:59:49 +000015614
Victor Stinnere0be4232011-10-25 13:06:09 +020015615: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015616ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015617ac_clean_files_save=$ac_clean_files
15618ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015619{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15620$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15621as_write_fail=0
15622cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015623#! $SHELL
15624# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015625# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015626# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015627# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015630ac_cs_recheck=false
15631ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015632
Matthias Kloseb9621712010-04-24 17:59:49 +000015633SHELL=\${CONFIG_SHELL-$SHELL}
15634export SHELL
15635_ASEOF
15636cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15637## -------------------- ##
15638## M4sh Initialization. ##
15639## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015641# Be more Bourne compatible
15642DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015643if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015644 emulate sh
15645 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015646 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015647 # is contrary to our usage. Disable this feature.
15648 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015649 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015650else
Matthias Kloseb9621712010-04-24 17:59:49 +000015651 case `(set -o) 2>/dev/null` in #(
15652 *posix*) :
15653 set -o posix ;; #(
15654 *) :
15655 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015656esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015657fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015658
15659
Matthias Kloseb9621712010-04-24 17:59:49 +000015660as_nl='
15661'
15662export as_nl
15663# Printing a long string crashes Solaris 7 /usr/bin/printf.
15664as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15665as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15666as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15667# Prefer a ksh shell builtin over an external printf program on Solaris,
15668# but without wasting forks for bash or zsh.
15669if test -z "$BASH_VERSION$ZSH_VERSION" \
15670 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15671 as_echo='print -r --'
15672 as_echo_n='print -rn --'
15673elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15674 as_echo='printf %s\n'
15675 as_echo_n='printf %s'
15676else
15677 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15678 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15679 as_echo_n='/usr/ucb/echo -n'
15680 else
15681 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15682 as_echo_n_body='eval
15683 arg=$1;
15684 case $arg in #(
15685 *"$as_nl"*)
15686 expr "X$arg" : "X\\(.*\\)$as_nl";
15687 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15688 esac;
15689 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15690 '
15691 export as_echo_n_body
15692 as_echo_n='sh -c $as_echo_n_body as_echo'
15693 fi
15694 export as_echo_body
15695 as_echo='sh -c $as_echo_body as_echo'
15696fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015697
15698# The user is always right.
15699if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 PATH_SEPARATOR=:
15701 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15702 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15703 PATH_SEPARATOR=';'
15704 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015705fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015707
15708# IFS
15709# We need space, tab and new line, in precisely that order. Quoting is
15710# there to prevent editors from complaining about space-tab.
15711# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15712# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713IFS=" "" $as_nl"
15714
15715# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015716as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015717case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015718 *[\\/]* ) as_myself=$0 ;;
15719 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015720for as_dir in $PATH
15721do
15722 IFS=$as_save_IFS
15723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15725 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015728 ;;
15729esac
15730# We did not find ourselves, most probably we were run as `sh COMMAND'
15731# in which case we are not to be found in the path.
15732if test "x$as_myself" = x; then
15733 as_myself=$0
15734fi
15735if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015736 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15737 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738fi
15739
Matthias Kloseb9621712010-04-24 17:59:49 +000015740# Unset variables that we do not need and which cause bugs (e.g. in
15741# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15742# suppresses any "Segmentation fault" message there. '((' could
15743# trigger a bug in pdksh 5.2.14.
15744for as_var in BASH_ENV ENV MAIL MAILPATH
15745do eval test x\${$as_var+set} = xset \
15746 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015747done
15748PS1='$ '
15749PS2='> '
15750PS4='+ '
15751
15752# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015753LC_ALL=C
15754export LC_ALL
15755LANGUAGE=C
15756export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757
Matthias Kloseb9621712010-04-24 17:59:49 +000015758# CDPATH.
15759(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15760
15761
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015762# as_fn_error STATUS ERROR [LINENO LOG_FD]
15763# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015764# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15765# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015766# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015767as_fn_error ()
15768{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015769 as_status=$1; test $as_status -eq 0 && as_status=1
15770 if test "$4"; then
15771 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15772 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015773 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015774 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015775 as_fn_exit $as_status
15776} # as_fn_error
15777
15778
15779# as_fn_set_status STATUS
15780# -----------------------
15781# Set $? to STATUS, without forking.
15782as_fn_set_status ()
15783{
15784 return $1
15785} # as_fn_set_status
15786
15787# as_fn_exit STATUS
15788# -----------------
15789# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15790as_fn_exit ()
15791{
15792 set +e
15793 as_fn_set_status $1
15794 exit $1
15795} # as_fn_exit
15796
15797# as_fn_unset VAR
15798# ---------------
15799# Portably unset VAR.
15800as_fn_unset ()
15801{
15802 { eval $1=; unset $1;}
15803}
15804as_unset=as_fn_unset
15805# as_fn_append VAR VALUE
15806# ----------------------
15807# Append the text in VALUE to the end of the definition contained in VAR. Take
15808# advantage of any shell optimizations that allow amortized linear growth over
15809# repeated appends, instead of the typical quadratic growth present in naive
15810# implementations.
15811if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15812 eval 'as_fn_append ()
15813 {
15814 eval $1+=\$2
15815 }'
15816else
15817 as_fn_append ()
15818 {
15819 eval $1=\$$1\$2
15820 }
15821fi # as_fn_append
15822
15823# as_fn_arith ARG...
15824# ------------------
15825# Perform arithmetic evaluation on the ARGs, and store the result in the
15826# global $as_val. Take advantage of shells that can avoid forks. The arguments
15827# must be portable across $(()) and expr.
15828if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15829 eval 'as_fn_arith ()
15830 {
15831 as_val=$(( $* ))
15832 }'
15833else
15834 as_fn_arith ()
15835 {
15836 as_val=`expr "$@" || test $? -eq 1`
15837 }
15838fi # as_fn_arith
15839
15840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015841if expr a : '\(a\)' >/dev/null 2>&1 &&
15842 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15843 as_expr=expr
15844else
15845 as_expr=false
15846fi
15847
15848if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15849 as_basename=basename
15850else
15851 as_basename=false
15852fi
15853
Matthias Kloseb9621712010-04-24 17:59:49 +000015854if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15855 as_dirname=dirname
15856else
15857 as_dirname=false
15858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860as_me=`$as_basename -- "$0" ||
15861$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15862 X"$0" : 'X\(//\)$' \| \
15863 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015864$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015865 sed '/^.*\/\([^/][^/]*\)\/*$/{
15866 s//\1/
15867 q
15868 }
15869 /^X\/\(\/\/\)$/{
15870 s//\1/
15871 q
15872 }
15873 /^X\/\(\/\).*/{
15874 s//\1/
15875 q
15876 }
15877 s/.*/./; q'`
15878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879# Avoid depending upon Character Ranges.
15880as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15881as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15882as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15883as_cr_digits='0123456789'
15884as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015885
15886ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015887case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015888-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015889 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015890 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015891 xy) ECHO_C='\c';;
15892 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15893 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015894 esac;;
15895*)
15896 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015898
Martin v. Löwis11437992002-04-12 09:54:03 +000015899rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015900if test -d conf$$.dir; then
15901 rm -f conf$$.dir/conf$$.file
15902else
15903 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015904 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015906if (echo >conf$$.file) 2>/dev/null; then
15907 if ln -s conf$$.file conf$$ 2>/dev/null; then
15908 as_ln_s='ln -s'
15909 # ... but there are two gotchas:
15910 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15911 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015912 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015913 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015914 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015915 elif ln conf$$.file conf$$ 2>/dev/null; then
15916 as_ln_s=ln
15917 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015918 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015919 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015920else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015921 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15924rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015925
Matthias Kloseb9621712010-04-24 17:59:49 +000015926
15927# as_fn_mkdir_p
15928# -------------
15929# Create "$as_dir" as a directory, including parents if necessary.
15930as_fn_mkdir_p ()
15931{
15932
15933 case $as_dir in #(
15934 -*) as_dir=./$as_dir;;
15935 esac
15936 test -d "$as_dir" || eval $as_mkdir_p || {
15937 as_dirs=
15938 while :; do
15939 case $as_dir in #(
15940 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15941 *) as_qdir=$as_dir;;
15942 esac
15943 as_dirs="'$as_qdir' $as_dirs"
15944 as_dir=`$as_dirname -- "$as_dir" ||
15945$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15946 X"$as_dir" : 'X\(//\)[^/]' \| \
15947 X"$as_dir" : 'X\(//\)$' \| \
15948 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15949$as_echo X"$as_dir" |
15950 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15951 s//\1/
15952 q
15953 }
15954 /^X\(\/\/\)[^/].*/{
15955 s//\1/
15956 q
15957 }
15958 /^X\(\/\/\)$/{
15959 s//\1/
15960 q
15961 }
15962 /^X\(\/\).*/{
15963 s//\1/
15964 q
15965 }
15966 s/.*/./; q'`
15967 test -d "$as_dir" && break
15968 done
15969 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015970 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015971
15972
15973} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015974if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015975 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015976else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015977 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015978 as_mkdir_p=false
15979fi
15980
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015981
15982# as_fn_executable_p FILE
15983# -----------------------
15984# Test if FILE is an executable regular file.
15985as_fn_executable_p ()
15986{
15987 test -f "$1" && test -x "$1"
15988} # as_fn_executable_p
15989as_test_x='test -x'
15990as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015991
15992# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015993as_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 +000015994
15995# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015996as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015997
15998
Martin v. Löwis11437992002-04-12 09:54:03 +000015999exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016000## ----------------------------------- ##
16001## Main body of $CONFIG_STATUS script. ##
16002## ----------------------------------- ##
16003_ASEOF
16004test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016005
Matthias Kloseb9621712010-04-24 17:59:49 +000016006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16007# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016008# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016009# values after options handling.
16010ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020016011This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016012generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016013
16014 CONFIG_FILES = $CONFIG_FILES
16015 CONFIG_HEADERS = $CONFIG_HEADERS
16016 CONFIG_LINKS = $CONFIG_LINKS
16017 CONFIG_COMMANDS = $CONFIG_COMMANDS
16018 $ $0 $@
16019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020on `(hostname || uname -n) 2>/dev/null | sed 1q`
16021"
16022
Martin v. Löwis11437992002-04-12 09:54:03 +000016023_ACEOF
16024
Matthias Kloseb9621712010-04-24 17:59:49 +000016025case $ac_config_files in *"
16026"*) set x $ac_config_files; shift; ac_config_files=$*;;
16027esac
16028
16029case $ac_config_headers in *"
16030"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16031esac
16032
16033
16034cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016035# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016036config_files="$ac_config_files"
16037config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016040
Matthias Kloseb9621712010-04-24 17:59:49 +000016041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016042ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016043\`$as_me' instantiates files and other configuration actions
16044from templates according to the current configuration. Unless the files
16045and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016046
Matthias Kloseb9621712010-04-24 17:59:49 +000016047Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016048
16049 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016050 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016051 --config print configuration, then exit
16052 -q, --quiet, --silent
16053 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016054 -d, --debug don't remove temporary files
16055 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016056 --file=FILE[:TEMPLATE]
16057 instantiate the configuration file FILE
16058 --header=FILE[:TEMPLATE]
16059 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016060
16061Configuration files:
16062$config_files
16063
16064Configuration headers:
16065$config_headers
16066
Matthias Kloseb9621712010-04-24 17:59:49 +000016067Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016070cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16071ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016072ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020016073python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016074configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016075 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016076
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016077Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016078This config.status script is free software; the Free Software Foundation
16079gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016080
16081ac_pwd='$ac_pwd'
16082srcdir='$srcdir'
16083INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016084MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016085test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016086_ACEOF
16087
Matthias Kloseb9621712010-04-24 17:59:49 +000016088cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16089# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016090ac_need_defaults=:
16091while test $# != 0
16092do
16093 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016094 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016095 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16096 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016097 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016098 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016099 --*=)
16100 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16101 ac_optarg=
16102 ac_shift=:
16103 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016104 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016105 ac_option=$1
16106 ac_optarg=$2
16107 ac_shift=shift
16108 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016109 esac
16110
Skip Montanaro6dead952003-09-25 14:50:04 +000016111 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016112 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016113 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16114 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016115 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016116 $as_echo "$ac_cs_version"; exit ;;
16117 --config | --confi | --conf | --con | --co | --c )
16118 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016120 debug=: ;;
16121 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016122 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016123 case $ac_optarg in
16124 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016125 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016126 esac
16127 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016128 ac_need_defaults=false;;
16129 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016130 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016131 case $ac_optarg in
16132 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16133 esac
16134 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136 --he | --h)
16137 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016138 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016139Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016141 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16143 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16144 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016145
16146 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016147 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016148Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016149
Matthias Kloseb9621712010-04-24 17:59:49 +000016150 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016151 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016152
16153 esac
16154 shift
16155done
16156
Skip Montanaro6dead952003-09-25 14:50:04 +000016157ac_configure_extra_args=
16158
16159if $ac_cs_silent; then
16160 exec 6>/dev/null
16161 ac_configure_extra_args="$ac_configure_extra_args --silent"
16162fi
16163
16164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016165cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016166if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016167 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016168 shift
16169 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16170 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016171 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016172 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016173fi
16174
Martin v. Löwis11437992002-04-12 09:54:03 +000016175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016177exec 5>>config.log
16178{
16179 echo
16180 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16181## Running $as_me. ##
16182_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016183 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016187cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016188_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016189
Matthias Kloseb9621712010-04-24 17:59:49 +000016190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191
16192# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016193for ac_config_target in $ac_config_targets
16194do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016195 case $ac_config_target in
16196 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16197 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16198 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016199 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16200 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016201 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16202 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016203 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016204 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016205 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016206
Victor Stinnere0be4232011-10-25 13:06:09 +020016207 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 esac
16209done
16210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211
Martin v. Löwis11437992002-04-12 09:54:03 +000016212# If the user did not use the arguments to specify the items to instantiate,
16213# then the envvar interface is used. Set only those that are not.
16214# We use the long form for the default assignment because of an extremely
16215# bizarre bug on SunOS 4.1.3.
16216if $ac_need_defaults; then
16217 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16218 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16219fi
16220
Skip Montanaro6dead952003-09-25 14:50:04 +000016221# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016223# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224# Hook for its removal unless debugging.
16225# Note that there is a small window in which the directory will not be cleaned:
16226# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016227$debug ||
16228{
Victor Stinnere0be4232011-10-25 13:06:09 +020016229 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016231 : "${ac_tmp:=$tmp}"
16232 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016234 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016235}
Martin v. Löwis11437992002-04-12 09:54:03 +000016236# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016237
Martin v. Löwis11437992002-04-12 09:54:03 +000016238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016240 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016241} ||
16242{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243 tmp=./conf$$-$RANDOM
16244 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016245} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016246ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016247
Matthias Kloseb9621712010-04-24 17:59:49 +000016248# Set up the scripts for CONFIG_FILES section.
16249# No need to generate them if there are no CONFIG_FILES.
16250# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016252
Matthias Kloseb9621712010-04-24 17:59:49 +000016253
16254ac_cr=`echo X | tr X '\015'`
16255# On cygwin, bash can eat \r inside `` if the user requested igncr.
16256# But we know of no other shell where ac_cr would be empty at this
16257# point, so we can use a bashism as a fallback.
16258if test "x$ac_cr" = x; then
16259 eval ac_cr=\$\'\\r\'
16260fi
16261ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16262if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016263 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016264else
16265 ac_cs_awk_cr=$ac_cr
16266fi
16267
Victor Stinnere0be4232011-10-25 13:06:09 +020016268echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016269_ACEOF
16270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271
Matthias Kloseb9621712010-04-24 17:59:49 +000016272{
16273 echo "cat >conf$$subs.awk <<_ACEOF" &&
16274 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16275 echo "_ACEOF"
16276} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016277 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16278ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279ac_delim='%!_!# '
16280for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016281 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016282 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283
Matthias Kloseb9621712010-04-24 17:59:49 +000016284 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16285 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016286 break
16287 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016288 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289 else
16290 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292done
Matthias Kloseb9621712010-04-24 17:59:49 +000016293rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016294
Matthias Kloseb9621712010-04-24 17:59:49 +000016295cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016296cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016298sed -n '
16299h
16300s/^/S["/; s/!.*/"]=/
16301p
16302g
16303s/^[^!]*!//
16304:repl
16305t repl
16306s/'"$ac_delim"'$//
16307t delim
16308:nl
16309h
16310s/\(.\{148\}\)..*/\1/
16311t more1
16312s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16313p
16314n
16315b repl
16316:more1
16317s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16318p
16319g
16320s/.\{148\}//
16321t nl
16322:delim
16323h
16324s/\(.\{148\}\)..*/\1/
16325t more2
16326s/["\\]/\\&/g; s/^/"/; s/$/"/
16327p
16328b
16329:more2
16330s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16331p
16332g
16333s/.\{148\}//
16334t delim
16335' <conf$$subs.awk | sed '
16336/^[^""]/{
16337 N
16338 s/\n//
16339}
16340' >>$CONFIG_STATUS || ac_write_fail=1
16341rm -f conf$$subs.awk
16342cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16343_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016344cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016345 for (key in S) S_is_set[key] = 1
16346 FS = ""
16347
16348}
16349{
16350 line = $ 0
16351 nfields = split(line, field, "@")
16352 substed = 0
16353 len = length(field[1])
16354 for (i = 2; i < nfields; i++) {
16355 key = field[i]
16356 keylen = length(key)
16357 if (S_is_set[key]) {
16358 value = S[key]
16359 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16360 len += length(value) + length(field[++i])
16361 substed = 1
16362 } else
16363 len += 1 + keylen
16364 }
16365
16366 print line
16367}
16368
16369_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016371cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16372if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16373 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16374else
16375 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016376fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016377 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016378_ACEOF
16379
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016380# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16381# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016382# trailing colons and then remove the whole line if VPATH becomes empty
16383# (actually we leave an empty line to preserve line numbers).
16384if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016385 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16386h
16387s///
16388s/^/:/
16389s/[ ]*$/:/
16390s/:\$(srcdir):/:/g
16391s/:\${srcdir}:/:/g
16392s/:@srcdir@:/:/g
16393s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016394s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016395x
16396s/\(=[ ]*\).*/\1/
16397G
16398s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399s/^[^=]*=[ ]*$//
16400}'
16401fi
16402
Matthias Kloseb9621712010-04-24 17:59:49 +000016403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016404fi # test -n "$CONFIG_FILES"
16405
Matthias Kloseb9621712010-04-24 17:59:49 +000016406# Set up the scripts for CONFIG_HEADERS section.
16407# No need to generate them if there are no CONFIG_HEADERS.
16408# This happens for instance with `./config.status Makefile'.
16409if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016410cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016411BEGIN {
16412_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016413
Matthias Kloseb9621712010-04-24 17:59:49 +000016414# Transform confdefs.h into an awk script `defines.awk', embedded as
16415# here-document in config.status, that substitutes the proper values into
16416# config.h.in to produce config.h.
16417
16418# Create a delimiter string that does not exist in confdefs.h, to ease
16419# handling of long lines.
16420ac_delim='%!_!# '
16421for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016422 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16423 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016424 break
16425 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016426 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016427 else
16428 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16429 fi
16430done
16431
16432# For the awk script, D is an array of macro values keyed by name,
16433# likewise P contains macro parameters if any. Preserve backslash
16434# newline sequences.
16435
16436ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16437sed -n '
16438s/.\{148\}/&'"$ac_delim"'/g
16439t rset
16440:rset
16441s/^[ ]*#[ ]*define[ ][ ]*/ /
16442t def
16443d
16444:def
16445s/\\$//
16446t bsnl
16447s/["\\]/\\&/g
16448s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16449D["\1"]=" \3"/p
16450s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16451d
16452:bsnl
16453s/["\\]/\\&/g
16454s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16455D["\1"]=" \3\\\\\\n"\\/p
16456t cont
16457s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16458t cont
16459d
16460:cont
16461n
16462s/.\{148\}/&'"$ac_delim"'/g
16463t clear
16464:clear
16465s/\\$//
16466t bsnlc
16467s/["\\]/\\&/g; s/^/"/; s/$/"/p
16468d
16469:bsnlc
16470s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16471b cont
16472' <confdefs.h | sed '
16473s/'"$ac_delim"'/"\\\
16474"/g' >>$CONFIG_STATUS || ac_write_fail=1
16475
16476cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16477 for (key in D) D_is_set[key] = 1
16478 FS = ""
16479}
16480/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16481 line = \$ 0
16482 split(line, arg, " ")
16483 if (arg[1] == "#") {
16484 defundef = arg[2]
16485 mac1 = arg[3]
16486 } else {
16487 defundef = substr(arg[1], 2)
16488 mac1 = arg[2]
16489 }
16490 split(mac1, mac2, "(") #)
16491 macro = mac2[1]
16492 prefix = substr(line, 1, index(line, defundef) - 1)
16493 if (D_is_set[macro]) {
16494 # Preserve the white space surrounding the "#".
16495 print prefix "define", macro P[macro] D[macro]
16496 next
16497 } else {
16498 # Replace #undef with comments. This is necessary, for example,
16499 # in the case of _POSIX_SOURCE, which is predefined and required
16500 # on some systems where configure will not decide to define it.
16501 if (defundef == "undef") {
16502 print "/*", prefix defundef, macro, "*/"
16503 next
16504 }
16505 }
16506}
16507{ print }
16508_ACAWK
16509_ACEOF
16510cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016511 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016512fi # test -n "$CONFIG_HEADERS"
16513
16514
16515eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16516shift
16517for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518do
16519 case $ac_tag in
16520 :[FHLC]) ac_mode=$ac_tag; continue;;
16521 esac
16522 case $ac_mode$ac_tag in
16523 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016524 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016525 :[FH]-) ac_tag=-:-;;
16526 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16527 esac
16528 ac_save_IFS=$IFS
16529 IFS=:
16530 set x $ac_tag
16531 IFS=$ac_save_IFS
16532 shift
16533 ac_file=$1
16534 shift
16535
16536 case $ac_mode in
16537 :L) ac_source=$1;;
16538 :[FH])
16539 ac_file_inputs=
16540 for ac_f
16541 do
16542 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016543 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 *) # Look for the file first in the build tree, then in the source tree
16545 # (if the path is not absolute). The absolute path cannot be DOS-style,
16546 # because $ac_f cannot contain `:'.
16547 test -f "$ac_f" ||
16548 case $ac_f in
16549 [\\/$]*) false;;
16550 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16551 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016552 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016553 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016554 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16555 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556 done
16557
16558 # Let's still pretend it is `configure' which instantiates (i.e., don't
16559 # use $as_me), people would be surprised to read:
16560 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016561 configure_input='Generated from '`
16562 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16563 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564 if test x"$ac_file" != x-; then
16565 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016566 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16567$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016569 # Neutralize special characters interpreted by sed in replacement strings.
16570 case $configure_input in #(
16571 *\&* | *\|* | *\\* )
16572 ac_sed_conf_input=`$as_echo "$configure_input" |
16573 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16574 *) ac_sed_conf_input=$configure_input;;
16575 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016576
16577 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016578 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16579 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016580 esac
16581 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016582 esac
16583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016584 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016585$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016586 X"$ac_file" : 'X\(//\)[^/]' \| \
16587 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016589$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16591 s//\1/
16592 q
16593 }
16594 /^X\(\/\/\)[^/].*/{
16595 s//\1/
16596 q
16597 }
16598 /^X\(\/\/\)$/{
16599 s//\1/
16600 q
16601 }
16602 /^X\(\/\).*/{
16603 s//\1/
16604 q
16605 }
16606 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016607 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016608 ac_builddir=.
16609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610case "$ac_dir" in
16611.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16612*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016613 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016615 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616 case $ac_top_builddir_sub in
16617 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16618 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16619 esac ;;
16620esac
16621ac_abs_top_builddir=$ac_pwd
16622ac_abs_builddir=$ac_pwd$ac_dir_suffix
16623# for backward compatibility:
16624ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016625
16626case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016628 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629 ac_top_srcdir=$ac_top_builddir_sub
16630 ac_abs_top_srcdir=$ac_pwd ;;
16631 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016632 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016633 ac_top_srcdir=$srcdir
16634 ac_abs_top_srcdir=$srcdir ;;
16635 *) # Relative name.
16636 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16637 ac_top_srcdir=$ac_top_build_prefix$srcdir
16638 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016639esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016641
Martin v. Löwis11437992002-04-12 09:54:03 +000016642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016643 case $ac_mode in
16644 :F)
16645 #
16646 # CONFIG_FILE
16647 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016648
16649 case $INSTALL in
16650 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016651 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016652 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016653 ac_MKDIR_P=$MKDIR_P
16654 case $MKDIR_P in
16655 [\\/$]* | ?:[\\/]* ) ;;
16656 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16657 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016658_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016659
Matthias Kloseb9621712010-04-24 17:59:49 +000016660cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661# If the template does not know about datarootdir, expand it.
16662# FIXME: This hack should be removed a few years after 2.60.
16663ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016664ac_sed_dataroot='
16665/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016666 p
16667 q
16668}
16669/@datadir@/p
16670/@docdir@/p
16671/@infodir@/p
16672/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016673/@mandir@/p'
16674case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016675*datarootdir*) ac_datarootdir_seen=yes;;
16676*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16678$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016681 ac_datarootdir_hack='
16682 s&@datadir@&$datadir&g
16683 s&@docdir@&$docdir&g
16684 s&@infodir@&$infodir&g
16685 s&@localedir@&$localedir&g
16686 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016687 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016688esac
16689_ACEOF
16690
16691# Neutralize VPATH when `$srcdir' = `.'.
16692# Shell code in configure.ac might set extrasub.
16693# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16695ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016696$extrasub
16697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016698cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016699:t
16700/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016701s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016703s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704s&@srcdir@&$ac_srcdir&;t t
16705s&@abs_srcdir@&$ac_abs_srcdir&;t t
16706s&@top_srcdir@&$ac_top_srcdir&;t t
16707s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16708s&@builddir@&$ac_builddir&;t t
16709s&@abs_builddir@&$ac_abs_builddir&;t t
16710s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16711s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016712s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016714"
Victor Stinnere0be4232011-10-25 13:06:09 +020016715eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16716 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016718test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016719 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16720 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16721 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016723which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016724$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016725which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016726
Victor Stinnere0be4232011-10-25 13:06:09 +020016727 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016728 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016729 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16730 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016731 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016732 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016733 ;;
16734 :H)
16735 #
16736 # CONFIG_HEADER
16737 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016738 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016739 {
16740 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016741 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16742 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016743 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016744 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016745 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16746$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016747 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016748 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016749 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016750 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016751 fi
16752 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016753 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016754 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016755 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016756 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016759
16760 esac
16761
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016762
16763 case $ac_file$ac_mode in
16764 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16765
16766 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016767done # for ac_tag
16768
Guido van Rossum627b2d71993-12-24 10:39:16 +000016769
Matthias Kloseb9621712010-04-24 17:59:49 +000016770as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016771_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016772ac_clean_files=$ac_clean_files_save
16773
Matthias Kloseb9621712010-04-24 17:59:49 +000016774test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016775 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016776
Martin v. Löwis11437992002-04-12 09:54:03 +000016777
16778# configure is writing to config.log, and then calls config.status.
16779# config.status does its own redirection, appending to config.log.
16780# Unfortunately, on DOS this fails, as config.log is still kept open
16781# by configure, so config.status won't be able to write to it; its
16782# output is simply discarded. So we exec the FD to /dev/null,
16783# effectively closing config.log, so it can be properly (re)opened and
16784# appended to by config.status. When coming back to configure, we
16785# need to make the FD available again.
16786if test "$no_create" != yes; then
16787 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016788 ac_config_status_args=
16789 test "$silent" = yes &&
16790 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016791 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016792 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016793 exec 5>>config.log
16794 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16795 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016796 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016797fi
16798if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16800$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016801fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016802
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016803
Christian Heimes75ed8902013-11-20 01:11:18 +010016804echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016805if test ! -f Modules/Setup
16806then
16807 cp $srcdir/Modules/Setup.dist Modules/Setup
16808fi
16809
Christian Heimes75ed8902013-11-20 01:11:18 +010016810echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016811if test ! -f Modules/Setup.local
16812then
16813 echo "# Edit this file for local setup changes" >Modules/Setup.local
16814fi
16815
Christian Heimes75ed8902013-11-20 01:11:18 +010016816echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016817$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16818 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016819 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016820mv config.c Modules