blob: 274af7e0443123a956e5ad1361e1e5a0bd46922f [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.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006286 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287 else
6288 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6289 fi
6290 ;;
6291 *)
6292 OPT="-O3 -Wall $STRICT_PROTO"
6293 ;;
6294 esac
6295 case $ac_sys_system in
6296 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6297 ;;
6298 esac
6299 ;;
6300
6301 *)
6302 OPT="-O"
6303 ;;
6304 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305fi
6306
6307
6308
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006309
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310# The -arch flags for universal builds on OSX
6311UNIVERSAL_ARCH_FLAGS=
6312
6313
6314# tweak BASECFLAGS based on compiler and platform
6315case $GCC in
6316yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006317 # Python doesn't violate C99 aliasing rules, but older versions of
6318 # GCC produce warnings for legal Python code. Enable
6319 # -fno-strict-aliasing on versions of GCC that support but produce
6320 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6322$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323 ac_save_cc="$CC"
6324 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006325 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006326 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006328else
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006331
Matthias Kloseb159a552010-04-25 21:00:44 +00006332
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006333int
6334main ()
6335{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006336
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006337 ;
6338 return 0;
6339}
Matthias Kloseb159a552010-04-25 21:00:44 +00006340
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006342if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006343
6344 CC="$ac_save_cc -fstrict-aliasing"
6345 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006347/* end confdefs.h. */
6348
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006349 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006350int
6351main ()
6352{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006353double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006354 ;
6355 return 0;
6356}
Matthias Kloseb159a552010-04-25 21:00:44 +00006357
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006359if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006360
6361 ac_cv_no_strict_aliasing=no
6362
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363else
Matthias Kloseb159a552010-04-25 21:00:44 +00006364
6365 ac_cv_no_strict_aliasing=yes
6366
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006367fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006369
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006370else
Matthias Kloseb159a552010-04-25 21:00:44 +00006371
6372 ac_cv_no_strict_aliasing=no
6373
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006376fi
6377
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006378 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6381$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006382 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383 then
6384 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6385 fi
6386
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6388$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6389 ac_save_cc="$CC"
6390 CC="$CC -Wunused-result -Werror"
6391 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006392 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006393 $as_echo_n "(cached) " >&6
6394else
6395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6396/* end confdefs.h. */
6397
6398
6399int
6400main ()
6401{
6402
6403 ;
6404 return 0;
6405}
6406
6407_ACEOF
6408if ac_fn_c_try_compile "$LINENO"; then :
6409
6410 ac_cv_disable_unused_result_warning=yes
6411
6412else
6413
6414 ac_cv_disable_unused_result_warning=no
6415
6416fi
6417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6418fi
6419
6420 CFLAGS="$save_CFLAGS"
6421 CC="$ac_save_cc"
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6423$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6424
6425 if test $ac_cv_disable_unused_result_warning = yes
6426 then
6427 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6428 fi
6429
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6431$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6432 ac_save_cc="$CC"
6433 CC="$CC -Werror=declaration-after-statement"
6434 save_CFLAGS="$CFLAGS"
6435 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6436 $as_echo_n "(cached) " >&6
6437else
6438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6439/* end confdefs.h. */
6440
6441
6442int
6443main ()
6444{
6445
6446 ;
6447 return 0;
6448}
6449
6450_ACEOF
6451if ac_fn_c_try_compile "$LINENO"; then :
6452
6453 ac_cv_declaration_after_statement_warning=yes
6454
6455else
6456
6457 ac_cv_declaration_after_statement_warning=no
6458
6459fi
6460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6461fi
6462
6463 CFLAGS="$save_CFLAGS"
6464 CC="$ac_save_cc"
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6466$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6467
6468 if test $ac_cv_declaration_after_statement_warning = yes
6469 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006470 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006471 fi
6472
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006473 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6474 # support. Without this, treatment of subnormals doesn't follow
6475 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006476 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006477 alpha*)
6478 BASECFLAGS="$BASECFLAGS -mieee"
6479 ;;
6480 esac
6481
6482 case $ac_sys_system in
6483 SCO_SV*)
6484 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6485 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006486
6487 # is there any other compiler on Darwin besides gcc?
6488 Darwin*)
6489 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6490 # used to be here, but non-Apple gcc doesn't accept them.
6491 if test "${CC}" = gcc
6492 then
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006494$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006495 case "${UNIVERSALSDK}" in
6496 */MacOSX10.4u.sdk)
6497 # Build using 10.4 SDK, force usage of gcc when the
6498 # compiler is gcc, otherwise the user will get very
6499 # confusing error messages when building on OSX 10.6
6500 CC=gcc-4.0
6501 CPP=cpp-4.0
6502 ;;
6503 esac
6504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006505$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006506 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006507
Ned Deily87adb6e2013-10-18 21:09:56 -07006508 if test "${enable_universalsdk}"
6509 then
6510 case "$UNIVERSAL_ARCHS" in
6511 32-bit)
6512 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6513 LIPO_32BIT_FLAGS=""
6514 ARCH_RUN_32BIT=""
6515 ;;
6516 64-bit)
6517 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6518 LIPO_32BIT_FLAGS=""
6519 ARCH_RUN_32BIT="true"
6520 ;;
6521 all)
6522 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6523 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6524 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6525 ;;
6526 intel)
6527 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6528 LIPO_32BIT_FLAGS="-extract i386"
6529 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6530 ;;
6531 intel-32)
6532 UNIVERSAL_ARCH_FLAGS="-arch i386"
6533 LIPO_32BIT_FLAGS=""
6534 ARCH_RUN_32BIT=""
6535 ;;
6536 3-way)
6537 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6538 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6539 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6540 ;;
6541 *)
6542 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6543 ;;
6544 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545
Ned Deily87adb6e2013-10-18 21:09:56 -07006546 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6547 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6548 if test "${UNIVERSALSDK}" != "/"
6549 then
6550 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6551 fi
6552 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006553
Ned Deily87adb6e2013-10-18 21:09:56 -07006554 # Calculate an appropriate deployment target for this build:
6555 # The deployment target value is used explicitly to enable certain
6556 # features are enabled (such as builtin libedit support for readline)
6557 # through the use of Apple's Availabiliy Macros and is used as a
6558 # component of the string returned by distutils.get_platform().
6559 #
6560 # Use the value from:
6561 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6562 # 2. the operating system version of the build machine if >= 10.6
6563 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6564 # below to pick either 10.3, 10.4, or 10.5 as the target.
6565 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006566
Ned Deily87adb6e2013-10-18 21:09:56 -07006567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6568$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006569 cur_target_major=`sw_vers -productVersion | \
6570 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6571 cur_target_minor=`sw_vers -productVersion | \
6572 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6573 cur_target="${cur_target_major}.${cur_target_minor}"
6574 if test ${cur_target_major} -eq 10 && \
6575 test ${cur_target_minor} -ge 3 && \
6576 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006577 then
Ned Deily36820b62014-06-25 13:44:22 -07006578 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006579 cur_target=10.3
6580 if test ${enable_universalsdk}
6581 then
6582 case "$UNIVERSAL_ARCHS" in
6583 all|3-way|intel|64-bit)
6584 # These configurations were first supported in 10.5
6585 cur_target='10.5'
6586 ;;
6587 esac
6588 else
6589 if test `/usr/bin/arch` = "i386"
6590 then
6591 # 10.4 was the first release to support Intel archs
6592 cur_target="10.4"
6593 fi
6594 fi
6595 fi
6596 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006597
Ned Deily87adb6e2013-10-18 21:09:56 -07006598 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6599 # environment with a value that is the same as what we'll use
6600 # in the Makefile to ensure that we'll get the same compiler
6601 # environment during configure and build time.
6602 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6603 export MACOSX_DEPLOYMENT_TARGET
6604 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6606$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006607
Ned Deily87adb6e2013-10-18 21:09:56 -07006608 # end of Darwin* tests
6609 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610 esac
6611 ;;
6612
6613*)
6614 case $ac_sys_system in
6615 OpenUNIX*|UnixWare*)
6616 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6617 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006618 SCO_SV*)
6619 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6620 ;;
6621 esac
6622 ;;
6623esac
6624
6625if test "$Py_DEBUG" = 'true'; then
6626 :
6627else
6628 OPT="-DNDEBUG $OPT"
6629fi
6630
6631if test "$ac_arch_flags"
6632then
6633 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6634fi
6635
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006636# On some compilers, pthreads are available without further options
6637# (e.g. MacOS X). On some of these systems, the compiler will not
6638# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6639# So we have to see first whether pthreads are available without
6640# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6642$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006643if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006644 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006645else
Matthias Kloseb9621712010-04-24 17:59:49 +00006646 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006647 ac_cv_pthread_is_default=no
6648else
Matthias Kloseb9621712010-04-24 17:59:49 +00006649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650/* end confdefs.h. */
6651
Stefan Krah7dba5942012-11-22 22:49:11 +01006652#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006653#include <pthread.h>
6654
6655void* routine(void* p){return NULL;}
6656
6657int main(){
6658 pthread_t p;
6659 if(pthread_create(&p,NULL,routine,NULL)!=0)
6660 return 1;
6661 (void)pthread_detach(p);
6662 return 0;
6663}
6664
6665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006666if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006667
6668 ac_cv_pthread_is_default=yes
6669 ac_cv_kthread=no
6670 ac_cv_pthread=no
6671
6672else
Matthias Kloseb9621712010-04-24 17:59:49 +00006673 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677fi
6678
6679
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006680fi
6681
Matthias Kloseb9621712010-04-24 17:59:49 +00006682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6683$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684
6685
6686if test $ac_cv_pthread_is_default = yes
6687then
6688 ac_cv_kpthread=no
6689else
6690# -Kpthread, if available, provides the right #defines
6691# and linker options to make pthread_create available
6692# Some compilers won't report that they do not support -Kpthread,
6693# so we need to run a program to see whether it really made the
6694# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6696$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006697if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006698 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699else
6700 ac_save_cc="$CC"
6701CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006702if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006703 ac_cv_kpthread=no
6704else
Matthias Kloseb9621712010-04-24 17:59:49 +00006705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006706/* end confdefs.h. */
6707
Stefan Krah7dba5942012-11-22 22:49:11 +01006708#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709#include <pthread.h>
6710
6711void* routine(void* p){return NULL;}
6712
6713int main(){
6714 pthread_t p;
6715 if(pthread_create(&p,NULL,routine,NULL)!=0)
6716 return 1;
6717 (void)pthread_detach(p);
6718 return 0;
6719}
6720
6721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006722if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006723 ac_cv_kpthread=yes
6724else
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729fi
6730
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731CC="$ac_save_cc"
6732fi
6733
Matthias Kloseb9621712010-04-24 17:59:49 +00006734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6735$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736fi
6737
6738if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6739then
6740# -Kthread, if available, provides the right #defines
6741# and linker options to make pthread_create available
6742# Some compilers won't report that they do not support -Kthread,
6743# so we need to run a program to see whether it really made the
6744# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6746$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006747if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006748 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749else
6750 ac_save_cc="$CC"
6751CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006752if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006753 ac_cv_kthread=no
6754else
Matthias Kloseb9621712010-04-24 17:59:49 +00006755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756/* end confdefs.h. */
6757
Stefan Krah7dba5942012-11-22 22:49:11 +01006758#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006759#include <pthread.h>
6760
6761void* routine(void* p){return NULL;}
6762
6763int main(){
6764 pthread_t p;
6765 if(pthread_create(&p,NULL,routine,NULL)!=0)
6766 return 1;
6767 (void)pthread_detach(p);
6768 return 0;
6769}
6770
6771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006772if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006773 ac_cv_kthread=yes
6774else
Matthias Kloseb9621712010-04-24 17:59:49 +00006775 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779fi
6780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781CC="$ac_save_cc"
6782fi
6783
Matthias Kloseb9621712010-04-24 17:59:49 +00006784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6785$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786fi
6787
6788if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6789then
6790# -pthread, if available, provides the right #defines
6791# and linker options to make pthread_create available
6792# Some compilers won't report that they do not support -pthread,
6793# so we need to run a program to see whether it really made the
6794# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6796$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006797if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799else
6800 ac_save_cc="$CC"
6801CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006802if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006803 ac_cv_pthread=no
6804else
Matthias Kloseb9621712010-04-24 17:59:49 +00006805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006806/* end confdefs.h. */
6807
Stefan Krah7dba5942012-11-22 22:49:11 +01006808#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006809#include <pthread.h>
6810
6811void* routine(void* p){return NULL;}
6812
6813int main(){
6814 pthread_t p;
6815 if(pthread_create(&p,NULL,routine,NULL)!=0)
6816 return 1;
6817 (void)pthread_detach(p);
6818 return 0;
6819}
6820
6821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006822if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823 ac_cv_pthread=yes
6824else
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829fi
6830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831CC="$ac_save_cc"
6832fi
6833
Matthias Kloseb9621712010-04-24 17:59:49 +00006834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6835$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836fi
6837
6838# If we have set a CC compiler flag for thread support then
6839# check if it works for CXX, too.
6840ac_cv_cxx_thread=no
6841if test ! -z "$CXX"
6842then
Matthias Kloseb9621712010-04-24 17:59:49 +00006843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6844$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845ac_save_cxx="$CXX"
6846
6847if test "$ac_cv_kpthread" = "yes"
6848then
6849 CXX="$CXX -Kpthread"
6850 ac_cv_cxx_thread=yes
6851elif test "$ac_cv_kthread" = "yes"
6852then
6853 CXX="$CXX -Kthread"
6854 ac_cv_cxx_thread=yes
6855elif test "$ac_cv_pthread" = "yes"
6856then
6857 CXX="$CXX -pthread"
6858 ac_cv_cxx_thread=yes
6859fi
6860
6861if test $ac_cv_cxx_thread = yes
6862then
6863 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6864 $CXX -c conftest.$ac_ext 2>&5
6865 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6866 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6867 then
6868 ac_cv_cxx_thread=yes
6869 else
6870 ac_cv_cxx_thread=no
6871 fi
6872 rm -fr conftest*
6873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6875$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876fi
6877CXX="$ac_save_cxx"
6878
6879
6880# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6882$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006883if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006884 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885else
Matthias Kloseb9621712010-04-24 17:59:49 +00006886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887/* end confdefs.h. */
6888#include <stdlib.h>
6889#include <stdarg.h>
6890#include <string.h>
6891#include <float.h>
6892
6893int
6894main ()
6895{
6896
6897 ;
6898 return 0;
6899}
6900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006901if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902 ac_cv_header_stdc=yes
6903else
Matthias Kloseb9621712010-04-24 17:59:49 +00006904 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6907
6908if test $ac_cv_header_stdc = yes; then
6909 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911/* end confdefs.h. */
6912#include <string.h>
6913
6914_ACEOF
6915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006916 $EGREP "memchr" >/dev/null 2>&1; then :
6917
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006918else
6919 ac_cv_header_stdc=no
6920fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006921rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922
6923fi
6924
6925if test $ac_cv_header_stdc = yes; then
6926 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928/* end confdefs.h. */
6929#include <stdlib.h>
6930
6931_ACEOF
6932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 $EGREP "free" >/dev/null 2>&1; then :
6934
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006935else
6936 ac_cv_header_stdc=no
6937fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006938rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939
6940fi
6941
6942if test $ac_cv_header_stdc = yes; then
6943 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945 :
6946else
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006948/* end confdefs.h. */
6949#include <ctype.h>
6950#include <stdlib.h>
6951#if ((' ' & 0x0FF) == 0x020)
6952# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6953# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6954#else
6955# define ISLOWER(c) \
6956 (('a' <= (c) && (c) <= 'i') \
6957 || ('j' <= (c) && (c) <= 'r') \
6958 || ('s' <= (c) && (c) <= 'z'))
6959# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6960#endif
6961
6962#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6963int
6964main ()
6965{
6966 int i;
6967 for (i = 0; i < 256; i++)
6968 if (XOR (islower (i), ISLOWER (i))
6969 || toupper (i) != TOUPPER (i))
6970 return 2;
6971 return 0;
6972}
6973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006974if ac_fn_c_try_run "$LINENO"; then :
6975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976else
Matthias Kloseb9621712010-04-24 17:59:49 +00006977 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6980 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981fi
6982
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006983fi
6984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6986$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006987if test $ac_cv_header_stdc = yes; then
6988
Matthias Kloseb9621712010-04-24 17:59:49 +00006989$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006990
6991fi
6992
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006993for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006994fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006995ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006996sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006997unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006998poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006999sys/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 +01007000sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007001sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007002sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007003sys/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 -07007004libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007005bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7006sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007007do :
7008 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7009ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007010if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007011 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007012#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007013_ACEOF
7014
7015fi
7016
Guido van Rossum627b2d71993-12-24 10:39:16 +00007017done
7018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007019ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007020for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007021 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7023$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007024if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007026else
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007028/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029#include <sys/types.h>
7030#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007031
Martin v. Löwis11437992002-04-12 09:54:03 +00007032int
7033main ()
7034{
7035if ((DIR *) 0)
7036return 0;
7037 ;
7038 return 0;
7039}
7040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007041if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007042 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007043else
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007048eval ac_res=\$$as_ac_Header
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7050$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007051if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007052 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007053#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007054_ACEOF
7055
7056ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007058
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007059done
7060# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7061if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7063$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007064if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007066else
Martin v. Löwis11437992002-04-12 09:54:03 +00007067 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007071/* Override any GCC internal prototype to avoid an error.
7072 Use char because int might match the return type of a GCC
7073 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007074#ifdef __cplusplus
7075extern "C"
7076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007077char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007078int
7079main ()
7080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007082 ;
7083 return 0;
7084}
7085_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086for ac_lib in '' dir; do
7087 if test -z "$ac_lib"; then
7088 ac_res="none required"
7089 else
7090 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007091 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007093 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007096rm -f core conftest.err conftest.$ac_objext \
7097 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007098 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101done
Victor Stinnere0be4232011-10-25 13:06:09 +02007102if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007104else
7105 ac_cv_search_opendir=no
7106fi
7107rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007108LIBS=$ac_func_search_save_LIBS
7109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7111$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007113if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007114 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007116fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007117
Michael W. Hudson54241132001-12-07 15:38:26 +00007118else
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7120$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007121if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007123else
7124 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007128/* Override any GCC internal prototype to avoid an error.
7129 Use char because int might match the return type of a GCC
7130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007131#ifdef __cplusplus
7132extern "C"
7133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007134char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007135int
7136main ()
7137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007138return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007139 ;
7140 return 0;
7141}
7142_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007143for ac_lib in '' x; do
7144 if test -z "$ac_lib"; then
7145 ac_res="none required"
7146 else
7147 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007148 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007149 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007150 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007151 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007153rm -f core conftest.err conftest.$ac_objext \
7154 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007155 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007156 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007158done
Victor Stinnere0be4232011-10-25 13:06:09 +02007159if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007161else
7162 ac_cv_search_opendir=no
7163fi
7164rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007165LIBS=$ac_func_search_save_LIBS
7166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7168$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007169ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007170if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007171 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007173fi
7174
7175fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007176
Matthias Kloseb9621712010-04-24 17:59:49 +00007177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7178$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007179if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007180 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007181else
Matthias Kloseb9621712010-04-24 17:59:49 +00007182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007183/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007184#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007185int
7186main ()
7187{
7188return makedev(0, 0);
7189 ;
7190 return 0;
7191}
7192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007193if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007194 ac_cv_header_sys_types_h_makedev=yes
7195else
Matthias Kloseb9621712010-04-24 17:59:49 +00007196 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007198rm -f core conftest.err conftest.$ac_objext \
7199 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007200
7201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7203$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007204
7205if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007206ac_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 +02007207if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007208
Matthias Kloseb9621712010-04-24 17:59:49 +00007209$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007210
7211fi
7212
7213
7214
7215 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 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 +02007217if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007218
Matthias Kloseb9621712010-04-24 17:59:49 +00007219$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007220
7221fi
7222
7223
7224 fi
7225fi
7226
Michael W. Hudson54241132001-12-07 15:38:26 +00007227
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007228# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7229for ac_header in net/if.h
7230do :
7231 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7232#ifdef STDC_HEADERS
7233# include <stdlib.h>
7234# include <stddef.h>
7235#else
7236# ifdef HAVE_STDLIB_H
7237# include <stdlib.h>
7238# endif
7239#endif
7240#ifdef HAVE_SYS_SOCKET_H
7241# include <sys/socket.h>
7242#endif
7243
7244"
Victor Stinnere0be4232011-10-25 13:06:09 +02007245if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007246 cat >>confdefs.h <<_ACEOF
7247#define HAVE_NET_IF_H 1
7248_ACEOF
7249
7250fi
7251
7252done
7253
7254
Martin v. Löwis11017b12006-01-14 18:12:57 +00007255# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007256for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007257do :
7258 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 +00007259#ifdef HAVE_ASM_TYPES_H
7260#include <asm/types.h>
7261#endif
7262#ifdef HAVE_SYS_SOCKET_H
7263#include <sys/socket.h>
7264#endif
7265
Matthias Kloseb9621712010-04-24 17:59:49 +00007266"
Victor Stinnere0be4232011-10-25 13:06:09 +02007267if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007268 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007269#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007270_ACEOF
7271
7272fi
7273
7274done
7275
7276
Charles-François Natali47413c12011-10-06 19:47:44 +02007277# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007278for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007279do :
7280 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7281ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7282#ifdef HAVE_SYS_SOCKET_H
7283#include <sys/socket.h>
7284#endif
7285
7286"
7287if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7288 cat >>confdefs.h <<_ACEOF
7289#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7290_ACEOF
7291
7292fi
7293
7294done
7295
7296
Guido van Rossum627b2d71993-12-24 10:39:16 +00007297# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007298was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7300$as_echo_n "checking for clock_t in time.h... " >&6; }
7301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007302/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007303#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007304
7305_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007306if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007307 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007308 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007309else
Martin v. Löwis11437992002-04-12 09:54:03 +00007310
7311
Matthias Kloseb9621712010-04-24 17:59:49 +00007312$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007313
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007314
Guido van Rossum627b2d71993-12-24 10:39:16 +00007315fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007316rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007317
Matthias Kloseb9621712010-04-24 17:59:49 +00007318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7319$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007320
Matthias Kloseb9621712010-04-24 17:59:49 +00007321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7322$as_echo_n "checking for makedev... " >&6; }
7323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007324/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007325
Jesus Cea740f53a2010-04-28 11:35:30 +00007326#if defined(MAJOR_IN_MKDEV)
7327#include <sys/mkdev.h>
7328#elif defined(MAJOR_IN_SYSMACROS)
7329#include <sys/sysmacros.h>
7330#else
7331#include <sys/types.h>
7332#endif
7333
Neal Norwitz11690112002-07-30 01:08:28 +00007334int
7335main ()
7336{
Jesus Cea740f53a2010-04-28 11:35:30 +00007337
7338 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007339 ;
7340 return 0;
7341}
Matthias Kloseb159a552010-04-25 21:00:44 +00007342
Neal Norwitz11690112002-07-30 01:08:28 +00007343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007344if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007345 ac_cv_has_makedev=yes
7346else
Matthias Kloseb9621712010-04-24 17:59:49 +00007347 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007349rm -f core conftest.err conftest.$ac_objext \
7350 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7352$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007353if test "$ac_cv_has_makedev" = "yes"; then
7354
Matthias Kloseb9621712010-04-24 17:59:49 +00007355$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007356
7357fi
7358
Christian Heimes985ecdc2013-11-20 11:46:18 +01007359# byte swapping
7360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7361$as_echo_n "checking for le64toh... " >&6; }
7362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7363/* end confdefs.h. */
7364
7365#ifdef HAVE_ENDIAN_H
7366#include <endian.h>
7367#elif defined(HAVE_SYS_ENDIAN_H)
7368#include <sys/endian.h>
7369#endif
7370
7371int
7372main ()
7373{
7374
7375 le64toh(1)
7376 ;
7377 return 0;
7378}
7379
7380_ACEOF
7381if ac_fn_c_try_link "$LINENO"; then :
7382 ac_cv_has_le64toh=yes
7383else
7384 ac_cv_has_le64toh=no
7385fi
7386rm -f core conftest.err conftest.$ac_objext \
7387 conftest$ac_exeext conftest.$ac_ext
7388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7389$as_echo "$ac_cv_has_le64toh" >&6; }
7390if test "$ac_cv_has_le64toh" = "yes"; then
7391
7392$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7393
7394fi
7395
Martin v. Löwis399a6892002-10-04 10:22:02 +00007396# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7397# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7398# defined, but the compiler does not support pragma redefine_extname,
7399# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7400# structures (such as rlimit64) without declaring them. As a
7401# work-around, disable LFS on such configurations
7402
7403use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7405$as_echo_n "checking Solaris LFS bug... " >&6; }
7406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007407/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007408
7409#define _LARGEFILE_SOURCE 1
7410#define _FILE_OFFSET_BITS 64
7411#include <sys/resource.h>
7412
Martin v. Löwis399a6892002-10-04 10:22:02 +00007413int
7414main ()
7415{
7416struct rlimit foo;
7417 ;
7418 return 0;
7419}
7420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007422 sol_lfs_bug=no
7423else
Matthias Kloseb9621712010-04-24 17:59:49 +00007424 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7428$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007429if test "$sol_lfs_bug" = "yes"; then
7430 use_lfs=no
7431fi
7432
7433if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007434# Two defines needed to enable largefile support on various platforms
7435# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007436case $ac_sys_system/$ac_sys_release in
7437AIX*)
7438
7439$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7440
7441 ;;
7442esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007443
Matthias Kloseb9621712010-04-24 17:59:49 +00007444$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007445
7446
Matthias Kloseb9621712010-04-24 17:59:49 +00007447$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007448
Martin v. Löwis399a6892002-10-04 10:22:02 +00007449fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007450
Guido van Rossum84e7b241996-08-19 21:59:00 +00007451# Add some code to confdefs.h so that the test for off_t works on SCO
7452cat >> confdefs.h <<\EOF
7453#if defined(SCO_DS)
7454#undef _OFF_T
7455#endif
7456EOF
7457
Guido van Rossumef2255b2000-03-10 22:30:29 +00007458# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007459ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007460if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007462else
Martin v. Löwis11437992002-04-12 09:54:03 +00007463
7464cat >>confdefs.h <<_ACEOF
7465#define mode_t int
7466_ACEOF
7467
7468fi
7469
Matthias Kloseb9621712010-04-24 17:59:49 +00007470ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007471if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007472
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007473else
Martin v. Löwis11437992002-04-12 09:54:03 +00007474
7475cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007476#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007477_ACEOF
7478
7479fi
7480
Matthias Kloseb9621712010-04-24 17:59:49 +00007481ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007482if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007483
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007484else
Martin v. Löwis11437992002-04-12 09:54:03 +00007485
7486cat >>confdefs.h <<_ACEOF
7487#define pid_t int
7488_ACEOF
7489
7490fi
7491
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007492
Martin v. Löwis11437992002-04-12 09:54:03 +00007493cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007494#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007495_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007496
Matthias Kloseb9621712010-04-24 17:59:49 +00007497ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007498if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007499
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007500else
Martin v. Löwis11437992002-04-12 09:54:03 +00007501
7502cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007503#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007504_ACEOF
7505
7506fi
7507
Matthias Kloseb9621712010-04-24 17:59:49 +00007508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7509$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007510if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007511 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007512else
Matthias Kloseb9621712010-04-24 17:59:49 +00007513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007514/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007515#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007516
7517_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007519 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007520 ac_cv_type_uid_t=yes
7521else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007522 ac_cv_type_uid_t=no
7523fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007524rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007525
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7528$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007529if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007530
Matthias Kloseb9621712010-04-24 17:59:49 +00007531$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007532
7533
Matthias Kloseb9621712010-04-24 17:59:49 +00007534$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007535
7536fi
7537
Mark Dickinson983bc162012-12-02 12:11:38 +00007538
7539# There are two separate checks for each of the exact-width integer types we
7540# need. First we check whether the type is available using the usual
7541# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7542# and <stdint.h> where available). We then also use the special type checks of
7543# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7544# directly, #define's uint32_t to be a suitable type.
7545
7546ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7547if test "x$ac_cv_type_uint32_t" = xyes; then :
7548
7549$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7550
7551fi
7552
Matthias Kloseb9621712010-04-24 17:59:49 +00007553ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7554case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007555 no|yes) ;; #(
7556 *)
7557
Matthias Kloseb9621712010-04-24 17:59:49 +00007558$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007559
7560
7561cat >>confdefs.h <<_ACEOF
7562#define uint32_t $ac_cv_c_uint32_t
7563_ACEOF
7564;;
7565 esac
7566
Mark Dickinson983bc162012-12-02 12:11:38 +00007567
7568ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7569if test "x$ac_cv_type_uint64_t" = xyes; then :
7570
7571$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7572
7573fi
7574
Matthias Kloseb9621712010-04-24 17:59:49 +00007575ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7576case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007577 no|yes) ;; #(
7578 *)
7579
Matthias Kloseb9621712010-04-24 17:59:49 +00007580$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007581
7582
7583cat >>confdefs.h <<_ACEOF
7584#define uint64_t $ac_cv_c_uint64_t
7585_ACEOF
7586;;
7587 esac
7588
Mark Dickinson983bc162012-12-02 12:11:38 +00007589
7590ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7591if test "x$ac_cv_type_int32_t" = xyes; then :
7592
7593$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7594
7595fi
7596
Matthias Kloseb9621712010-04-24 17:59:49 +00007597ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7598case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007599 no|yes) ;; #(
7600 *)
7601
7602cat >>confdefs.h <<_ACEOF
7603#define int32_t $ac_cv_c_int32_t
7604_ACEOF
7605;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007606esac
7607
Mark Dickinson983bc162012-12-02 12:11:38 +00007608
7609ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7610if test "x$ac_cv_type_int64_t" = xyes; then :
7611
7612$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7613
7614fi
7615
Matthias Kloseb9621712010-04-24 17:59:49 +00007616ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7617case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007618 no|yes) ;; #(
7619 *)
7620
7621cat >>confdefs.h <<_ACEOF
7622#define int64_t $ac_cv_c_int64_t
7623_ACEOF
7624;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007625esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007626
Mark Dickinson983bc162012-12-02 12:11:38 +00007627
Matthias Kloseb9621712010-04-24 17:59:49 +00007628ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007629if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007630
Matthias Kloseb9621712010-04-24 17:59:49 +00007631$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007632
7633fi
7634
Stefan Krah1919b7e2012-03-21 18:25:23 +01007635ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7636if test "x$ac_cv_type___uint128_t" = xyes; then :
7637
7638$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7639
7640fi
7641
Jack Jansendd19cf82001-12-06 22:36:17 +00007642
Michael W. Hudson54241132001-12-07 15:38:26 +00007643# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007644# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645# The cast to long int works around a bug in the HP C Compiler
7646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7650$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007651if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007653else
Matthias Kloseb9621712010-04-24 17:59:49 +00007654 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 +00007655
Martin v. Löwis11437992002-04-12 09:54:03 +00007656else
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 if test "$ac_cv_type_int" = yes; then
7658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007660as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007661See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662 else
7663 ac_cv_sizeof_int=0
7664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007666
Martin v. Löwis11437992002-04-12 09:54:03 +00007667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7669$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670
7671
7672
Martin v. Löwis11437992002-04-12 09:54:03 +00007673cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007674#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007675_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007676
7677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678# The cast to long int works around a bug in the HP C Compiler
7679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7683$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007684if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007686else
Matthias Kloseb9621712010-04-24 17:59:49 +00007687 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 +00007688
Martin v. Löwis11437992002-04-12 09:54:03 +00007689else
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 if test "$ac_cv_type_long" = yes; then
7691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007693as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007694See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695 else
7696 ac_cv_sizeof_long=0
7697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007699
Martin v. Löwis11437992002-04-12 09:54:03 +00007700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7702$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703
7704
7705
Martin v. Löwis11437992002-04-12 09:54:03 +00007706cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007707#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007708_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007709
7710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711# The cast to long int works around a bug in the HP C Compiler
7712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7714# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7716$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007717if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007719else
Matthias Kloseb9621712010-04-24 17:59:49 +00007720 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 +00007721
Martin v. Löwis11437992002-04-12 09:54:03 +00007722else
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 if test "$ac_cv_type_void_p" = yes; then
7724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007726as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007727See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728 else
7729 ac_cv_sizeof_void_p=0
7730 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007732
Martin v. Löwis11437992002-04-12 09:54:03 +00007733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7735$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736
7737
7738
Martin v. Löwis11437992002-04-12 09:54:03 +00007739cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007740#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007741_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007742
7743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744# The cast to long int works around a bug in the HP C Compiler
7745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7747# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7749$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007750if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007752else
Matthias Kloseb9621712010-04-24 17:59:49 +00007753 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 +00007754
Martin v. Löwis11437992002-04-12 09:54:03 +00007755else
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 if test "$ac_cv_type_short" = yes; then
7757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007759as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007760See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761 else
7762 ac_cv_sizeof_short=0
7763 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007765
Martin v. Löwis11437992002-04-12 09:54:03 +00007766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7768$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769
7770
7771
Martin v. Löwis11437992002-04-12 09:54:03 +00007772cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007773#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007774_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007775
7776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777# The cast to long int works around a bug in the HP C Compiler
7778# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7779# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7780# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7782$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007783if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007784 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007785else
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 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 +00007787
Martin v. Löwis11437992002-04-12 09:54:03 +00007788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 if test "$ac_cv_type_float" = yes; then
7790 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007792as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007793See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794 else
7795 ac_cv_sizeof_float=0
7796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007798
Martin v. Löwis11437992002-04-12 09:54:03 +00007799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7801$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802
7803
7804
Martin v. Löwis11437992002-04-12 09:54:03 +00007805cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007806#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007807_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007808
7809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810# The cast to long int works around a bug in the HP C Compiler
7811# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7812# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7813# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7815$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007816if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007818else
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 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 +00007820
Martin v. Löwis11437992002-04-12 09:54:03 +00007821else
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 if test "$ac_cv_type_double" = yes; then
7823 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007825as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007826See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827 else
7828 ac_cv_sizeof_double=0
7829 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7834$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835
7836
7837
Martin v. Löwis11437992002-04-12 09:54:03 +00007838cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007839#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007840_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007841
7842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843# The cast to long int works around a bug in the HP C Compiler
7844# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7845# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7846# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7848$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007849if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007851else
Matthias Kloseb9621712010-04-24 17:59:49 +00007852 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 +00007853
Martin v. Löwis11437992002-04-12 09:54:03 +00007854else
Matthias Kloseb9621712010-04-24 17:59:49 +00007855 if test "$ac_cv_type_fpos_t" = yes; then
7856 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007858as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007859See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860 else
7861 ac_cv_sizeof_fpos_t=0
7862 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007864
Martin v. Löwis11437992002-04-12 09:54:03 +00007865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7867$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868
7869
7870
Martin v. Löwis11437992002-04-12 09:54:03 +00007871cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007872#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007873_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007874
Michael W. Hudson54241132001-12-07 15:38:26 +00007875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876# The cast to long int works around a bug in the HP C Compiler
7877# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7878# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7879# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7881$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007882if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007884else
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 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 +00007886
Martin v. Löwis18e16552006-02-15 17:27:45 +00007887else
Matthias Kloseb9621712010-04-24 17:59:49 +00007888 if test "$ac_cv_type_size_t" = yes; then
7889 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7890$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007891as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007892See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893 else
7894 ac_cv_sizeof_size_t=0
7895 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897
Martin v. Löwis18e16552006-02-15 17:27:45 +00007898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7900$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901
7902
7903
Martin v. Löwis18e16552006-02-15 17:27:45 +00007904cat >>confdefs.h <<_ACEOF
7905#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7906_ACEOF
7907
7908
Christian Heimes400adb02008-02-01 08:12:03 +00007909# The cast to long int works around a bug in the HP C Compiler
7910# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7911# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7912# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7914$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007915if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007916 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007917else
Matthias Kloseb9621712010-04-24 17:59:49 +00007918 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 +00007919
Christian Heimes400adb02008-02-01 08:12:03 +00007920else
Matthias Kloseb9621712010-04-24 17:59:49 +00007921 if test "$ac_cv_type_pid_t" = yes; then
7922 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007924as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007925See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007926 else
7927 ac_cv_sizeof_pid_t=0
7928 fi
7929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007930
Christian Heimes400adb02008-02-01 08:12:03 +00007931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7933$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007934
7935
7936
7937cat >>confdefs.h <<_ACEOF
7938#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7939_ACEOF
7940
7941
Michael W. Hudson54241132001-12-07 15:38:26 +00007942
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7944$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007945have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007947/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007948
Martin v. Löwis11437992002-04-12 09:54:03 +00007949int
7950main ()
7951{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007952long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007953 ;
7954 return 0;
7955}
7956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007957if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007958
7959
Matthias Kloseb9621712010-04-24 17:59:49 +00007960$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007961
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007962 have_long_long=yes
7963
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7967$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007968if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969# The cast to long int works around a bug in the HP C Compiler
7970# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7971# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7972# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7974$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007975if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007977else
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 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 +00007979
Martin v. Löwis11437992002-04-12 09:54:03 +00007980else
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 if test "$ac_cv_type_long_long" = yes; then
7982 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007984as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007985See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986 else
7987 ac_cv_sizeof_long_long=0
7988 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007990
Martin v. Löwis11437992002-04-12 09:54:03 +00007991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7993$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994
7995
7996
Martin v. Löwis11437992002-04-12 09:54:03 +00007997cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007998#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007999_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008000
Michael W. Hudson54241132001-12-07 15:38:26 +00008001
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008002fi
8003
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8005$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008006have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008008/* end confdefs.h. */
8009
8010int
8011main ()
8012{
8013long double x; x = (long double)0;
8014 ;
8015 return 0;
8016}
8017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008018if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008019
8020
Matthias Kloseb9621712010-04-24 17:59:49 +00008021$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008022
8023 have_long_double=yes
8024
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008025fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8028$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008029if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008030# The cast to long int works around a bug in the HP C Compiler
8031# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8032# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8033# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8035$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008036if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008038else
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 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 +00008040
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008041else
Matthias Kloseb9621712010-04-24 17:59:49 +00008042 if test "$ac_cv_type_long_double" = yes; then
8043 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008045as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008046See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008047 else
8048 ac_cv_sizeof_long_double=0
8049 fi
8050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008051
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8054$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008055
8056
8057
8058cat >>confdefs.h <<_ACEOF
8059#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8060_ACEOF
8061
8062
8063fi
8064
8065
Matthias Kloseb9621712010-04-24 17:59:49 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8067$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008068have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008070/* end confdefs.h. */
8071
8072int
8073main ()
8074{
8075_Bool x; x = (_Bool)0;
8076 ;
8077 return 0;
8078}
8079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008080if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008081
8082
Matthias Kloseb9621712010-04-24 17:59:49 +00008083$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008084
8085 have_c99_bool=yes
8086
Thomas Woutersb2137042007-02-01 18:02:27 +00008087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8090$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008091if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092# The cast to long int works around a bug in the HP C Compiler
8093# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8094# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8095# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8097$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008098if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008100else
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 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 +00008102
Thomas Woutersb2137042007-02-01 18:02:27 +00008103else
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 if test "$ac_cv_type__Bool" = yes; then
8105 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8106$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008107as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008108See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109 else
8110 ac_cv_sizeof__Bool=0
8111 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008113
Thomas Woutersb2137042007-02-01 18:02:27 +00008114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8116$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008117
8118
8119
Thomas Woutersb2137042007-02-01 18:02:27 +00008120cat >>confdefs.h <<_ACEOF
8121#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8122_ACEOF
8123
8124
8125fi
8126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008128 #include <stdint.h>
8129 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008130 #ifdef HAVE_INTTYPES_H
8131 #include <inttypes.h>
8132 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008133"
Victor Stinnere0be4232011-10-25 13:06:09 +02008134if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008135
8136cat >>confdefs.h <<_ACEOF
8137#define HAVE_UINTPTR_T 1
8138_ACEOF
8139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140# The cast to long int works around a bug in the HP C Compiler
8141# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8142# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8143# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8145$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008146if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008147 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008148else
Matthias Kloseb9621712010-04-24 17:59:49 +00008149 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 +00008150
Martin v. Löwis11437992002-04-12 09:54:03 +00008151else
Matthias Kloseb9621712010-04-24 17:59:49 +00008152 if test "$ac_cv_type_uintptr_t" = yes; then
8153 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008155as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008156See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157 else
8158 ac_cv_sizeof_uintptr_t=0
8159 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008161
Martin v. Löwis11437992002-04-12 09:54:03 +00008162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8164$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165
8166
8167
Martin v. Löwis11437992002-04-12 09:54:03 +00008168cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008169#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008170_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008171
Michael W. Hudson54241132001-12-07 15:38:26 +00008172
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008173fi
8174
Thomas Wouters89f507f2006-12-13 04:49:30 +00008175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008176# The cast to long int works around a bug in the HP C Compiler
8177# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8178# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8179# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8181$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008182if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008184else
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008186#ifdef HAVE_SYS_TYPES_H
8187#include <sys/types.h>
8188#endif
8189
Matthias Kloseb9621712010-04-24 17:59:49 +00008190"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008191
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008192else
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 if test "$ac_cv_type_off_t" = yes; then
8194 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8195$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008196as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008197See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008198 else
8199 ac_cv_sizeof_off_t=0
8200 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008202
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8205$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008206
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008207
8208
Martin v. Löwis11437992002-04-12 09:54:03 +00008209cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008210#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008211_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008212
Michael W. Hudson54241132001-12-07 15:38:26 +00008213
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008214
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8216$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008217if test "$have_long_long" = yes
8218then
8219if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008220 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008223
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8225$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8228$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008229fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008230else
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8232$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008233fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008235# The cast to long int works around a bug in the HP C Compiler
8236# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8237# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8238# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8240$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008241if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008242 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008243else
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008245#ifdef HAVE_SYS_TYPES_H
8246#include <sys/types.h>
8247#endif
8248#ifdef HAVE_TIME_H
8249#include <time.h>
8250#endif
8251
Matthias Kloseb9621712010-04-24 17:59:49 +00008252"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008253
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008254else
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 if test "$ac_cv_type_time_t" = yes; then
8256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008258as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008259See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008260 else
8261 ac_cv_sizeof_time_t=0
8262 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008264
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8267$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008269
8270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008272#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008273_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008274
Michael W. Hudson54241132001-12-07 15:38:26 +00008275
8276
Trent Mick635f6fb2000-08-23 21:33:05 +00008277# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008278ac_save_cc="$CC"
8279if test "$ac_cv_kpthread" = "yes"
8280then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008281elif test "$ac_cv_kthread" = "yes"
8282then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008283elif test "$ac_cv_pthread" = "yes"
8284then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008285fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008286
Matthias Kloseb9621712010-04-24 17:59:49 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8288$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008289have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008291/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008292
8293 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008294int
8295main ()
8296{
Guido van Rossum12580492000-09-24 16:47:19 +00008297pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 ;
8299 return 0;
8300}
Matthias Kloseb159a552010-04-25 21:00:44 +00008301
Martin v. Löwis11437992002-04-12 09:54:03 +00008302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008303if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008304 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8308$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008309if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8313# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8315$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008316if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008318else
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008320#ifdef HAVE_PTHREAD_H
8321#include <pthread.h>
8322#endif
8323
Matthias Kloseb9621712010-04-24 17:59:49 +00008324"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008325
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008326else
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 if test "$ac_cv_type_pthread_t" = yes; then
8328 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8329$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008330as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008331See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008332 else
8333 ac_cv_sizeof_pthread_t=0
8334 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008336
Trent Mick635f6fb2000-08-23 21:33:05 +00008337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8339$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008340
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008341
8342
Martin v. Löwis11437992002-04-12 09:54:03 +00008343cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008344#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008345_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008346
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008347
Trent Mick635f6fb2000-08-23 21:33:05 +00008348fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008349CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008350
Michael W. Hudson54241132001-12-07 15:38:26 +00008351
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008352case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008353 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008354 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8355 ;;
8356 Darwin/*)
8357 OTHER_LIBTOOL_OPT=""
8358 ;;
8359esac
8360
8361
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008362
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008363case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008364 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008365 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8366 if test "${enable_universalsdk}"; then
8367 :
8368 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008369 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008370 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008371 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008372 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008373 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008374 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008375 if test ${gcc_version} '<' 4.0
8376 then
8377 LIBTOOL_CRUFT="-lcc_dynamic"
8378 else
8379 LIBTOOL_CRUFT=""
8380 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008382 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008383else
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008385/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008386
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008387 #include <unistd.h>
8388 int main(int argc, char*argv[])
8389 {
8390 if (sizeof(long) == 4) {
8391 return 0;
8392 } else {
8393 return 1;
8394 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008395 }
8396
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008398if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008399 ac_osx_32bit=yes
8400else
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8404 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008405fi
8406
8407
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008408 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008409 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008410 i386)
8411 MACOSX_DEFAULT_ARCH="i386"
8412 ;;
8413 ppc)
8414 MACOSX_DEFAULT_ARCH="ppc"
8415 ;;
8416 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008417 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008418 ;;
8419 esac
8420 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008421 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008422 i386)
8423 MACOSX_DEFAULT_ARCH="x86_64"
8424 ;;
8425 ppc)
8426 MACOSX_DEFAULT_ARCH="ppc64"
8427 ;;
8428 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008429 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008430 ;;
8431 esac
8432
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008433 fi
8434
8435 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008436 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008437 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008438esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8440$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008441if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008442then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008443 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008445 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008446
Matthias Kloseb9621712010-04-24 17:59:49 +00008447$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8450$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008451 if test $enable_shared = "yes"
8452 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008453 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 +00008454 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008455else
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8457$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008458fi
8459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8461$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008462case $ac_sys_system/$ac_sys_release in
8463 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008464
Matthias Kloseb9621712010-04-24 17:59:49 +00008465$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008466
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8468$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008469 ;;
8470 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8472$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008473 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008474esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008475
Guido van Rossum0a516c91994-09-12 10:58:40 +00008476# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008477
Michael W. Hudson54241132001-12-07 15:38:26 +00008478
8479
8480
8481
Benjamin Peterson99f03762010-04-11 22:15:28 +00008482
Thomas Wouters477c8d52006-05-27 19:21:47 +00008483
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008484# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8485# -- usually .so, .sl on HP-UX, .dll on Cygwin
8486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8487$as_echo_n "checking the extension of shared libraries... " >&6; }
8488if test -z "$SHLIB_SUFFIX"; then
8489 case $ac_sys_system in
8490 hp*|HP*)
8491 case `uname -m` in
8492 ia64) SHLIB_SUFFIX=.so;;
8493 *) SHLIB_SUFFIX=.sl;;
8494 esac
8495 ;;
8496 CYGWIN*) SHLIB_SUFFIX=.dll;;
8497 *) SHLIB_SUFFIX=.so;;
8498 esac
8499fi
8500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8501$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008502
Guido van Rossum0a516c91994-09-12 10:58:40 +00008503# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008504# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008505# (Shared libraries in this instance are shared modules to be loaded into
8506# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8508$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008509if test -z "$LDSHARED"
8510then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008511 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008512 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008513 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008514 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008515 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008516 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008517 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008519 if test "$GCC" = "yes" ; then
8520 LDSHARED='$(CC) -shared'
8521 LDCXXSHARED='$(CXX) -shared'
8522 else
8523 LDSHARED='$(CC) -G'
8524 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008525 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008526 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008527 if test "$GCC" = "yes" ; then
8528 LDSHARED='$(CC) -shared'
8529 LDCXXSHARED='$(CXX) -shared'
8530 else
8531 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008532 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008533 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008534 LDSHARED='$(CC) -bundle'
8535 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008536 if test "$enable_framework" ; then
8537 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008538 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8539 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008540 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008541 else
8542 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008543 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008544 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008545 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008546 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008547 LDSHARED='$(CC) -bundle'
8548 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008549 if test "$enable_framework" ; then
8550 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008551 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8552 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008553 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008554 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008555 # No framework, use the Python app as bundle-loader
8556 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008557 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008558 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008559 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008560 Darwin/*)
8561 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8562 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008563
Ned Deily36820b62014-06-25 13:44:22 -07008564 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8565 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8566 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8567 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8568 if test ${dep_target_major} -eq 10 && \
8569 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008570 then
Ned Deily36820b62014-06-25 13:44:22 -07008571 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008572 LDSHARED='$(CC) -bundle'
8573 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008574 if test "$enable_framework" ; then
8575 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008576 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8577 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008578 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008579 else
8580 # No framework, use the Python app as bundle-loader
8581 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8582 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008583 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008584 fi
Ned Deily36820b62014-06-25 13:44:22 -07008585 else
8586 # building for OS X 10.3 and later
8587 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8588 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8589 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008590 fi
8591 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008592 Linux*|GNU*|QNX*)
8593 LDSHARED='$(CC) -shared'
8594 LDCXXSHARED='$(CXX) -shared';;
8595 BSD/OS*/4*)
8596 LDSHARED="gcc -shared"
8597 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008598 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008599 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008600 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008601 LDSHARED='$(CC) -shared'
8602 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008603 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008604 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008605 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008606 OpenBSD*)
8607 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8608 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008609 LDSHARED='$(CC) -shared $(CCSHARED)'
8610 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008611 else
8612 case `uname -r` in
8613 [01].* | 2.[0-7] | 2.[0-7].*)
8614 LDSHARED="ld -Bshareable ${LDFLAGS}"
8615 ;;
8616 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008617 LDSHARED='$(CC) -shared $(CCSHARED)'
8618 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008619 ;;
8620 esac
8621 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008622 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008623 LDSHARED='$(CC) -shared'
8624 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008625 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008626 if test "$GCC" = "yes" ; then
8627 LDSHARED='$(CC) -shared'
8628 LDCXXSHARED='$(CXX) -shared'
8629 else
8630 LDSHARED='$(CC) -G'
8631 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008632 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008633 SCO_SV*)
8634 LDSHARED='$(CC) -Wl,-G,-Bexport'
8635 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8636 CYGWIN*)
8637 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8638 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008639 *) LDSHARED="ld";;
8640 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8643$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008644LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008645BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008646# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008647# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8649$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008650if test -z "$CCSHARED"
8651then
Guido van Rossum07397971997-04-29 21:49:50 +00008652 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008653 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008654 then CCSHARED="-fPIC";
8655 elif test `uname -p` = sparc;
8656 then CCSHARED="-xcode=pic32";
8657 else CCSHARED="-Kpic";
8658 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008659 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008660 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008661 else CCSHARED="+z";
8662 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008663 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008664 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008665 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008666 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008667 if test "$GCC" = "yes"
8668 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008669 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008670 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008671 SCO_SV*)
8672 if test "$GCC" = "yes"
8673 then CCSHARED="-fPIC"
8674 else CCSHARED="-Kpic -belf"
8675 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008676 IRIX*/6*) case $CC in
8677 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008678 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008679 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008680 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8683$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008684# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008685# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8687$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008688if test -z "$LINKFORSHARED"
8689then
Guido van Rossum07397971997-04-29 21:49:50 +00008690 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008691 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008692 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008693 LINKFORSHARED="-Wl,-E -Wl,+s";;
8694# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008695 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008696 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008697 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008699 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008700
8701 # Issue #18075: the default maximum stack size (8MBytes) is too
8702 # small for the default recursion limit. Increase the stack size
8703 # to ensure that tests don't crash
8704 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8705
Jack Jansene578a632001-08-15 01:27:14 +00008706 if test "$enable_framework"
8707 then
Jack Jansenda49e192005-01-07 13:08:22 +00008708 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008709 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008710 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008711 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008712 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008713 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008714 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008715 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8716 then
8717 LINKFORSHARED="-Wl,--export-dynamic"
8718 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008719 SunOS/5*) case $CC in
8720 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008721 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008722 then
8723 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008724 fi;;
8725 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008726 CYGWIN*)
8727 if test $enable_shared = "no"
8728 then
8729 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8730 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008731 QNX*)
8732 # -Wl,-E causes the symbols to be added to the dynamic
8733 # symbol table so that they can be found when a module
8734 # is loaded. -N 2048K causes the stack size to be set
8735 # to 2048 kilobytes so that the stack doesn't overflow
8736 # when running test_compile.py.
8737 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008738 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8741$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008742
Michael W. Hudson54241132001-12-07 15:38:26 +00008743
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008744
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8746$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008747if test ! "$LIBRARY" = "$LDLIBRARY"
8748then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008749 case $ac_sys_system in
8750 CYGWIN*)
8751 # Cygwin needs CCSHARED when building extension DLLs
8752 # but not when building the interpreter DLL.
8753 CFLAGSFORSHARED='';;
8754 *)
8755 CFLAGSFORSHARED='$(CCSHARED)'
8756 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8759$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008760
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008761# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8762# library (with --enable-shared).
8763# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008764# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8765# if it is not required, since it creates a dependency of the shared library
8766# to LIBS. This, in turn, means that applications linking the shared libpython
8767# don't need to link LIBS explicitly. The default should be only changed
8768# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008769
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8771$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008772case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008773 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008774 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008775esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8777$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008778
8779
Guido van Rossum627b2d71993-12-24 10:39:16 +00008780# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8782$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008783if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008784 $as_echo_n "(cached) " >&6
8785else
8786 ac_check_lib_save_LIBS=$LIBS
8787LIBS="-lsendfile $LIBS"
8788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8789/* end confdefs.h. */
8790
8791/* Override any GCC internal prototype to avoid an error.
8792 Use char because int might match the return type of a GCC
8793 builtin and then its argument prototype would still apply. */
8794#ifdef __cplusplus
8795extern "C"
8796#endif
8797char sendfile ();
8798int
8799main ()
8800{
8801return sendfile ();
8802 ;
8803 return 0;
8804}
8805_ACEOF
8806if ac_fn_c_try_link "$LINENO"; then :
8807 ac_cv_lib_sendfile_sendfile=yes
8808else
8809 ac_cv_lib_sendfile_sendfile=no
8810fi
8811rm -f core conftest.err conftest.$ac_objext \
8812 conftest$ac_exeext conftest.$ac_ext
8813LIBS=$ac_check_lib_save_LIBS
8814fi
8815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8816$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008817if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008818 cat >>confdefs.h <<_ACEOF
8819#define HAVE_LIBSENDFILE 1
8820_ACEOF
8821
8822 LIBS="-lsendfile $LIBS"
8823
8824fi
8825
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8827$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008828if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008830else
Martin v. Löwis11437992002-04-12 09:54:03 +00008831 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008832LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836/* Override any GCC internal prototype to avoid an error.
8837 Use char because int might match the return type of a GCC
8838 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008839#ifdef __cplusplus
8840extern "C"
8841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008842char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008843int
8844main ()
8845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008846return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008847 ;
8848 return 0;
8849}
8850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008851if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008853else
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008856rm -f core conftest.err conftest.$ac_objext \
8857 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008858LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8861$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008862if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 cat >>confdefs.h <<_ACEOF
8864#define HAVE_LIBDL 1
8865_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008866
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008867 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008868
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008869fi
8870 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8872$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008873if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008875else
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008877LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881/* Override any GCC internal prototype to avoid an error.
8882 Use char because int might match the return type of a GCC
8883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008884#ifdef __cplusplus
8885extern "C"
8886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008887char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008888int
8889main ()
8890{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ;
8893 return 0;
8894}
8895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008896if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008897 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008898else
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901rm -f core conftest.err conftest.$ac_objext \
8902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008903LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8906$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008907if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 cat >>confdefs.h <<_ACEOF
8909#define HAVE_LIBDLD 1
8910_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008911
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008912 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008913
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008914fi
8915 # Dynamic linking for HP-UX
Victor Stinnerfcfed192015-01-06 13:54:58 +01008916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8917$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
8918if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
8919 $as_echo_n "(cached) " >&6
8920else
8921 ac_check_lib_save_LIBS=$LIBS
8922LIBS="-lcrypto $LIBS"
8923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8924/* end confdefs.h. */
8925
8926/* Override any GCC internal prototype to avoid an error.
8927 Use char because int might match the return type of a GCC
8928 builtin and then its argument prototype would still apply. */
8929#ifdef __cplusplus
8930extern "C"
8931#endif
8932char RAND_egd ();
8933int
8934main ()
8935{
8936return RAND_egd ();
8937 ;
8938 return 0;
8939}
8940_ACEOF
8941if ac_fn_c_try_link "$LINENO"; then :
8942 ac_cv_lib_crypto_RAND_egd=yes
8943else
8944 ac_cv_lib_crypto_RAND_egd=no
8945fi
8946rm -f core conftest.err conftest.$ac_objext \
8947 conftest$ac_exeext conftest.$ac_ext
8948LIBS=$ac_check_lib_save_LIBS
8949fi
8950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
8951$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
8952if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
8953
8954$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
8955
8956fi
8957
Martin v. Löwis519adae2003-09-20 10:47:47 +00008958
Georg Brandlb1441c72009-01-03 22:33:39 +00008959# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008960if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8962$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008963if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008965else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008966 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970/* Override any GCC internal prototype to avoid an error.
8971 Use char because int might match the return type of a GCC
8972 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008973#ifdef __cplusplus
8974extern "C"
8975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008976char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008977int
8978main ()
8979{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008980return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ;
8982 return 0;
8983}
8984_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008985for ac_lib in '' pthread rt posix4; do
8986 if test -z "$ac_lib"; then
8987 ac_res="none required"
8988 else
8989 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008990 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008991 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008993 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008995rm -f core conftest.err conftest.$ac_objext \
8996 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008997 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000done
Victor Stinnere0be4232011-10-25 13:06:09 +02009001if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003else
9004 ac_cv_search_sem_init=no
9005fi
9006rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009007LIBS=$ac_func_search_save_LIBS
9008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9010$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009012if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009014
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009015fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009016 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009017 # posix4 on Solaris 2.6
9018 # pthread (first!) on Linux
9019fi
9020
Martin v. Löwis19d17342003-06-14 21:03:05 +00009021# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9023$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009024if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009026else
9027 ac_check_lib_save_LIBS=$LIBS
9028LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009030/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032/* Override any GCC internal prototype to avoid an error.
9033 Use char because int might match the return type of a GCC
9034 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009035#ifdef __cplusplus
9036extern "C"
9037#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009038char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009039int
9040main ()
9041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009042return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009043 ;
9044 return 0;
9045}
9046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009047if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009048 ac_cv_lib_intl_textdomain=yes
9049else
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009052rm -f core conftest.err conftest.$ac_objext \
9053 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009054LIBS=$ac_check_lib_save_LIBS
9055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9057$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009058if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009059
Matthias Kloseb9621712010-04-24 17:59:49 +00009060$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009061
Brett Cannonc6d936e2009-06-07 20:09:53 +00009062 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009063fi
9064
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009065
9066# checks for system dependent C++ extensions support
9067case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9069$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009071/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009072
Georg Brandl59e87bd2011-02-15 19:48:59 +00009073 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009074int
9075main ()
9076{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009077loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 ;
9079 return 0;
9080}
Matthias Kloseb159a552010-04-25 21:00:44 +00009081
Martin v. Löwis11437992002-04-12 09:54:03 +00009082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009083if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009084
Matthias Kloseb159a552010-04-25 21:00:44 +00009085
Matthias Kloseb9621712010-04-24 17:59:49 +00009086$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009087
Matthias Kloseb159a552010-04-25 21:00:44 +00009088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009089$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009090
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009091else
Matthias Kloseb159a552010-04-25 21:00:44 +00009092
9093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009094$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009095
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009097rm -f core conftest.err conftest.$ac_objext \
9098 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009099 *) ;;
9100esac
9101
Christian Heimes985ecdc2013-11-20 11:46:18 +01009102# check for systems that require aligned memory access
9103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9104$as_echo_n "checking aligned memory access is required... " >&6; }
9105if test "$cross_compiling" = yes; then :
9106 aligned_required=yes
9107else
9108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9109/* end confdefs.h. */
9110
9111int main()
9112{
9113 char s[16];
9114 int i, *p1, *p2;
9115 for (i=0; i < 16; i++)
9116 s[i] = i;
9117 p1 = (int*)(s+1);
9118 p2 = (int*)(s+2);
9119 if (*p1 == *p2)
9120 return 1;
9121 return 0;
9122}
9123
9124_ACEOF
9125if ac_fn_c_try_run "$LINENO"; then :
9126 aligned_required=no
9127else
9128 aligned_required=yes
9129fi
9130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9131 conftest.$ac_objext conftest.beam conftest.$ac_ext
9132fi
9133
9134
9135if test "$aligned_required" = yes ; then
9136
9137$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9138
9139fi
9140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9141$as_echo "$aligned_required" >&6; }
9142
9143
9144# str, bytes and memoryview hash algorithm
9145
9146
9147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9148$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9149
9150# Check whether --with-hash_algorithm was given.
9151if test "${with_hash_algorithm+set}" = set; then :
9152 withval=$with_hash_algorithm;
9153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9154$as_echo "$withval" >&6; }
9155case "$withval" in
9156 siphash24)
9157 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9158
9159 ;;
9160 fnv)
9161 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9162
9163 ;;
9164 *)
9165 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9166 ;;
9167esac
9168
9169else
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9171$as_echo "default" >&6; }
9172fi
9173
9174
Guido van Rossum70c7f481998-03-26 18:44:10 +00009175# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9177$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009178if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009179 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009180else
Martin v. Löwis11437992002-04-12 09:54:03 +00009181 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009182LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009186/* Override any GCC internal prototype to avoid an error.
9187 Use char because int might match the return type of a GCC
9188 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009189#ifdef __cplusplus
9190extern "C"
9191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009192char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009193int
9194main ()
9195{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009197 ;
9198 return 0;
9199}
9200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009201if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009202 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009203else
Matthias Kloseb9621712010-04-24 17:59:49 +00009204 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009206rm -f core conftest.err conftest.$ac_objext \
9207 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009208LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9211$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009212if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009213 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009214fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009215 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9217$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009218if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009219 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009220else
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009222LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226/* Override any GCC internal prototype to avoid an error.
9227 Use char because int might match the return type of a GCC
9228 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009229#ifdef __cplusplus
9230extern "C"
9231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009232char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009233int
9234main ()
9235{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009236return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009237 ;
9238 return 0;
9239}
9240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009241if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009242 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009243else
Matthias Kloseb9621712010-04-24 17:59:49 +00009244 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009246rm -f core conftest.err conftest.$ac_objext \
9247 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009248LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9251$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009252if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009253 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009254fi
9255 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009256
Matthias Kloseb9621712010-04-24 17:59:49 +00009257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9258$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009261if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009262 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9264$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009265LIBS="$withval $LIBS"
9266
9267else
Matthias Kloseb9621712010-04-24 17:59:49 +00009268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9269$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270fi
9271
Guido van Rossum7f43da71994-08-01 12:15:30 +00009272
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009273
9274
9275
9276
9277
9278
9279
9280if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9281 if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009282 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9283set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9285$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009286if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009287 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009288else
9289 case $PKG_CONFIG in
9290 [\\/]* | ?:[\\/]*)
9291 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9292 ;;
9293 *)
9294 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9295for as_dir in $PATH
9296do
9297 IFS=$as_save_IFS
9298 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009300 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009301 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009302 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009303 break 2
9304 fi
9305done
Matthias Kloseb9621712010-04-24 17:59:49 +00009306 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009307IFS=$as_save_IFS
9308
9309 ;;
9310esac
9311fi
9312PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9313if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9315$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009316else
Matthias Kloseb9621712010-04-24 17:59:49 +00009317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9318$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009319fi
9320
9321
9322fi
9323if test -z "$ac_cv_path_PKG_CONFIG"; then
9324 ac_pt_PKG_CONFIG=$PKG_CONFIG
9325 # Extract the first word of "pkg-config", so it can be a program name with args.
9326set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9328$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009329if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009330 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009331else
9332 case $ac_pt_PKG_CONFIG in
9333 [\\/]* | ?:[\\/]*)
9334 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9335 ;;
9336 *)
9337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9338for as_dir in $PATH
9339do
9340 IFS=$as_save_IFS
9341 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009342 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009343 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009344 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009345 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009346 break 2
9347 fi
9348done
Matthias Kloseb9621712010-04-24 17:59:49 +00009349 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009350IFS=$as_save_IFS
9351
9352 ;;
9353esac
9354fi
9355ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9356if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9358$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009359else
Matthias Kloseb9621712010-04-24 17:59:49 +00009360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9361$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009362fi
9363
9364 if test "x$ac_pt_PKG_CONFIG" = x; then
9365 PKG_CONFIG=""
9366 else
9367 case $cross_compiling:$ac_tool_warned in
9368yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9370$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009371ac_tool_warned=yes ;;
9372esac
9373 PKG_CONFIG=$ac_pt_PKG_CONFIG
9374 fi
9375else
9376 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9377fi
9378
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009379fi
9380if test -n "$PKG_CONFIG"; then
9381 _pkg_min_version=0.9.0
9382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9383$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9384 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9386$as_echo "yes" >&6; }
9387 else
9388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9389$as_echo "no" >&6; }
9390 PKG_CONFIG=""
9391 fi
9392fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009393
9394# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9396$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009397
9398# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009399if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009400 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009401else
9402 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009403fi
9404
9405
Matthias Kloseb9621712010-04-24 17:59:49 +00009406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9407$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009408
9409# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9411$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009412
9413# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009414if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009415 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009416else
9417 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009418fi
9419
9420
9421if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009422 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9423else
9424 LIBFFI_INCLUDEDIR=""
9425fi
9426
9427
Matthias Kloseb9621712010-04-24 17:59:49 +00009428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9429$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009430
Stefan Krah60187b52012-03-23 19:06:27 +01009431# Check for use of the system libmpdec library
9432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9433$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9434
9435# Check whether --with-system_libmpdec was given.
9436if test "${with_system_libmpdec+set}" = set; then :
9437 withval=$with_system_libmpdec;
9438else
9439 with_system_libmpdec="no"
9440fi
9441
9442
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9444$as_echo "$with_system_libmpdec" >&6; }
9445
Benjamin Peterson076ed002010-10-31 17:11:02 +00009446# Check for support for loadable sqlite extensions
9447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9448$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9449# Check whether --enable-loadable-sqlite-extensions was given.
9450if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9451 enableval=$enable_loadable_sqlite_extensions;
9452else
9453 enable_loadable_sqlite_extensions="no"
9454fi
9455
9456
9457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9458$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9459
Ned Deilyd819b932013-09-06 01:07:05 -07009460# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9461
9462
9463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9464$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9465
9466# Check whether --with-tcltk-includes was given.
9467if test "${with_tcltk_includes+set}" = set; then :
9468 withval=$with_tcltk_includes;
9469else
9470 with_tcltk_includes="default"
9471fi
9472
9473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9474$as_echo "$with_tcltk_includes" >&6; }
9475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9476$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9477
9478# Check whether --with-tcltk-libs was given.
9479if test "${with_tcltk_libs+set}" = set; then :
9480 withval=$with_tcltk_libs;
9481else
9482 with_tcltk_libs="default"
9483fi
9484
9485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9486$as_echo "$with_tcltk_libs" >&6; }
9487if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9488then
9489 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9490 then
9491 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9492 fi
9493 TCLTK_INCLUDES=""
9494 TCLTK_LIBS=""
9495else
9496 TCLTK_INCLUDES="$with_tcltk_includes"
9497 TCLTK_LIBS="$with_tcltk_libs"
9498fi
9499
Matthias Klose55708cc2009-04-30 08:06:49 +00009500# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9502$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009503
9504# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009505if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009506 withval=$with_dbmliborder;
9507if test x$with_dbmliborder = xyes
9508then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009509as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009510else
9511 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9512 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9513 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009514 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009515 fi
9516 done
9517fi
9518fi
9519
Matthias Kloseb9621712010-04-24 17:59:49 +00009520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9521$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009522
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009523# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009524
9525
Matthias Kloseb9621712010-04-24 17:59:49 +00009526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9527$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009530if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531 withval=$with_signal_module;
9532fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009533
9534
9535if test -z "$with_signal_module"
9536then with_signal_module="yes"
9537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9539$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009540
9541if test "${with_signal_module}" = "yes"; then
9542 USE_SIGNAL_MODULE=""
9543 SIGNAL_OBJS=""
9544else
9545 USE_SIGNAL_MODULE="#"
9546 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9547fi
9548
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009549# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009550
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009551USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009553
Martin v. Löwis11437992002-04-12 09:54:03 +00009554
9555# Templates for things AC_DEFINEd more than once.
9556# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009557
9558
Martin v. Löwis11437992002-04-12 09:54:03 +00009559
Matthias Kloseb9621712010-04-24 17:59:49 +00009560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9561$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009563# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009564if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565 withval=$with_threads;
9566fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009567
9568
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009569# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009571# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009572if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573 withval=$with_thread; with_threads=$with_thread
9574fi
9575
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009576
9577if test -z "$with_threads"
9578then with_threads="yes"
9579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9581$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009582
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009583
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009584if test "$with_threads" = "no"
9585then
9586 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009587elif test "$ac_cv_pthread_is_default" = yes
9588then
Matthias Kloseb9621712010-04-24 17:59:49 +00009589 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009590
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009591 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009593
9594 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009596elif test "$ac_cv_kpthread" = "yes"
9597then
9598 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009599 if test "$ac_cv_cxx_thread" = "yes"; then
9600 CXX="$CXX -Kpthread"
9601 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009602 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009603
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009604 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009605 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009606elif test "$ac_cv_kthread" = "yes"
9607then
9608 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009609 if test "$ac_cv_cxx_thread" = "yes"; then
9610 CXX="$CXX -Kthread"
9611 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009612 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009613
9614 posix_threads=yes
9615 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009616elif test "$ac_cv_pthread" = "yes"
9617then
9618 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009619 if test "$ac_cv_cxx_thread" = "yes"; then
9620 CXX="$CXX -pthread"
9621 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009622 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009623
9624 posix_threads=yes
9625 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009626else
9627 if test ! -z "$with_threads" -a -d "$with_threads"
9628 then LDFLAGS="$LDFLAGS -L$with_threads"
9629 fi
9630 if test ! -z "$withval" -a -d "$withval"
9631 then LDFLAGS="$LDFLAGS -L$withval"
9632 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009633
9634 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009635 # define _POSIX_THREADS in unistd.h. Some apparently don't
9636 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9638$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009640/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009641
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009642#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009643#ifdef _POSIX_THREADS
9644yes
9645#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009646
9647_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009649 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009650 unistd_defines_pthreads=yes
9651else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009652 unistd_defines_pthreads=no
9653fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009654rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009655
Matthias Kloseb9621712010-04-24 17:59:49 +00009656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9657$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009658
Matthias Kloseb9621712010-04-24 17:59:49 +00009659 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009660
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009661 # Just looking for pthread_create in libpthread is not enough:
9662 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9663 # So we really have to include pthread.h, and then link.
9664 _libs=$LIBS
9665 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9667$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009670
9671#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009672#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009673
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009674void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009675int
9676main ()
9677{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009678
9679pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ;
9681 return 0;
9682}
9683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009685
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9687$as_echo "yes" >&6; }
9688 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009689
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009690 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009691 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009692else
Martin v. Löwis11437992002-04-12 09:54:03 +00009693
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009694 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009695 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009696if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009697 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009698
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009699 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009700 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009701else
Guido van Rossumad678af1998-10-02 14:42:15 +00009702
Matthias Kloseb9621712010-04-24 17:59:49 +00009703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9704$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009705if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009707else
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009709LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713/* Override any GCC internal prototype to avoid an error.
9714 Use char because int might match the return type of a GCC
9715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716#ifdef __cplusplus
9717extern "C"
9718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009719char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009720int
9721main ()
9722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 ;
9725 return 0;
9726}
9727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009730else
Matthias Kloseb9621712010-04-24 17:59:49 +00009731 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009733rm -f core conftest.err conftest.$ac_objext \
9734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009735LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9738$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009739if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009741
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009742 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009743 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009744 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009745else
Greg Steinadf63d62000-07-05 10:38:09 +00009746
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9748$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009749if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009751else
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009753LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009757/* Override any GCC internal prototype to avoid an error.
9758 Use char because int might match the return type of a GCC
9759 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760#ifdef __cplusplus
9761extern "C"
9762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009763char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009764int
9765main ()
9766{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009767return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ;
9769 return 0;
9770}
9771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009772if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009773 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009774else
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009777rm -f core conftest.err conftest.$ac_objext \
9778 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009779LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9782$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009783if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009785
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009786 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009787 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009788 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009789else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009790
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9792$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009793if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009795else
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009797LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801/* Override any GCC internal prototype to avoid an error.
9802 Use char because int might match the return type of a GCC
9803 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009804#ifdef __cplusplus
9805extern "C"
9806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009807char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009808int
9809main ()
9810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009812 ;
9813 return 0;
9814}
9815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009816if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009818else
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009821rm -f core conftest.err conftest.$ac_objext \
9822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009823LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9826$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009827if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009829
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009830 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009831 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009832 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009833else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009834
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9836$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009837if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009838 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009839else
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009841LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845/* Override any GCC internal prototype to avoid an error.
9846 Use char because int might match the return type of a GCC
9847 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009848#ifdef __cplusplus
9849extern "C"
9850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009851char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009852int
9853main ()
9854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 ;
9857 return 0;
9858}
9859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009860if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009862else
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009865rm -f core conftest.err conftest.$ac_objext \
9866 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009867LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9870$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009871if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009873
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009874 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009875 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009876 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009877else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009878
Martin v. Löwis130fb172001-07-19 11:00:41 +00009879 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009880fi
9881
Guido van Rossum627b2d71993-12-24 10:39:16 +00009882
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009883fi
9884
Guido van Rossum0be3e491997-05-22 20:33:33 +00009885fi
9886
Guido van Rossum49545951997-12-02 19:28:29 +00009887fi
9888
Guido van Rossumb93a8621998-05-07 13:27:32 +00009889fi
9890
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009892rm -f core conftest.err conftest.$ac_objext \
9893 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009894
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9896$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009897if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009898 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009899else
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009901LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905/* Override any GCC internal prototype to avoid an error.
9906 Use char because int might match the return type of a GCC
9907 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009908#ifdef __cplusplus
9909extern "C"
9910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009911char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009912int
9913main ()
9914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 ;
9917 return 0;
9918}
9919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009922else
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009925rm -f core conftest.err conftest.$ac_objext \
9926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009927LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9930$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009931if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009933
Martin v. Löwis130fb172001-07-19 11:00:41 +00009934 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009935 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009936 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009937fi
9938
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009939
Neal Norwitza978ab02002-11-02 16:58:05 +00009940 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9942$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009943if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009944 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009945else
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009947LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009951/* Override any GCC internal prototype to avoid an error.
9952 Use char because int might match the return type of a GCC
9953 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009954#ifdef __cplusplus
9955extern "C"
9956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009957char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009958int
9959main ()
9960{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009962 ;
9963 return 0;
9964}
9965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009966if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009968else
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009971rm -f core conftest.err conftest.$ac_objext \
9972 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009973LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9976$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009977if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009979
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009980 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009981 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009982 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009983fi
9984
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009985 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009986fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009987
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009988if test "$posix_threads" = "yes"; then
9989 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009990
Matthias Kloseb9621712010-04-24 17:59:49 +00009991$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009992
9993 fi
9994
9995 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9996 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009997 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009998$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009999
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010000 ;;
10001 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010002$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010003
10004 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010005 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010007
10008 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010009 esac
10010
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10012$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010013 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010014 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010015else
Matthias Kloseb9621712010-04-24 17:59:49 +000010016 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010017 ac_cv_pthread_system_supported=no
10018else
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010020/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010021
10022 #include <stdio.h>
10023 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010024 void *foo(void *parm) {
10025 return NULL;
10026 }
10027 main() {
10028 pthread_attr_t attr;
10029 pthread_t id;
10030 if (pthread_attr_init(&attr)) exit(-1);
10031 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10032 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10033 exit(0);
10034 }
10035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010036if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010037 ac_cv_pthread_system_supported=yes
10038else
Matthias Kloseb9621712010-04-24 17:59:49 +000010039 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010043fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010045
Guido van Rossum627b2d71993-12-24 10:39:16 +000010046fi
10047
Matthias Kloseb9621712010-04-24 17:59:49 +000010048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10049$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010050 if test "$ac_cv_pthread_system_supported" = "yes"; then
10051
Matthias Kloseb9621712010-04-24 17:59:49 +000010052$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010053
10054 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010055 for ac_func in pthread_sigmask
10056do :
10057 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010058if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010059 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010060#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010061_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010062 case $ac_sys_system in
10063 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010064
Matthias Kloseb9621712010-04-24 17:59:49 +000010065$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010066
10067 ;;
10068 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010069fi
10070done
10071
Christian Heimesf77b4b22013-08-21 13:26:05 +020010072 for ac_func in pthread_atfork
10073do :
10074 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10075if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10076 cat >>confdefs.h <<_ACEOF
10077#define HAVE_PTHREAD_ATFORK 1
10078_ACEOF
10079
10080fi
10081done
10082
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010083fi
10084
10085
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010086# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010087
Matthias Kloseb9621712010-04-24 17:59:49 +000010088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10089$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010091if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010093 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010096 ipv6=no
10097 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010098 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10099$as_echo "yes" >&6; }
10100 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010101
10102 ipv6=yes
10103 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010104 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010105else
Martin v. Löwis11437992002-04-12 09:54:03 +000010106
Matthias Kloseb9621712010-04-24 17:59:49 +000010107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010108/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010109 /* AF_INET6 available check */
10110#include <sys/types.h>
10111#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010112int
10113main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010114{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010115int domain = AF_INET6;
10116 ;
10117 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010118}
Martin v. Löwis11437992002-04-12 09:54:03 +000010119_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010120if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010121
Matthias Kloseb9621712010-04-24 17:59:49 +000010122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10123$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010124 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010125
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010126else
Matthias Kloseb159a552010-04-25 21:00:44 +000010127
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10129$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010130 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010131
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010132fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010135if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10137$as_echo_n "checking if RFC2553 API is available... " >&6; }
10138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010139/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010140
10141 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010142#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010143int
10144main ()
10145{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010146struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010147 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ;
10149 return 0;
10150}
Matthias Kloseb159a552010-04-25 21:00:44 +000010151
Martin v. Löwis11437992002-04-12 09:54:03 +000010152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010153if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010154
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010156$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010157 ipv6=yes
10158
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010159else
Matthias Kloseb159a552010-04-25 21:00:44 +000010160
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010162$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010163 ipv6=no
10164
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010167fi
10168
10169if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010170 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010171
10172fi
10173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174fi
10175
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010176
10177ipv6type=unknown
10178ipv6lib=none
10179ipv6trylibc=no
10180
10181if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10183$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010184 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10185 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010186 case $i in
10187 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010189/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010190
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010191#include <netinet/in.h>
10192#ifdef IPV6_INRIA_VERSION
10193yes
10194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010195_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010197 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010198 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010199fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010200rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010201
10202 ;;
10203 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010205/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010206
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010207#include <netinet/in.h>
10208#ifdef __KAME__
10209yes
10210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010211_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010214 ipv6type=$i;
10215 ipv6lib=inet6
10216 ipv6libdir=/usr/local/v6/lib
10217 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010218fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010219rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010220
10221 ;;
10222 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010224/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010225
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010226#include <features.h>
10227#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10228yes
10229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010230_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010231if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010233 ipv6type=$i;
10234 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010235fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010236rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010237
10238 ;;
10239 linux-inet6)
10240 if test -d /usr/inet6; then
10241 ipv6type=$i
10242 ipv6lib=inet6
10243 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010244 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010245 fi
10246 ;;
10247 solaris)
10248 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010249 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010250 ipv6type=$i
10251 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010252 fi
10253 fi
10254 ;;
10255 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010257/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010258
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010259#include <sys/param.h>
10260#ifdef _TOSHIBA_INET6
10261yes
10262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010263_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010264if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010266 ipv6type=$i;
10267 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010268 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010269fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010270rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010271
10272 ;;
10273 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010275/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010276
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010277#include </usr/local/v6/include/sys/v6config.h>
10278#ifdef __V6D__
10279yes
10280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010281_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010284 ipv6type=$i;
10285 ipv6lib=v6;
10286 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010287 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010288fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010289rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010290
10291 ;;
10292 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010294/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010295
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010296#include <sys/param.h>
10297#ifdef _ZETA_MINAMI_INET6
10298yes
10299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010300_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010303 ipv6type=$i;
10304 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010305 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010306fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010307rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010308
10309 ;;
10310 esac
10311 if test "$ipv6type" != "unknown"; then
10312 break
10313 fi
10314 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10316$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010317fi
10318
10319if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10320 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10321 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10322 echo "using lib$ipv6lib"
10323 else
10324 if test $ipv6trylibc = "yes"; then
10325 echo "using libc"
10326 else
10327 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10328 echo "You need to fetch lib$ipv6lib.a from appropriate"
10329 echo 'ipv6 kit and compile beforehand.'
10330 exit 1
10331 fi
10332 fi
10333fi
10334
Matthias Kloseb9621712010-04-24 17:59:49 +000010335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10336$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010338/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010339
10340 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010341int
10342main ()
10343{
10344FSIORefNum fRef = 0
10345 ;
10346 return 0;
10347}
Matthias Kloseb159a552010-04-25 21:00:44 +000010348
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010350if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010351
Matthias Kloseb159a552010-04-25 21:00:44 +000010352
Matthias Kloseb9621712010-04-24 17:59:49 +000010353$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010354
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10356$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010357
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010358else
Matthias Kloseb159a552010-04-25 21:00:44 +000010359
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10361$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010362
10363fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10365
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010366# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10368$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010371if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372 withval=$with_doc_strings;
10373fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010374
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010375
10376if test -z "$with_doc_strings"
10377then with_doc_strings="yes"
10378fi
10379if test "$with_doc_strings" != "no"
10380then
10381
Matthias Kloseb9621712010-04-24 17:59:49 +000010382$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010383
10384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10386$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010387
Antoine Pitrou042b1282010-08-13 21:15:58 +000010388# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10390$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010392# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010395if test "$withval" != no
10396then
10397
Matthias Kloseb9621712010-04-24 17:59:49 +000010398$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010399
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10401$as_echo "yes" >&6; }
10402else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10403$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010404fi
10405else
Matthias Kloseb9621712010-04-24 17:59:49 +000010406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10407$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408fi
10409
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010410
10411# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10413$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010415# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010416if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010417 withval=$with_pymalloc;
10418fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010419
Neil Schemenauera35c6882001-02-27 04:45:05 +000010420
Neil Schemenauer16c22972002-03-22 15:34:49 +000010421if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010422then
10423 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010424fi
10425if test "$with_pymalloc" != "no"
10426then
Martin v. Löwis11437992002-04-12 09:54:03 +000010427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010429
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010430 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10433$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010434
Benjamin Peterson05159c42009-12-03 03:01:27 +000010435# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10437$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010438
10439# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010440if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010441 withval=$with_valgrind;
10442else
10443 with_valgrind=no
10444fi
10445
Matthias Kloseb9621712010-04-24 17:59:49 +000010446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10447$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010448if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 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 +020010450if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010451
Matthias Kloseb9621712010-04-24 17:59:49 +000010452$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010453
10454else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010455 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010456
10457fi
10458
10459
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010460 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010461fi
10462
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010463# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010464
Guido van Rossum98935bf2001-09-05 19:13:16 +000010465DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010466
Guido van Rossume97ee181999-12-20 21:27:22 +000010467# the dlopen() function means we might want to use dynload_shlib.o. some
10468# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010469for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010470do :
10471 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010472if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010473 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010474#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010475_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010476
Guido van Rossume97ee181999-12-20 21:27:22 +000010477fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010478done
Guido van Rossume97ee181999-12-20 21:27:22 +000010479
Michael W. Hudson54241132001-12-07 15:38:26 +000010480
Guido van Rossume97ee181999-12-20 21:27:22 +000010481# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10482# loading of modules.
10483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10485$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010486if test -z "$DYNLOADFILE"
10487then
10488 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010489 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10490 if test "$ac_cv_func_dlopen" = yes
10491 then DYNLOADFILE="dynload_shlib.o"
10492 else DYNLOADFILE="dynload_aix.o"
10493 fi
10494 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010495 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010496 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10497 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010498 *)
10499 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10500 # out any dynamic loading
10501 if test "$ac_cv_func_dlopen" = yes
10502 then DYNLOADFILE="dynload_shlib.o"
10503 else DYNLOADFILE="dynload_stub.o"
10504 fi
10505 ;;
10506 esac
10507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10509$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010510if test "$DYNLOADFILE" != "dynload_stub.o"
10511then
Martin v. Löwis11437992002-04-12 09:54:03 +000010512
Matthias Kloseb9621712010-04-24 17:59:49 +000010513$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010514
10515fi
10516
Neil Schemenauer4e425612001-06-19 15:44:15 +000010517# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10518
Michael W. Hudson54241132001-12-07 15:38:26 +000010519
Matthias Kloseb9621712010-04-24 17:59:49 +000010520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10521$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010522if test -z "$MACHDEP_OBJS"
10523then
Jack Jansene578a632001-08-15 01:27:14 +000010524 MACHDEP_OBJS=$extra_machdep_objs
10525else
10526 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010527fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010528if test -z "$MACHDEP_OBJS"; then
10529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10530$as_echo "none" >&6; }
10531else
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10533$as_echo "$MACHDEP_OBJS" >&6; }
10534fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010535
Guido van Rossum627b2d71993-12-24 10:39:16 +000010536# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010537for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010538 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010539 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinnerfe02e392014-12-21 01:16:38 +010010540 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010541 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010542 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010543 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010544 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10545 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010546 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010547 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010548 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010549 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010550 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010551 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010552 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10553 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010554 sigaction sigaltstack siginterrupt sigpending sigrelse \
10555 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010556 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010557 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010558 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010559do :
10560 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10561ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010562if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010564#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010565_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010566
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010567fi
10568done
10569
Michael W. Hudson54241132001-12-07 15:38:26 +000010570
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010571ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10572 #include <dirent.h>
10573"
10574if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10575
10576$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10577
10578fi
10579
10580
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010581# For some functions, having a definition is not sufficient, since
10582# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10584$as_echo_n "checking for chroot... " >&6; }
10585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010586/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010587#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010588int
10589main ()
10590{
10591void *x=chroot
10592 ;
10593 return 0;
10594}
10595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010597
Matthias Kloseb9621712010-04-24 17:59:49 +000010598$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010599
Matthias Kloseb159a552010-04-25 21:00:44 +000010600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010601$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010602else
Matthias Kloseb9621712010-04-24 17:59:49 +000010603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10604$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010605
10606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10609$as_echo_n "checking for link... " >&6; }
10610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010611/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010612#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010613int
10614main ()
10615{
10616void *x=link
10617 ;
10618 return 0;
10619}
10620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010621if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010622
Matthias Kloseb9621712010-04-24 17:59:49 +000010623$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010624
Matthias Kloseb159a552010-04-25 21:00:44 +000010625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010626$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010627else
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10629$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010630
10631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10634$as_echo_n "checking for symlink... " >&6; }
10635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010636/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010637#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010638int
10639main ()
10640{
10641void *x=symlink
10642 ;
10643 return 0;
10644}
10645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010646if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010647
Matthias Kloseb9621712010-04-24 17:59:49 +000010648$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010649
Matthias Kloseb159a552010-04-25 21:00:44 +000010650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010651$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010652else
Matthias Kloseb9621712010-04-24 17:59:49 +000010653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10654$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010655
10656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10659$as_echo_n "checking for fchdir... " >&6; }
10660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010661/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010662#include <unistd.h>
10663int
10664main ()
10665{
10666void *x=fchdir
10667 ;
10668 return 0;
10669}
10670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010671if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010674
Matthias Kloseb159a552010-04-25 21:00:44 +000010675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010676$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010677else
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10679$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010680
10681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10684$as_echo_n "checking for fsync... " >&6; }
10685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010686/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010687#include <unistd.h>
10688int
10689main ()
10690{
10691void *x=fsync
10692 ;
10693 return 0;
10694}
10695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010696if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010697
Matthias Kloseb9621712010-04-24 17:59:49 +000010698$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010699
Matthias Kloseb159a552010-04-25 21:00:44 +000010700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010701$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010702else
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10704$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010705
10706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10709$as_echo_n "checking for fdatasync... " >&6; }
10710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010711/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010712#include <unistd.h>
10713int
10714main ()
10715{
10716void *x=fdatasync
10717 ;
10718 return 0;
10719}
10720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010721if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010722
Matthias Kloseb9621712010-04-24 17:59:49 +000010723$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010724
Matthias Kloseb159a552010-04-25 21:00:44 +000010725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010726$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010727else
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10729$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010730
10731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10734$as_echo_n "checking for epoll... " >&6; }
10735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010736/* end confdefs.h. */
10737#include <sys/epoll.h>
10738int
10739main ()
10740{
10741void *x=epoll_create
10742 ;
10743 return 0;
10744}
10745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010746if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010747
Matthias Kloseb9621712010-04-24 17:59:49 +000010748$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010749
Matthias Kloseb159a552010-04-25 21:00:44 +000010750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010751$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010752else
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10754$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010755
10756fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10759$as_echo_n "checking for epoll_create1... " >&6; }
10760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10761/* end confdefs.h. */
10762#include <sys/epoll.h>
10763int
10764main ()
10765{
10766void *x=epoll_create1
10767 ;
10768 return 0;
10769}
10770_ACEOF
10771if ac_fn_c_try_compile "$LINENO"; then :
10772
10773$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10774
10775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10776$as_echo "yes" >&6; }
10777else
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10779$as_echo "no" >&6; }
10780
10781fi
10782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10784$as_echo_n "checking for kqueue... " >&6; }
10785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010786/* end confdefs.h. */
10787
10788#include <sys/types.h>
10789#include <sys/event.h>
10790
10791int
10792main ()
10793{
10794int x=kqueue()
10795 ;
10796 return 0;
10797}
10798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010799if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010800
Matthias Kloseb9621712010-04-24 17:59:49 +000010801$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010802
Matthias Kloseb159a552010-04-25 21:00:44 +000010803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010804$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010805else
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10807$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010808
10809fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10812$as_echo_n "checking for prlimit... " >&6; }
10813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10814/* end confdefs.h. */
10815
10816#include <sys/time.h>
10817#include <sys/resource.h>
10818
10819int
10820main ()
10821{
10822void *x=prlimit
10823 ;
10824 return 0;
10825}
10826_ACEOF
10827if ac_fn_c_try_compile "$LINENO"; then :
10828
10829$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10830
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10832$as_echo "yes" >&6; }
10833else
10834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10835$as_echo "no" >&6; }
10836
10837fi
10838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10839
Martin v. Löwisd5843682002-11-21 20:41:28 +000010840# On some systems (eg. FreeBSD 5), we would find a definition of the
10841# functions ctermid_r, setgroups in the library, but no prototype
10842# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10843# address to avoid compiler warnings and potential miscompilations
10844# because of the missing prototypes.
10845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10847$as_echo_n "checking for ctermid_r... " >&6; }
10848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010849/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010850
Martin v. Löwisd5843682002-11-21 20:41:28 +000010851#include <stdio.h>
10852
Martin v. Löwisd5843682002-11-21 20:41:28 +000010853int
10854main ()
10855{
10856void* p = ctermid_r
10857 ;
10858 return 0;
10859}
10860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010861if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010864
Matthias Kloseb159a552010-04-25 21:00:44 +000010865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010866$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010867else
Matthias Kloseb9621712010-04-24 17:59:49 +000010868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10869$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010870
10871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10873
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10875$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010876if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010877 $as_echo_n "(cached) " >&6
10878else
10879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010880/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010881#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010882int
10883main ()
10884{
10885void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010886
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010887 ;
10888 return 0;
10889}
10890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010891if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010892 ac_cv_flock_decl=yes
10893else
10894 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010895
10896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010898
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010899fi
10900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10901$as_echo "$ac_cv_flock_decl" >&6; }
10902if test "x${ac_cv_flock_decl}" = xyes; then
10903 for ac_func in flock
10904do :
10905 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010906if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010907 cat >>confdefs.h <<_ACEOF
10908#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010909_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010910
Antoine Pitroua3000072010-09-07 14:52:42 +000010911else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010913$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010914if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010915 $as_echo_n "(cached) " >&6
10916else
10917 ac_check_lib_save_LIBS=$LIBS
10918LIBS="-lbsd $LIBS"
10919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10920/* end confdefs.h. */
10921
10922/* Override any GCC internal prototype to avoid an error.
10923 Use char because int might match the return type of a GCC
10924 builtin and then its argument prototype would still apply. */
10925#ifdef __cplusplus
10926extern "C"
10927#endif
10928char flock ();
10929int
10930main ()
10931{
10932return flock ();
10933 ;
10934 return 0;
10935}
10936_ACEOF
10937if ac_fn_c_try_link "$LINENO"; then :
10938 ac_cv_lib_bsd_flock=yes
10939else
10940 ac_cv_lib_bsd_flock=no
10941fi
10942rm -f core conftest.err conftest.$ac_objext \
10943 conftest$ac_exeext conftest.$ac_ext
10944LIBS=$ac_check_lib_save_LIBS
10945fi
10946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10947$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010948if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010949 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010950
10951
10952$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10953
10954
10955fi
10956
10957
10958fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010959done
10960
Antoine Pitroua3000072010-09-07 14:52:42 +000010961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10964$as_echo_n "checking for getpagesize... " >&6; }
10965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010966/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010967
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010968#include <unistd.h>
10969
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010970int
10971main ()
10972{
10973void* p = getpagesize
10974 ;
10975 return 0;
10976}
10977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010978if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010981
Matthias Kloseb159a552010-04-25 21:00:44 +000010982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010983$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010984else
Matthias Kloseb9621712010-04-24 17:59:49 +000010985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10986$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010987
10988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010990
Victor Stinner984890f2011-11-24 13:53:38 +010010991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10992$as_echo_n "checking for broken unsetenv... " >&6; }
10993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10994/* end confdefs.h. */
10995
10996#include <stdlib.h>
10997
10998int
10999main ()
11000{
11001int res = unsetenv("DUMMY")
11002 ;
11003 return 0;
11004}
11005_ACEOF
11006if ac_fn_c_try_compile "$LINENO"; then :
11007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11008$as_echo "no" >&6; }
11009else
11010
11011$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11012
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11014$as_echo "yes" >&6; }
11015
11016fi
11017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11018
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011019for ac_prog in true
11020do
11021 # Extract the first word of "$ac_prog", so it can be a program name with args.
11022set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11024$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011025if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011027else
11028 if test -n "$TRUE"; then
11029 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11030else
11031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11032for as_dir in $PATH
11033do
11034 IFS=$as_save_IFS
11035 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011036 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011038 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 $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 +000011040 break 2
11041 fi
11042done
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011045
11046fi
11047fi
11048TRUE=$ac_cv_prog_TRUE
11049if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11051$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011052else
Matthias Kloseb9621712010-04-24 17:59:49 +000011053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11054$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011055fi
11056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011058 test -n "$TRUE" && break
11059done
11060test -n "$TRUE" || TRUE="/bin/true"
11061
11062
Matthias Kloseb9621712010-04-24 17:59:49 +000011063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11064$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011065if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011067else
11068 ac_check_lib_save_LIBS=$LIBS
11069LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011071/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073/* Override any GCC internal prototype to avoid an error.
11074 Use char because int might match the return type of a GCC
11075 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011076#ifdef __cplusplus
11077extern "C"
11078#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011079char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011080int
11081main ()
11082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011083return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011084 ;
11085 return 0;
11086}
11087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011089 ac_cv_lib_c_inet_aton=yes
11090else
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011093rm -f core conftest.err conftest.$ac_objext \
11094 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011095LIBS=$ac_check_lib_save_LIBS
11096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11098$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011099if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011100 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011101else
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11103$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011104if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011105 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011106else
11107 ac_check_lib_save_LIBS=$LIBS
11108LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011110/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011112/* Override any GCC internal prototype to avoid an error.
11113 Use char because int might match the return type of a GCC
11114 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011115#ifdef __cplusplus
11116extern "C"
11117#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011118char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011119int
11120main ()
11121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011122return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011123 ;
11124 return 0;
11125}
11126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011127if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011128 ac_cv_lib_resolv_inet_aton=yes
11129else
Matthias Kloseb9621712010-04-24 17:59:49 +000011130 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011132rm -f core conftest.err conftest.$ac_objext \
11133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011134LIBS=$ac_check_lib_save_LIBS
11135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11137$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011138if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011139 cat >>confdefs.h <<_ACEOF
11140#define HAVE_LIBRESOLV 1
11141_ACEOF
11142
11143 LIBS="-lresolv $LIBS"
11144
11145fi
11146
11147
11148fi
11149
11150
Christian Heimesd0764e22007-12-04 15:00:33 +000011151# On Tru64, chflags seems to be present, but calling it will
11152# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11154$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011155if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011156 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011157else
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011159 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011160else
Matthias Kloseb9621712010-04-24 17:59:49 +000011161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011162/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011163
Christian Heimesd0764e22007-12-04 15:00:33 +000011164#include <sys/stat.h>
11165#include <unistd.h>
11166int main(int argc, char*argv[])
11167{
11168 if(chflags(argv[0], 0) != 0)
11169 return 1;
11170 return 0;
11171}
Ned Deily3eb67d52011-06-28 00:00:28 -070011172
Christian Heimesd0764e22007-12-04 15:00:33 +000011173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011174if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011175 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011176else
Matthias Kloseb9621712010-04-24 17:59:49 +000011177 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11180 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011181fi
11182
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011183
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11186$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011187if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011188 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011189if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011190 ac_cv_have_chflags="yes"
11191else
11192 ac_cv_have_chflags="no"
11193fi
11194
11195fi
11196if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011197
Matthias Kloseb9621712010-04-24 17:59:49 +000011198$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011199
11200fi
11201
Matthias Kloseb9621712010-04-24 17:59:49 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11203$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011204if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011205 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011206else
Matthias Kloseb9621712010-04-24 17:59:49 +000011207 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011208 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011209else
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011211/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011212
Christian Heimesd0764e22007-12-04 15:00:33 +000011213#include <sys/stat.h>
11214#include <unistd.h>
11215int main(int argc, char*argv[])
11216{
11217 if(lchflags(argv[0], 0) != 0)
11218 return 1;
11219 return 0;
11220}
Ned Deily3eb67d52011-06-28 00:00:28 -070011221
Christian Heimesd0764e22007-12-04 15:00:33 +000011222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011223if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011224 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011225else
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11229 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011230fi
11231
11232
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11235$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011236if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011237 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011238if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011239 ac_cv_have_lchflags="yes"
11240else
11241 ac_cv_have_lchflags="no"
11242fi
11243
11244fi
11245if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011246
Matthias Kloseb9621712010-04-24 17:59:49 +000011247$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011248
11249fi
11250
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011251case $ac_sys_system/$ac_sys_release in
11252Darwin/*)
11253 _CUR_CFLAGS="${CFLAGS}"
11254 _CUR_LDFLAGS="${LDFLAGS}"
11255 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11256 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11257 ;;
11258esac
11259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11261$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011262if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011263 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011264else
11265 ac_check_lib_save_LIBS=$LIBS
11266LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011268/* end confdefs.h. */
11269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011270/* Override any GCC internal prototype to avoid an error.
11271 Use char because int might match the return type of a GCC
11272 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011273#ifdef __cplusplus
11274extern "C"
11275#endif
11276char inflateCopy ();
11277int
11278main ()
11279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011280return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011281 ;
11282 return 0;
11283}
11284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011285if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011286 ac_cv_lib_z_inflateCopy=yes
11287else
Matthias Kloseb9621712010-04-24 17:59:49 +000011288 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011290rm -f core conftest.err conftest.$ac_objext \
11291 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011292LIBS=$ac_check_lib_save_LIBS
11293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11295$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011296if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011299
11300fi
11301
11302
11303case $ac_sys_system/$ac_sys_release in
11304Darwin/*)
11305 CFLAGS="${_CUR_CFLAGS}"
11306 LDFLAGS="${_CUR_LDFLAGS}"
11307 ;;
11308esac
11309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11311$as_echo_n "checking for hstrerror... " >&6; }
11312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011313/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011314
Martin v. Löwise9416172003-05-03 10:12:45 +000011315#include <netdb.h>
11316
Martin v. Löwise9416172003-05-03 10:12:45 +000011317int
11318main ()
11319{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011320void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011321 ;
11322 return 0;
11323}
11324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011325if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011326
Matthias Kloseb9621712010-04-24 17:59:49 +000011327$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011328
Matthias Kloseb159a552010-04-25 21:00:44 +000011329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011330$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011331else
Matthias Kloseb9621712010-04-24 17:59:49 +000011332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11333$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011334
11335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011336rm -f core conftest.err conftest.$ac_objext \
11337 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011338
Matthias Kloseb9621712010-04-24 17:59:49 +000011339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11340$as_echo_n "checking for inet_aton... " >&6; }
11341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011342/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011343
Martin v. Löwis86d66262006-02-17 08:40:11 +000011344#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011345#include <sys/socket.h>
11346#include <netinet/in.h>
11347#include <arpa/inet.h>
11348
Martin v. Löwise9416172003-05-03 10:12:45 +000011349int
11350main ()
11351{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011352void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011353 ;
11354 return 0;
11355}
11356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011357if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011358
Matthias Kloseb9621712010-04-24 17:59:49 +000011359$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011360
Matthias Kloseb159a552010-04-25 21:00:44 +000011361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011362$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011363else
Matthias Kloseb9621712010-04-24 17:59:49 +000011364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11365$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011366
11367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011368rm -f core conftest.err conftest.$ac_objext \
11369 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370
Matthias Kloseb9621712010-04-24 17:59:49 +000011371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11372$as_echo_n "checking for inet_pton... " >&6; }
11373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011374/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011375
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011376#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011377#include <sys/socket.h>
11378#include <netinet/in.h>
11379#include <arpa/inet.h>
11380
Martin v. Löwise9416172003-05-03 10:12:45 +000011381int
11382main ()
11383{
11384void* p = inet_pton
11385 ;
11386 return 0;
11387}
11388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011392
Matthias Kloseb159a552010-04-25 21:00:44 +000011393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011394$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011395else
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11397$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011398
11399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011401
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011402# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11404$as_echo_n "checking for setgroups... " >&6; }
11405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011406/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011407
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011408#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011409#ifdef HAVE_GRP_H
11410#include <grp.h>
11411#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011412
Martin v. Löwisd5843682002-11-21 20:41:28 +000011413int
11414main ()
11415{
11416void* p = setgroups
11417 ;
11418 return 0;
11419}
11420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011422
Matthias Kloseb9621712010-04-24 17:59:49 +000011423$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011424
Matthias Kloseb159a552010-04-25 21:00:44 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011426$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011427else
Matthias Kloseb9621712010-04-24 17:59:49 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11429$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011430
11431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011433
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011434# check for openpty and forkpty
11435
11436for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011437do :
11438 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011439if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011440 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011441#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011442_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011443
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011444else
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11446$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011447if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011448 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011449else
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011451LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455/* Override any GCC internal prototype to avoid an error.
11456 Use char because int might match the return type of a GCC
11457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011458#ifdef __cplusplus
11459extern "C"
11460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011461char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011462int
11463main ()
11464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 ;
11467 return 0;
11468}
11469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011470if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011471 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011472else
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011475rm -f core conftest.err conftest.$ac_objext \
11476 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011477LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11480$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011481if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011483 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011484else
Matthias Kloseb9621712010-04-24 17:59:49 +000011485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11486$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011487if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011488 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011489else
11490 ac_check_lib_save_LIBS=$LIBS
11491LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011493/* end confdefs.h. */
11494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495/* Override any GCC internal prototype to avoid an error.
11496 Use char because int might match the return type of a GCC
11497 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011498#ifdef __cplusplus
11499extern "C"
11500#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011501char openpty ();
11502int
11503main ()
11504{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011506 ;
11507 return 0;
11508}
11509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011510if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011511 ac_cv_lib_bsd_openpty=yes
11512else
Matthias Kloseb9621712010-04-24 17:59:49 +000011513 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011515rm -f core conftest.err conftest.$ac_objext \
11516 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011517LIBS=$ac_check_lib_save_LIBS
11518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11520$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011521if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011523 LIBS="$LIBS -lbsd"
11524fi
11525
11526
11527fi
11528
Fred Drake8cef4cf2000-06-28 16:40:38 +000011529
11530fi
11531done
11532
11533for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011534do :
11535 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011536if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011538#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011539_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011540
Fred Drake8cef4cf2000-06-28 16:40:38 +000011541else
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11543$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011544if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011545 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011546else
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011548LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552/* Override any GCC internal prototype to avoid an error.
11553 Use char because int might match the return type of a GCC
11554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011555#ifdef __cplusplus
11556extern "C"
11557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011558char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011559int
11560main ()
11561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 ;
11564 return 0;
11565}
11566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011567if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011569else
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011572rm -f core conftest.err conftest.$ac_objext \
11573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011574LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11577$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011578if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011580 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011581else
Matthias Kloseb9621712010-04-24 17:59:49 +000011582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11583$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011584if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011585 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011586else
11587 ac_check_lib_save_LIBS=$LIBS
11588LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011590/* end confdefs.h. */
11591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592/* Override any GCC internal prototype to avoid an error.
11593 Use char because int might match the return type of a GCC
11594 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011595#ifdef __cplusplus
11596extern "C"
11597#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011598char forkpty ();
11599int
11600main ()
11601{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011603 ;
11604 return 0;
11605}
11606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011607if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011608 ac_cv_lib_bsd_forkpty=yes
11609else
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011611fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011612rm -f core conftest.err conftest.$ac_objext \
11613 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011614LIBS=$ac_check_lib_save_LIBS
11615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11617$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011618if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011619 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011620 LIBS="$LIBS -lbsd"
11621fi
11622
11623
11624fi
11625
Fred Drake8cef4cf2000-06-28 16:40:38 +000011626
11627fi
11628done
11629
Jack Jansendd19cf82001-12-06 22:36:17 +000011630
Christian Heimesb186d002008-03-18 15:15:01 +000011631# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011632for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011633do :
11634 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011635if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011636 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011637#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011638_ACEOF
11639
11640fi
11641done
11642
11643
Michael W. Hudson54241132001-12-07 15:38:26 +000011644# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011645for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011646do :
11647 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11648ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011649if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011650 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011651#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011652_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011653
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011654fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011655done
11656
Michael W. Hudson54241132001-12-07 15:38:26 +000011657
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011658ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011659if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011660 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011661
Martin v. Löwis1142de32002-03-29 16:28:31 +000011662else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011664 *" dup2.$ac_objext "* ) ;;
11665 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011666 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011667esac
11668
Martin v. Löwis1142de32002-03-29 16:28:31 +000011669fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011670
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011671ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011672if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011673 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11674
11675else
11676 case " $LIBOBJS " in
11677 *" strdup.$ac_objext "* ) ;;
11678 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11679 ;;
11680esac
11681
11682fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011683
11684
11685for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011686do :
11687 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011688if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011690#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011693/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011694#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011695int
11696main ()
11697{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011698getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011699 ;
11700 return 0;
11701}
11702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011704
Matthias Kloseb9621712010-04-24 17:59:49 +000011705$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011706
Guido van Rossum627b2d71993-12-24 10:39:16 +000011707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011709
Guido van Rossum627b2d71993-12-24 10:39:16 +000011710fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011711done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011712
Jack Jansen150753c2003-03-29 22:07:47 +000011713for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011714do :
11715 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011716if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011717 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011718#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011721/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011722#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011723int
11724main ()
11725{
11726setpgrp(0,0);
11727 ;
11728 return 0;
11729}
11730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011732
Matthias Kloseb9621712010-04-24 17:59:49 +000011733$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011734
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011737
11738fi
11739done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011740
Thomas Wouters3a584202000-08-05 23:28:51 +000011741for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011742do :
11743 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011744if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011749/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011750#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011751int
11752main ()
11753{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011754gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 ;
11756 return 0;
11757}
11758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011759if ac_fn_c_try_compile "$LINENO"; then :
11760
Guido van Rossum627b2d71993-12-24 10:39:16 +000011761else
Skip Montanaro6dead952003-09-25 14:50:04 +000011762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011764
Martin v. Löwis11437992002-04-12 09:54:03 +000011765
Guido van Rossum627b2d71993-12-24 10:39:16 +000011766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011768
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011769fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011770done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011771
Michael W. Hudson54241132001-12-07 15:38:26 +000011772
Victor Stinnere0be4232011-10-25 13:06:09 +020011773for ac_func in clock_gettime
11774do :
11775 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11776if test "x$ac_cv_func_clock_gettime" = xyes; then :
11777 cat >>confdefs.h <<_ACEOF
11778#define HAVE_CLOCK_GETTIME 1
11779_ACEOF
11780
11781else
11782
11783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11784$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11785if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11786 $as_echo_n "(cached) " >&6
11787else
11788 ac_check_lib_save_LIBS=$LIBS
11789LIBS="-lrt $LIBS"
11790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11791/* end confdefs.h. */
11792
11793/* Override any GCC internal prototype to avoid an error.
11794 Use char because int might match the return type of a GCC
11795 builtin and then its argument prototype would still apply. */
11796#ifdef __cplusplus
11797extern "C"
11798#endif
11799char clock_gettime ();
11800int
11801main ()
11802{
11803return clock_gettime ();
11804 ;
11805 return 0;
11806}
11807_ACEOF
11808if ac_fn_c_try_link "$LINENO"; then :
11809 ac_cv_lib_rt_clock_gettime=yes
11810else
11811 ac_cv_lib_rt_clock_gettime=no
11812fi
11813rm -f core conftest.err conftest.$ac_objext \
11814 conftest$ac_exeext conftest.$ac_ext
11815LIBS=$ac_check_lib_save_LIBS
11816fi
11817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11818$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11819if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11820
11821 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11822
11823
11824$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11825
11826
11827fi
11828
11829
11830fi
11831done
11832
11833
11834for ac_func in clock_getres
11835do :
11836 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11837if test "x$ac_cv_func_clock_getres" = xyes; then :
11838 cat >>confdefs.h <<_ACEOF
11839#define HAVE_CLOCK_GETRES 1
11840_ACEOF
11841
11842else
11843
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11845$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11846if ${ac_cv_lib_rt_clock_getres+:} false; then :
11847 $as_echo_n "(cached) " >&6
11848else
11849 ac_check_lib_save_LIBS=$LIBS
11850LIBS="-lrt $LIBS"
11851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11852/* end confdefs.h. */
11853
11854/* Override any GCC internal prototype to avoid an error.
11855 Use char because int might match the return type of a GCC
11856 builtin and then its argument prototype would still apply. */
11857#ifdef __cplusplus
11858extern "C"
11859#endif
11860char clock_getres ();
11861int
11862main ()
11863{
11864return clock_getres ();
11865 ;
11866 return 0;
11867}
11868_ACEOF
11869if ac_fn_c_try_link "$LINENO"; then :
11870 ac_cv_lib_rt_clock_getres=yes
11871else
11872 ac_cv_lib_rt_clock_getres=no
11873fi
11874rm -f core conftest.err conftest.$ac_objext \
11875 conftest$ac_exeext conftest.$ac_ext
11876LIBS=$ac_check_lib_save_LIBS
11877fi
11878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11879$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11880if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11881
11882 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11883
11884
11885fi
11886
11887
11888fi
11889done
11890
11891
Matthias Kloseb9621712010-04-24 17:59:49 +000011892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11893$as_echo_n "checking for major... " >&6; }
11894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011895/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011896
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011897#if defined(MAJOR_IN_MKDEV)
11898#include <sys/mkdev.h>
11899#elif defined(MAJOR_IN_SYSMACROS)
11900#include <sys/sysmacros.h>
11901#else
11902#include <sys/types.h>
11903#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011904
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011905int
11906main ()
11907{
11908
11909 makedev(major(0),minor(0));
11910
11911 ;
11912 return 0;
11913}
11914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011915if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011916
11917
Matthias Kloseb9621712010-04-24 17:59:49 +000011918$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011919
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11921$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011922
11923else
Skip Montanaro6dead952003-09-25 14:50:04 +000011924
Matthias Kloseb9621712010-04-24 17:59:49 +000011925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11926$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011927
11928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011929rm -f core conftest.err conftest.$ac_objext \
11930 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011931
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011932# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011933# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11935$as_echo_n "checking for getaddrinfo... " >&6; }
11936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011937/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011938
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011939#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011940#include <sys/socket.h>
11941#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011942#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011943
Martin v. Löwis11437992002-04-12 09:54:03 +000011944int
11945main ()
11946{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011947getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011948 ;
11949 return 0;
11950}
11951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011952if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011953 have_getaddrinfo=yes
11954else
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011957rm -f core conftest.err conftest.$ac_objext \
11958 conftest$ac_exeext conftest.$ac_ext
11959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11960$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011961if test $have_getaddrinfo = yes
11962then
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11964$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011965 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011966 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011967else
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011969
11970if test "${enable_ipv6+set}" = set; then
11971 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11972else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011973 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011974fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011975else
Matthias Kloseb9621712010-04-24 17:59:49 +000011976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011977/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011978
Stefan Krah19c21392012-11-22 23:47:32 +010011979#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011980#include <sys/types.h>
11981#include <netdb.h>
11982#include <string.h>
11983#include <sys/socket.h>
11984#include <netinet/in.h>
11985
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011986int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011987{
11988 int passive, gaierr, inet4 = 0, inet6 = 0;
11989 struct addrinfo hints, *ai, *aitop;
11990 char straddr[INET6_ADDRSTRLEN], strport[16];
11991
11992 for (passive = 0; passive <= 1; passive++) {
11993 memset(&hints, 0, sizeof(hints));
11994 hints.ai_family = AF_UNSPEC;
11995 hints.ai_flags = passive ? AI_PASSIVE : 0;
11996 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011997 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011998 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11999 (void)gai_strerror(gaierr);
12000 goto bad;
12001 }
12002 for (ai = aitop; ai; ai = ai->ai_next) {
12003 if (ai->ai_addr == NULL ||
12004 ai->ai_addrlen == 0 ||
12005 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12006 straddr, sizeof(straddr), strport, sizeof(strport),
12007 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12008 goto bad;
12009 }
12010 switch (ai->ai_family) {
12011 case AF_INET:
12012 if (strcmp(strport, "54321") != 0) {
12013 goto bad;
12014 }
12015 if (passive) {
12016 if (strcmp(straddr, "0.0.0.0") != 0) {
12017 goto bad;
12018 }
12019 } else {
12020 if (strcmp(straddr, "127.0.0.1") != 0) {
12021 goto bad;
12022 }
12023 }
12024 inet4++;
12025 break;
12026 case AF_INET6:
12027 if (strcmp(strport, "54321") != 0) {
12028 goto bad;
12029 }
12030 if (passive) {
12031 if (strcmp(straddr, "::") != 0) {
12032 goto bad;
12033 }
12034 } else {
12035 if (strcmp(straddr, "::1") != 0) {
12036 goto bad;
12037 }
12038 }
12039 inet6++;
12040 break;
12041 case AF_UNSPEC:
12042 goto bad;
12043 break;
12044 default:
12045 /* another family support? */
12046 break;
12047 }
12048 }
12049 }
12050
12051 if (!(inet4 == 0 || inet4 == 2))
12052 goto bad;
12053 if (!(inet6 == 0 || inet6 == 2))
12054 goto bad;
12055
12056 if (aitop)
12057 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012058 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012059
12060 bad:
12061 if (aitop)
12062 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012063 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012064}
12065
Martin v. Löwis11437992002-04-12 09:54:03 +000012066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012067if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012068 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012069else
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12073 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012075
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012076fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012077
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12081$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12082
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012083if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012084then
12085 if test $ipv6 = yes
12086 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012087 echo 'Fatal: You must get working getaddrinfo() function.'
12088 echo ' or you can specify "--disable-ipv6"'.
12089 exit 1
12090 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012091else
Martin v. Löwis11437992002-04-12 09:54:03 +000012092
Matthias Kloseb9621712010-04-24 17:59:49 +000012093$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012094
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012095fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012096
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012097for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012098do :
12099 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012100if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012102#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012103_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012104
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012105fi
12106done
12107
Michael W. Hudson54241132001-12-07 15:38:26 +000012108
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012109# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12111$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012112if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012116/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012117#include <sys/types.h>
12118#include <sys/time.h>
12119#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012120
Martin v. Löwis11437992002-04-12 09:54:03 +000012121int
12122main ()
12123{
12124if ((struct tm *) 0)
12125return 0;
12126 ;
12127 return 0;
12128}
12129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012130if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012131 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12138$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012139if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012140
Matthias Kloseb9621712010-04-24 17:59:49 +000012141$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012142
12143fi
12144
Matthias Kloseb9621712010-04-24 17:59:49 +000012145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12146$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012147if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012151/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012152#include <sys/types.h>
12153#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012154
Martin v. Löwis11437992002-04-12 09:54:03 +000012155int
12156main ()
12157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012158struct tm tm;
12159 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 ;
12162 return 0;
12163}
12164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012165if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166 ac_cv_struct_tm=time.h
12167else
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12173$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012174if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012175
Matthias Kloseb9621712010-04-24 17:59:49 +000012176$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012177
12178fi
12179
Matthias Kloseb9621712010-04-24 17:59:49 +000012180ac_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 +000012181#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012182
Matthias Kloseb9621712010-04-24 17:59:49 +000012183"
Victor Stinnere0be4232011-10-25 13:06:09 +020012184if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012185
12186cat >>confdefs.h <<_ACEOF
12187#define HAVE_STRUCT_TM_TM_ZONE 1
12188_ACEOF
12189
12190
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012191fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012192
Martin v. Löwis11437992002-04-12 09:54:03 +000012193if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12194
Matthias Kloseb9621712010-04-24 17:59:49 +000012195$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012196
12197else
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12199"
Victor Stinnere0be4232011-10-25 13:06:09 +020012200if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012202else
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012204fi
12205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012207#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208_ACEOF
12209
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12211$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012212if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214else
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012216/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218#if !HAVE_DECL_TZNAME
12219extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012221
Martin v. Löwis11437992002-04-12 09:54:03 +000012222int
12223main ()
12224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 ;
12227 return 0;
12228}
12229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012230if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012231 ac_cv_var_tzname=yes
12232else
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012235rm -f core conftest.err conftest.$ac_objext \
12236 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12239$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012240 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012241
Matthias Kloseb9621712010-04-24 17:59:49 +000012242$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012243
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012244 fi
12245fi
12246
Matthias Kloseb9621712010-04-24 17:59:49 +000012247ac_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 +020012248if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012249
12250cat >>confdefs.h <<_ACEOF
12251#define HAVE_STRUCT_STAT_ST_RDEV 1
12252_ACEOF
12253
12254
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012255fi
12256
Matthias Kloseb9621712010-04-24 17:59:49 +000012257ac_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 +020012258if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012259
Martin v. Löwis11437992002-04-12 09:54:03 +000012260cat >>confdefs.h <<_ACEOF
12261#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12262_ACEOF
12263
12264
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012265fi
12266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267ac_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 +020012268if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012269
12270cat >>confdefs.h <<_ACEOF
12271#define HAVE_STRUCT_STAT_ST_FLAGS 1
12272_ACEOF
12273
12274
12275fi
12276
Matthias Kloseb9621712010-04-24 17:59:49 +000012277ac_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 +020012278if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012279
12280cat >>confdefs.h <<_ACEOF
12281#define HAVE_STRUCT_STAT_ST_GEN 1
12282_ACEOF
12283
12284
12285fi
12286
Matthias Kloseb9621712010-04-24 17:59:49 +000012287ac_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 +020012288if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012289
12290cat >>confdefs.h <<_ACEOF
12291#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12292_ACEOF
12293
12294
12295fi
12296
Matthias Kloseb9621712010-04-24 17:59:49 +000012297ac_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 +020012298if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012299
Martin v. Löwis11437992002-04-12 09:54:03 +000012300cat >>confdefs.h <<_ACEOF
12301#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12302_ACEOF
12303
12304
Matthias Kloseb9621712010-04-24 17:59:49 +000012305$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012306
12307else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012309 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012310 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12311 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012312esac
12313
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012314fi
12315
Michael W. Hudson54241132001-12-07 15:38:26 +000012316
Martin v. Löwis11437992002-04-12 09:54:03 +000012317
Matthias Kloseb9621712010-04-24 17:59:49 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12319$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012320if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012322else
Matthias Kloseb159a552010-04-25 21:00:44 +000012323
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012325/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012326#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012327int
12328main ()
12329{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012330return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012331 ;
12332 return 0;
12333}
12334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012335if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012336 ac_cv_header_time_altzone=yes
12337else
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342fi
12343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12345$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012346if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012347
Matthias Kloseb9621712010-04-24 17:59:49 +000012348$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012349
12350fi
12351
Guido van Rossumda88dad1995-01-26 00:46:29 +000012352was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12354$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012356/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012357
12358#include <sys/types.h>
12359#include <sys/select.h>
12360#include <sys/time.h>
12361
Martin v. Löwis11437992002-04-12 09:54:03 +000012362int
12363main ()
12364{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012365;
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 ;
12367 return 0;
12368}
12369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012371
12372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012374
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012375 was_it_defined=yes
12376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12380$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381
Matthias Kloseb9621712010-04-24 17:59:49 +000012382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12383$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012384if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012385 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012386else
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012388/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012389#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012390int
12391main ()
12392{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012393struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 ;
12395 return 0;
12396}
12397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012399 ac_cv_struct_addrinfo=yes
12400else
Matthias Kloseb9621712010-04-24 17:59:49 +000012401 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12404fi
12405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12407$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012408if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012409
Matthias Kloseb9621712010-04-24 17:59:49 +000012410$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012411
12412fi
12413
Matthias Kloseb9621712010-04-24 17:59:49 +000012414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12415$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012416if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012418else
Matthias Kloseb9621712010-04-24 17:59:49 +000012419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012420/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012421
12422# include <sys/types.h>
12423# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012424int
12425main ()
12426{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012427struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 ;
12429 return 0;
12430}
12431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012432if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012433 ac_cv_struct_sockaddr_storage=yes
12434else
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12438fi
12439
Matthias Kloseb9621712010-04-24 17:59:49 +000012440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12441$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012442if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012443
Matthias Kloseb9621712010-04-24 17:59:49 +000012444$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012445
12446fi
12447
Guido van Rossum627b2d71993-12-24 10:39:16 +000012448# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012449
Matthias Kloseb9621712010-04-24 17:59:49 +000012450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12451$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012452if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012454else
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012457$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012458int
12459main ()
12460{
12461static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012462test_array [0] = 0;
12463return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012464
12465 ;
12466 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012467}
Martin v. Löwis11437992002-04-12 09:54:03 +000012468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012469if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012470 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012471else
Matthias Kloseb9621712010-04-24 17:59:49 +000012472 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12477$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012478if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012480
12481fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012482
Matthias Kloseb9621712010-04-24 17:59:49 +000012483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12484$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012485if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012487else
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012489/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012490
Martin v. Löwis11437992002-04-12 09:54:03 +000012491int
12492main ()
12493{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012494
Martin v. Löwis11437992002-04-12 09:54:03 +000012495#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012496 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012497 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012498 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012499 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500 char const *const *pcpcc;
12501 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 /* NEC SVR4.0.2 mips cc rejects this. */
12503 struct point {int x, y;};
12504 static struct point const zero = {0,0};
12505 /* AIX XL C 1.02.0.0 rejects this.
12506 It does not let you subtract one const X* pointer from another in
12507 an arm of an if-expression whose if-part is not a constant
12508 expression */
12509 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012511 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512 ++pcpcc;
12513 ppc = (char**) pcpcc;
12514 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012515 { /* SCO 3.2v4 cc rejects this sort of thing. */
12516 char tx;
12517 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012522 }
12523 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12524 int x[] = {25, 17};
12525 const int *foo = &x[0];
12526 ++foo;
12527 }
12528 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12529 typedef const int *iptr;
12530 iptr p = 0;
12531 ++p;
12532 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012533 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012535 struct s { int j; const int *ap[3]; } bx;
12536 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 }
12538 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12539 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012541 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012543#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012544
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 ;
12546 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012547}
Martin v. Löwis11437992002-04-12 09:54:03 +000012548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012549if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012550 ac_cv_c_const=yes
12551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12557$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012558if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012559
Matthias Kloseb9621712010-04-24 17:59:49 +000012560$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012561
12562fi
12563
Michael W. Hudson54241132001-12-07 15:38:26 +000012564
Guido van Rossumda88dad1995-01-26 00:46:29 +000012565works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12567$as_echo_n "checking for working volatile... " >&6; }
12568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012569/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012570
Martin v. Löwis11437992002-04-12 09:54:03 +000012571int
12572main ()
12573{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012574volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012575 ;
12576 return 0;
12577}
12578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012579if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012580 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012581else
Skip Montanaro6dead952003-09-25 14:50:04 +000012582
Matthias Kloseb9621712010-04-24 17:59:49 +000012583$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012584
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012585
Guido van Rossum627b2d71993-12-24 10:39:16 +000012586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12589$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012590
Guido van Rossumda88dad1995-01-26 00:46:29 +000012591works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12593$as_echo_n "checking for working signed char... " >&6; }
12594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012595/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012596
Martin v. Löwis11437992002-04-12 09:54:03 +000012597int
12598main ()
12599{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012600signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 ;
12602 return 0;
12603}
12604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012605if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012606 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012607else
Skip Montanaro6dead952003-09-25 14:50:04 +000012608
Matthias Kloseb9621712010-04-24 17:59:49 +000012609$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012610
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012611
Guido van Rossum7f43da71994-08-01 12:15:30 +000012612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12615$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012616
Guido van Rossumda88dad1995-01-26 00:46:29 +000012617have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12619$as_echo_n "checking for prototypes... " >&6; }
12620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012621/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012622int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012623int
12624main ()
12625{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012626return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 ;
12628 return 0;
12629}
12630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012634
Matthias Kloseb159a552010-04-25 21:00:44 +000012635 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12639$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012640
Guido van Rossumda88dad1995-01-26 00:46:29 +000012641works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12643$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012645/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012646
12647#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012648int foo(int x, ...) {
12649 va_list va;
12650 va_start(va, x);
12651 va_arg(va, int);
12652 va_arg(va, char *);
12653 va_arg(va, double);
12654 return 0;
12655}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012656
Martin v. Löwis11437992002-04-12 09:54:03 +000012657int
12658main ()
12659{
Guido van Rossum90eea071996-08-30 20:58:57 +000012660return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012661 ;
12662 return 0;
12663}
12664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012666
12667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012669
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012670 works=yes
12671
Guido van Rossum627b2d71993-12-24 10:39:16 +000012672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12675$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012676
Martin v. Löwisd6320502004-08-12 13:45:08 +000012677# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12679$as_echo_n "checking for socketpair... " >&6; }
12680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012681/* end confdefs.h. */
12682
12683#include <sys/types.h>
12684#include <sys/socket.h>
12685
12686int
12687main ()
12688{
12689void *x=socketpair
12690 ;
12691 return 0;
12692}
12693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012694if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012695
Matthias Kloseb9621712010-04-24 17:59:49 +000012696$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012697
Matthias Kloseb159a552010-04-25 21:00:44 +000012698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012699$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012700else
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12702$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012703
12704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012706
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012707# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12709$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012711/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012712#include <sys/types.h>
12713#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012714int
12715main ()
12716{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012717struct sockaddr x;
12718x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 ;
12720 return 0;
12721}
12722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012723if ac_fn_c_try_compile "$LINENO"; then :
12724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12725$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012726
Matthias Kloseb9621712010-04-24 17:59:49 +000012727$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012728
12729else
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12731$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012732
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012735
Guido van Rossumda88dad1995-01-26 00:46:29 +000012736va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12738$as_echo_n "checking whether va_list is an array... " >&6; }
12739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012740/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012741
12742#ifdef HAVE_STDARG_PROTOTYPES
12743#include <stdarg.h>
12744#else
12745#include <varargs.h>
12746#endif
12747
Martin v. Löwis11437992002-04-12 09:54:03 +000012748int
12749main ()
12750{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012752 ;
12753 return 0;
12754}
12755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012756if ac_fn_c_try_compile "$LINENO"; then :
12757
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758else
Skip Montanaro6dead952003-09-25 14:50:04 +000012759
Martin v. Löwis11437992002-04-12 09:54:03 +000012760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012762
Guido van Rossumda88dad1995-01-26 00:46:29 +000012763 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012764
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12768$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012770# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012771
12772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012774if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12779$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012780 OLD_CFLAGS=$CFLAGS
12781 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012783/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012784
12785# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012786
Martin v. Löwis11437992002-04-12 09:54:03 +000012787int
12788main ()
12789{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012790
12791 char *name;
12792 struct hostent *he, *res;
12793 char buffer[2048];
12794 int buflen = 2048;
12795 int h_errnop;
12796
12797 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
12799 ;
12800 return 0;
12801}
12802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012803if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012806
Martin v. Löwis11437992002-04-12 09:54:03 +000012807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12811$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012812
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012813else
Skip Montanaro6dead952003-09-25 14:50:04 +000012814
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12816$as_echo "no" >&6; }
12817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12818$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012820/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012821
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012822# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012823
Martin v. Löwis11437992002-04-12 09:54:03 +000012824int
12825main ()
12826{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012827
12828 char *name;
12829 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012830 char buffer[2048];
12831 int buflen = 2048;
12832 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012833
Matthias Kloseb159a552010-04-25 21:00:44 +000012834 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012835
12836 ;
12837 return 0;
12838}
12839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012843
Martin v. Löwis11437992002-04-12 09:54:03 +000012844
Matthias Kloseb159a552010-04-25 21:00:44 +000012845$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12848$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012849
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012850else
Skip Montanaro6dead952003-09-25 14:50:04 +000012851
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12853$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12855$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12857/* end confdefs.h. */
12858
12859# include <netdb.h>
12860
12861int
12862main ()
12863{
12864
12865 char *name;
12866 struct hostent *he;
12867 struct hostent_data data;
12868
12869 (void) gethostbyname_r(name, he, &data);
12870
12871 ;
12872 return 0;
12873}
12874_ACEOF
12875if ac_fn_c_try_compile "$LINENO"; then :
12876
12877 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12878
12879
12880$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12881
12882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12883$as_echo "yes" >&6; }
12884
12885else
12886
12887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12888$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012889
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012895
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012898 CFLAGS=$OLD_CFLAGS
12899
12900else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 for ac_func in gethostbyname
12903do :
12904 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012905if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012907#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012908_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012909
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012910fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012911done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012912
Michael W. Hudson54241132001-12-07 15:38:26 +000012913
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012914fi
12915
Michael W. Hudson54241132001-12-07 15:38:26 +000012916
12917
12918
12919
12920
12921
Guido van Rossum627b2d71993-12-24 10:39:16 +000012922# checks for system services
12923# (none yet)
12924
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012925# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012926ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012927if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012928
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012929else
Matthias Kloseb9621712010-04-24 17:59:49 +000012930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12931$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012932if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012934else
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012936LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940/* Override any GCC internal prototype to avoid an error.
12941 Use char because int might match the return type of a GCC
12942 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012943#ifdef __cplusplus
12944extern "C"
12945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012946char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012947int
12948main ()
12949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 ;
12952 return 0;
12953}
12954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012955if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012956 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012957else
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012960rm -f core conftest.err conftest.$ac_objext \
12961 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012962LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12965$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012966if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 cat >>confdefs.h <<_ACEOF
12968#define HAVE_LIBIEEE 1
12969_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012971 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012972
Guido van Rossum627b2d71993-12-24 10:39:16 +000012973fi
12974
Michael W. Hudson54241132001-12-07 15:38:26 +000012975
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012976fi
12977
Michael W. Hudson54241132001-12-07 15:38:26 +000012978
Guido van Rossum7f253911997-05-09 02:42:48 +000012979# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12981$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012984if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012985 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012986if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012987then
12988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012990
Matthias Kloseb9621712010-04-24 17:59:49 +000012991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12992$as_echo "yes" >&6; }
12993else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12994$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012995fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012996else
Matthias Kloseb9621712010-04-24 17:59:49 +000012997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12998$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012999fi
13000
Guido van Rossum7f253911997-05-09 02:42:48 +000013001
Guido van Rossum7f43da71994-08-01 12:15:30 +000013002# check for --with-libm=...
13003
Guido van Rossum563e7081996-09-10 18:20:48 +000013004case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013005Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013006*) LIBM=-lm
13007esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13009$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013011# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013012if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013013 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013014if test "$withval" = no
13015then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13017$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013018elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013019then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13021$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013022else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013023fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013024else
Matthias Kloseb9621712010-04-24 17:59:49 +000013025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13026$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013027fi
13028
Guido van Rossum7f43da71994-08-01 12:15:30 +000013029
13030# check for --with-libc=...
13031
Matthias Kloseb9621712010-04-24 17:59:49 +000013032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13033$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013035# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013036if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013037 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013038if test "$withval" = no
13039then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13041$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013042elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013043then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13045$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013046else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013047fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013048else
Matthias Kloseb9621712010-04-24 17:59:49 +000013049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13050$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013051fi
13052
Guido van Rossum7f43da71994-08-01 12:15:30 +000013053
Stefan Krah1919b7e2012-03-21 18:25:23 +010013054# **************************************
13055# * Check for gcc x64 inline assembler *
13056# **************************************
13057
13058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13059$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13061/* end confdefs.h. */
13062
13063int
13064main ()
13065{
13066
13067 __asm__ __volatile__ ("movq %rcx, %rax");
13068
13069 ;
13070 return 0;
13071}
13072_ACEOF
13073if ac_fn_c_try_compile "$LINENO"; then :
13074 have_gcc_asm_for_x64=yes
13075else
13076 have_gcc_asm_for_x64=no
13077fi
13078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13080$as_echo "$have_gcc_asm_for_x64" >&6; }
13081if test "$have_gcc_asm_for_x64" = yes
13082then
13083
13084$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13085
13086fi
13087
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013088# **************************************************
13089# * Check for various properties of floating point *
13090# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13093$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013094if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013096else
13097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013099 ac_cv_little_endian_double=no
13100else
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013102/* end confdefs.h. */
13103
13104#include <string.h>
13105int main() {
13106 double x = 9006104071832581.0;
13107 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13108 return 0;
13109 else
13110 return 1;
13111}
13112
13113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013114if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013115 ac_cv_little_endian_double=yes
13116else
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13120 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013121fi
13122
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013123fi
13124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13126$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013127if test "$ac_cv_little_endian_double" = yes
13128then
13129
Matthias Kloseb9621712010-04-24 17:59:49 +000013130$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013131
13132fi
13133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13135$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013136if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013138else
13139
Matthias Kloseb9621712010-04-24 17:59:49 +000013140if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013141 ac_cv_big_endian_double=no
13142else
Matthias Kloseb9621712010-04-24 17:59:49 +000013143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013144/* end confdefs.h. */
13145
13146#include <string.h>
13147int main() {
13148 double x = 9006104071832581.0;
13149 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13150 return 0;
13151 else
13152 return 1;
13153}
13154
13155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013156if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013157 ac_cv_big_endian_double=yes
13158else
Matthias Kloseb9621712010-04-24 17:59:49 +000013159 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13162 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013163fi
13164
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013165fi
13166
Matthias Kloseb9621712010-04-24 17:59:49 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13168$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013169if test "$ac_cv_big_endian_double" = yes
13170then
13171
Matthias Kloseb9621712010-04-24 17:59:49 +000013172$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013173
13174fi
13175
13176# Some ARM platforms use a mixed-endian representation for doubles.
13177# While Python doesn't currently have full support for these platforms
13178# (see e.g., issue 1762561), we can at least make sure that float <-> string
13179# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13181$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013182if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013184else
13185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013187 ac_cv_mixed_endian_double=no
13188else
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013190/* end confdefs.h. */
13191
13192#include <string.h>
13193int main() {
13194 double x = 9006104071832581.0;
13195 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13196 return 0;
13197 else
13198 return 1;
13199}
13200
13201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013202if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013203 ac_cv_mixed_endian_double=yes
13204else
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13208 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013209fi
13210
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013211fi
13212
Matthias Kloseb9621712010-04-24 17:59:49 +000013213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13214$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013215if test "$ac_cv_mixed_endian_double" = yes
13216then
13217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013219
13220fi
13221
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013222# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013223# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013224# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013225# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013226# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013227# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013228
13229# This inline assembler syntax may also work for suncc and icc,
13230# so we try it on all platforms.
13231
Matthias Kloseb9621712010-04-24 17:59:49 +000013232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13233$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013235/* end confdefs.h. */
13236
13237int
13238main ()
13239{
13240
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013241 unsigned short cw;
13242 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13243 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013244
13245 ;
13246 return 0;
13247}
13248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013249if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013250 have_gcc_asm_for_x87=yes
13251else
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013253fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13256$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013257if test "$have_gcc_asm_for_x87" = yes
13258then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013259
Matthias Kloseb9621712010-04-24 17:59:49 +000013260$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013261
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013263
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013264# Detect whether system arithmetic is subject to x87-style double
13265# rounding issues. The result of this test has little meaning on non
13266# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13267# mode is round-to-nearest and double rounding issues are present, and
13268# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13270$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013271# $BASECFLAGS may affect the result
13272ac_save_cc="$CC"
13273CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013274if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013275 ac_cv_x87_double_rounding=no
13276else
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013278/* end confdefs.h. */
13279
13280#include <stdlib.h>
13281#include <math.h>
13282int main() {
13283 volatile double x, y, z;
13284 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13285 x = 0.99999999999999989; /* 1-2**-53 */
13286 y = 1./x;
13287 if (y != 1.)
13288 exit(0);
13289 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13290 x = 1e16;
13291 y = 2.99999;
13292 z = x + y;
13293 if (z != 1e16+4.)
13294 exit(0);
13295 /* both tests show evidence of double rounding */
13296 exit(1);
13297}
13298
13299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013300if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013301 ac_cv_x87_double_rounding=no
13302else
Matthias Kloseb9621712010-04-24 17:59:49 +000013303 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13306 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013307fi
13308
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013309CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13311$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013312if test "$ac_cv_x87_double_rounding" = yes
13313then
13314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013316
13317fi
13318
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013319# ************************************
13320# * Check for mathematical functions *
13321# ************************************
13322
13323LIBS_SAVE=$LIBS
13324LIBS="$LIBS $LIBM"
13325
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013326for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13327do :
13328 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13329ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013330if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013331 cat >>confdefs.h <<_ACEOF
13332#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13333_ACEOF
13334
13335fi
13336done
13337
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013338for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013339do :
13340 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13341ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013342if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013343 cat >>confdefs.h <<_ACEOF
13344#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13345_ACEOF
13346
13347fi
13348done
13349
13350ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13351"
Victor Stinnere0be4232011-10-25 13:06:09 +020013352if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013353 ac_have_decl=1
13354else
13355 ac_have_decl=0
13356fi
13357
13358cat >>confdefs.h <<_ACEOF
13359#define HAVE_DECL_ISINF $ac_have_decl
13360_ACEOF
13361ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13362"
Victor Stinnere0be4232011-10-25 13:06:09 +020013363if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013364 ac_have_decl=1
13365else
13366 ac_have_decl=0
13367fi
13368
13369cat >>confdefs.h <<_ACEOF
13370#define HAVE_DECL_ISNAN $ac_have_decl
13371_ACEOF
13372ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13373"
Victor Stinnere0be4232011-10-25 13:06:09 +020013374if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013375 ac_have_decl=1
13376else
13377 ac_have_decl=0
13378fi
13379
13380cat >>confdefs.h <<_ACEOF
13381#define HAVE_DECL_ISFINITE $ac_have_decl
13382_ACEOF
13383
13384
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013385# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13386# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13388$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013389if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013391else
13392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013394 ac_cv_tanh_preserves_zero_sign=no
13395else
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013397/* end confdefs.h. */
13398
13399#include <math.h>
13400#include <stdlib.h>
13401int main() {
13402 /* return 0 if either negative zeros don't exist
13403 on this platform or if negative zeros exist
13404 and tanh(-0.) == -0. */
13405 if (atan2(0., -1.) == atan2(-0., -1.) ||
13406 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13407 else exit(1);
13408}
13409
13410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013411if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013412 ac_cv_tanh_preserves_zero_sign=yes
13413else
Matthias Kloseb9621712010-04-24 17:59:49 +000013414 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13417 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013418fi
13419
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013420fi
13421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13423$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013424if test "$ac_cv_tanh_preserves_zero_sign" = yes
13425then
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013428
13429fi
13430
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013431if test "$ac_cv_func_log1p" = yes
13432then
13433 # On some versions of AIX, log1p(-0.) returns 0. instead of
13434 # -0. See issue #9920.
13435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13436$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013437 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013438 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013439else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013440
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013441 if test "$cross_compiling" = yes; then :
13442 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013443else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13445/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013446
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013447 #include <math.h>
13448 #include <stdlib.h>
13449 int main() {
13450 /* Fail if the signs of log1p(-0.) and -0. can be
13451 distinguished. */
13452 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13453 return 0;
13454 else
13455 return 1;
13456 }
13457
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013458_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013459if ac_fn_c_try_run "$LINENO"; then :
13460 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013461else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013462 ac_cv_log1p_drops_zero_sign=yes
13463fi
13464rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13465 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013466fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013467
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013468fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013469
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13471$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13472fi
13473if test "$ac_cv_log1p_drops_zero_sign" = yes
13474then
13475
13476$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13477
13478fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013479
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013480LIBS=$LIBS_SAVE
13481
Mark Dickinsona614f042009-11-28 12:48:43 +000013482# For multiprocessing module, check that sem_open
13483# actually works. For FreeBSD versions <= 7.2,
13484# the kernel module that provides POSIX semaphores
13485# isn't loaded by default, so an attempt to call
13486# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13488$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013489if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013491else
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013493 ac_cv_posix_semaphores_enabled=yes
13494else
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013496/* end confdefs.h. */
13497
13498#include <unistd.h>
13499#include <fcntl.h>
13500#include <stdio.h>
13501#include <semaphore.h>
13502#include <sys/stat.h>
13503
13504int main(void) {
13505 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13506 if (a == SEM_FAILED) {
13507 perror("sem_open");
13508 return 1;
13509 }
13510 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013511 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013512 return 0;
13513}
13514
13515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013516if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013517 ac_cv_posix_semaphores_enabled=yes
13518else
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13522 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013523fi
13524
13525
Mark Dickinsona614f042009-11-28 12:48:43 +000013526fi
13527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13529$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013530if test $ac_cv_posix_semaphores_enabled = no
13531then
13532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013534
13535fi
13536
Mark Dickinson10683072009-04-18 21:18:19 +000013537# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13539$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013540if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013544 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013545else
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013547/* end confdefs.h. */
13548
13549#include <unistd.h>
13550#include <fcntl.h>
13551#include <stdio.h>
13552#include <semaphore.h>
13553#include <sys/stat.h>
13554
13555int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013556 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013557 int count;
13558 int res;
13559 if(a==SEM_FAILED){
13560 perror("sem_open");
13561 return 1;
13562
13563 }
13564 res = sem_getvalue(a, &count);
13565 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013566 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013567 return res==-1 ? 1 : 0;
13568}
13569
Mark Dickinson10683072009-04-18 21:18:19 +000013570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013571if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013572 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13577 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013578fi
13579
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013580
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013581fi
13582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13584$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013585if test $ac_cv_broken_sem_getvalue = yes
13586then
13587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013589
13590fi
13591
Mark Dickinsonbd792642009-03-18 20:06:12 +000013592# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13594$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013595# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013597 enableval=$enable_big_digits; case $enable_big_digits in
13598yes)
13599 enable_big_digits=30 ;;
13600no)
13601 enable_big_digits=15 ;;
1360215|30)
13603 ;;
13604*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013605 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 +000013606esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13608$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013609
13610cat >>confdefs.h <<_ACEOF
13611#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13612_ACEOF
13613
13614
13615else
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13617$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013618fi
13619
13620
Guido van Rossumef2255b2000-03-10 22:30:29 +000013621# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013622ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013623if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013624
13625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013627
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013628 wchar_h="yes"
13629
Guido van Rossumef2255b2000-03-10 22:30:29 +000013630else
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013632
13633fi
13634
Michael W. Hudson54241132001-12-07 15:38:26 +000013635
Martin v. Löwis11437992002-04-12 09:54:03 +000013636
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013637# determine wchar_t size
13638if test "$wchar_h" = yes
13639then
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13643# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13645$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013646if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013648else
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13650"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652else
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 if test "$ac_cv_type_wchar_t" = yes; then
13654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013656as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013657See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013658 else
13659 ac_cv_sizeof_wchar_t=0
13660 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013662
Martin v. Löwis11437992002-04-12 09:54:03 +000013663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13665$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013666
13667
13668
Martin v. Löwis11437992002-04-12 09:54:03 +000013669cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013670#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013671_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013672
Michael W. Hudson54241132001-12-07 15:38:26 +000013673
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013674fi
13675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13677$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013678have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013680/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013681
13682#include <tcl.h>
13683#if TCL_UTF_MAX != 6
13684# error "NOT UCS4_TCL"
13685#endif
13686int
13687main ()
13688{
13689
13690 ;
13691 return 0;
13692}
13693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013694if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013695
13696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013698
13699 have_ucs4_tcl=yes
13700
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13704$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013705
Skip Montanaro6dead952003-09-25 14:50:04 +000013706# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013707if test "$wchar_h" = yes
13708then
13709 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13711$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013712 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013714else
13715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013717 ac_cv_wchar_t_signed=yes
13718else
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013720/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013721
13722 #include <wchar.h>
13723 int main()
13724 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013725 /* Success: exit code 0 */
13726 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013727 }
13728
13729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013730if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013731 ac_cv_wchar_t_signed=yes
13732else
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013737fi
13738
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013739fi
13740
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13742$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013743fi
13744
Georg Brandl52d168a2008-01-07 18:10:24 +000013745# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013746if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013747 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013748then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013749 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013750
Matthias Kloseb9621712010-04-24 17:59:49 +000013751$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
Georg Brandl52d168a2008-01-07 18:10:24 +000013753else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013754 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013755fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13757$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013758
13759# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13761$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013762if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013764else
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 ac_cv_c_bigendian=unknown
13766 # See if we're dealing with a universal compiler.
13767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13768/* end confdefs.h. */
13769#ifndef __APPLE_CC__
13770 not a universal capable compiler
13771 #endif
13772 typedef int dummy;
13773
Skip Montanaro6dead952003-09-25 14:50:04 +000013774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013775if ac_fn_c_try_compile "$LINENO"; then :
13776
13777 # Check for potential -arch flags. It is not universal unless
13778 # there are at least two -arch flags with different values.
13779 ac_arch=
13780 ac_prev=
13781 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13782 if test -n "$ac_prev"; then
13783 case $ac_word in
13784 i?86 | x86_64 | ppc | ppc64)
13785 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13786 ac_arch=$ac_word
13787 else
13788 ac_cv_c_bigendian=universal
13789 break
13790 fi
13791 ;;
13792 esac
13793 ac_prev=
13794 elif test "x$ac_word" = "x-arch"; then
13795 ac_prev=arch
13796 fi
13797 done
13798fi
13799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13800 if test $ac_cv_c_bigendian = unknown; then
13801 # See if sys/param.h defines the BYTE_ORDER macro.
13802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013803/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013804#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013806
Martin v. Löwis11437992002-04-12 09:54:03 +000013807int
13808main ()
13809{
Matthias Kloseb9621712010-04-24 17:59:49 +000013810#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13811 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13812 && LITTLE_ENDIAN)
13813 bogus endian macros
13814 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013815
13816 ;
13817 return 0;
13818}
13819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013820if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013821 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013823/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013824#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013825 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013826
Martin v. Löwis11437992002-04-12 09:54:03 +000013827int
13828main ()
13829{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013830#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 not big endian
13832 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013833
13834 ;
13835 return 0;
13836}
13837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013838if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013839 ac_cv_c_bigendian=yes
13840else
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013844fi
13845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13846 fi
13847 if test $ac_cv_c_bigendian = unknown; then
13848 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013850/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013851#include <limits.h>
13852
Martin v. Löwis11437992002-04-12 09:54:03 +000013853int
13854main ()
13855{
Matthias Kloseb9621712010-04-24 17:59:49 +000013856#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13857 bogus endian macros
13858 #endif
13859
Martin v. Löwis11437992002-04-12 09:54:03 +000013860 ;
13861 return 0;
13862}
13863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013864if ac_fn_c_try_compile "$LINENO"; then :
13865 # It does; now see whether it defined to _BIG_ENDIAN or not.
13866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13867/* end confdefs.h. */
13868#include <limits.h>
13869
13870int
13871main ()
13872{
13873#ifndef _BIG_ENDIAN
13874 not big endian
13875 #endif
13876
13877 ;
13878 return 0;
13879}
13880_ACEOF
13881if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013882 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013883else
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13887fi
13888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13889 fi
13890 if test $ac_cv_c_bigendian = unknown; then
13891 # Compile a test program.
13892 if test "$cross_compiling" = yes; then :
13893 # Try to guess by grepping values from an object file.
13894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13895/* end confdefs.h. */
13896short int ascii_mm[] =
13897 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13898 short int ascii_ii[] =
13899 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13900 int use_ascii (int i) {
13901 return ascii_mm[i] + ascii_ii[i];
13902 }
13903 short int ebcdic_ii[] =
13904 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13905 short int ebcdic_mm[] =
13906 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13907 int use_ebcdic (int i) {
13908 return ebcdic_mm[i] + ebcdic_ii[i];
13909 }
13910 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912int
13913main ()
13914{
13915return use_ascii (foo) == use_ebcdic (foo);
13916 ;
13917 return 0;
13918}
13919_ACEOF
13920if ac_fn_c_try_compile "$LINENO"; then :
13921 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13922 ac_cv_c_bigendian=yes
13923 fi
13924 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13925 if test "$ac_cv_c_bigendian" = unknown; then
13926 ac_cv_c_bigendian=no
13927 else
13928 # finding both strings is unlikely to happen, but who knows?
13929 ac_cv_c_bigendian=unknown
13930 fi
13931 fi
13932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013934else
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013936/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013938int
13939main ()
13940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 /* Are we little or big endian? From Harbison&Steele. */
13943 union
13944 {
13945 long int l;
13946 char c[sizeof (long int)];
13947 } u;
13948 u.l = 1;
13949 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950
13951 ;
13952 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013953}
Martin v. Löwis11437992002-04-12 09:54:03 +000013954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013955if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013956 ac_cv_c_bigendian=no
13957else
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13961 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13967$as_echo "$ac_cv_c_bigendian" >&6; }
13968 case $ac_cv_c_bigendian in #(
13969 yes)
13970 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13971;; #(
13972 no)
13973 ;; #(
13974 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 ;; #(
13979 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013980 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013981 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013982 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013983
Michael W. Hudson54241132001-12-07 15:38:26 +000013984
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013985# ABI version string for Python extension modules. This appears between the
13986# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13987# from the following attributes which affect the ABI of this Python build (in
13988# this order):
13989#
13990# * The Python implementation (always 'cpython-' for us)
13991# * The major and minor version numbers
13992# * --with-pydebug (adds a 'd')
13993# * --with-pymalloc (adds a 'm')
13994# * --with-wide-unicode (adds a 'u')
13995#
13996# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013997# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13998# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013999
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14001$as_echo_n "checking ABIFLAGS... " >&6; }
14002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14003$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14005$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014006SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14008$as_echo "$SOABI" >&6; }
14009
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014010
14011case $ac_sys_system in
14012 Linux*|GNU*)
14013 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14014 *)
14015 EXT_SUFFIX=${SHLIB_SUFFIX};;
14016esac
14017
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14019$as_echo_n "checking LDVERSION... " >&6; }
14020LDVERSION='$(VERSION)$(ABIFLAGS)'
14021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14022$as_echo "$LDVERSION" >&6; }
14023
doko@python.org87421192013-01-26 11:39:31 +010014024
14025LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14026
14027
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014028# Check whether right shifting a negative integer extends the sign bit
14029# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14031$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014032if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014033 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014034else
Martin v. Löwis11437992002-04-12 09:54:03 +000014035
Matthias Kloseb9621712010-04-24 17:59:49 +000014036if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014037 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014038else
Matthias Kloseb9621712010-04-24 17:59:49 +000014039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014040/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014041
14042int main()
14043{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014044 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014045}
14046
Martin v. Löwis11437992002-04-12 09:54:03 +000014047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014048if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014049 ac_cv_rshift_extends_sign=yes
14050else
Matthias Kloseb9621712010-04-24 17:59:49 +000014051 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14054 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014055fi
14056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057fi
14058
Matthias Kloseb9621712010-04-24 17:59:49 +000014059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14060$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014061if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014062then
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
Matthias Kloseb9621712010-04-24 17:59:49 +000014064$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014065
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014066fi
14067
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014068# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14070$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014071if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014073else
Martin v. Löwis11437992002-04-12 09:54:03 +000014074
Matthias Kloseb9621712010-04-24 17:59:49 +000014075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014076/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014077#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014078int
14079main ()
14080{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014081
14082 FILE *f = fopen("/dev/null", "r");
14083 flockfile(f);
14084 getc_unlocked(f);
14085 funlockfile(f);
14086
Martin v. Löwis11437992002-04-12 09:54:03 +000014087 ;
14088 return 0;
14089}
14090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014091if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014092 ac_cv_have_getc_unlocked=yes
14093else
Matthias Kloseb9621712010-04-24 17:59:49 +000014094 ac_cv_have_getc_unlocked=no
14095fi
14096rm -f core conftest.err conftest.$ac_objext \
14097 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014099
Matthias Kloseb9621712010-04-24 17:59:49 +000014100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14101$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014102if test "$ac_cv_have_getc_unlocked" = yes
14103then
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
Matthias Kloseb9621712010-04-24 17:59:49 +000014105$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014106
14107fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014108
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014109# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014110# save the value of LIBS so we don't actually link Python with readline
14111LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014112
Gregory P. Smith18820942008-09-07 06:24:49 +000014113# On some systems we need to link readline to a termcap compatible
14114# library. NOTE: Keep the precedence of listed libraries synchronised
14115# with setup.py.
14116py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14118$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014119for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014120 if test -z "$py_libtermcap"; then
14121 READLINE_LIBS="-lreadline"
14122 else
14123 READLINE_LIBS="-lreadline -l$py_libtermcap"
14124 fi
14125 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014127/* end confdefs.h. */
14128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014129/* Override any GCC internal prototype to avoid an error.
14130 Use char because int might match the return type of a GCC
14131 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014132#ifdef __cplusplus
14133extern "C"
14134#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014135char readline ();
14136int
14137main ()
14138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014140 ;
14141 return 0;
14142}
14143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014144if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014145 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014147rm -f core conftest.err conftest.$ac_objext \
14148 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014149 if test $py_cv_lib_readline = yes; then
14150 break
14151 fi
14152done
14153# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14154#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014155if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14157$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014158else
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14160$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014161
Matthias Kloseb9621712010-04-24 17:59:49 +000014162$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014163
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014164fi
14165
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014166# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14168$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014169if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014171else
14172 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014173LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014175/* end confdefs.h. */
14176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014177/* Override any GCC internal prototype to avoid an error.
14178 Use char because int might match the return type of a GCC
14179 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014180#ifdef __cplusplus
14181extern "C"
14182#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014183char rl_callback_handler_install ();
14184int
14185main ()
14186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014187return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014188 ;
14189 return 0;
14190}
14191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014192if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014193 ac_cv_lib_readline_rl_callback_handler_install=yes
14194else
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014197rm -f core conftest.err conftest.$ac_objext \
14198 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014199LIBS=$ac_check_lib_save_LIBS
14200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14202$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014203if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014204
Matthias Kloseb9621712010-04-24 17:59:49 +000014205$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014206
14207fi
14208
14209
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014210# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014212/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014213#include <readline/readline.h>
14214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014215if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014216 have_readline=yes
14217else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014218 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014219
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014220fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014221rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014222if test $have_readline = yes
14223then
Matthias Kloseb9621712010-04-24 17:59:49 +000014224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014225/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014226#include <readline/readline.h>
14227
14228_ACEOF
14229if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014230 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014231
Matthias Kloseb9621712010-04-24 17:59:49 +000014232$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014233
14234fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014235rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014238/* end confdefs.h. */
14239#include <readline/readline.h>
14240
14241_ACEOF
14242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014243 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014244
Matthias Kloseb9621712010-04-24 17:59:49 +000014245$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014246
14247fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014248rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014249
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014250fi
14251
Martin v. Löwis0daad592001-09-30 21:09:59 +000014252# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14254$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014255if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014257else
Martin v. Löwis11437992002-04-12 09:54:03 +000014258 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014259LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263/* Override any GCC internal prototype to avoid an error.
14264 Use char because int might match the return type of a GCC
14265 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014266#ifdef __cplusplus
14267extern "C"
14268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014269char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014270int
14271main ()
14272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014274 ;
14275 return 0;
14276}
14277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014278if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014280else
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014283rm -f core conftest.err conftest.$ac_objext \
14284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014285LIBS=$ac_check_lib_save_LIBS
14286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14288$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014289if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014290
Matthias Kloseb9621712010-04-24 17:59:49 +000014291$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014292
Martin v. Löwis0daad592001-09-30 21:09:59 +000014293fi
14294
Michael W. Hudson54241132001-12-07 15:38:26 +000014295
Thomas Wouters89d996e2007-09-08 17:39:28 +000014296# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14298$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014299if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014300 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014301else
14302 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014303LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014305/* end confdefs.h. */
14306
14307/* Override any GCC internal prototype to avoid an error.
14308 Use char because int might match the return type of a GCC
14309 builtin and then its argument prototype would still apply. */
14310#ifdef __cplusplus
14311extern "C"
14312#endif
14313char rl_completion_display_matches_hook ();
14314int
14315main ()
14316{
14317return rl_completion_display_matches_hook ();
14318 ;
14319 return 0;
14320}
14321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014322if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014323 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14324else
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014327rm -f core conftest.err conftest.$ac_objext \
14328 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014329LIBS=$ac_check_lib_save_LIBS
14330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14332$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014333if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014334
Matthias Kloseb9621712010-04-24 17:59:49 +000014335$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014336
14337fi
14338
14339
Martin v. Löwis0daad592001-09-30 21:09:59 +000014340# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14342$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014343if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014345else
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014347LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014351/* Override any GCC internal prototype to avoid an error.
14352 Use char because int might match the return type of a GCC
14353 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014354#ifdef __cplusplus
14355extern "C"
14356#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014357char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014358int
14359main ()
14360{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014361return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014362 ;
14363 return 0;
14364}
14365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014366if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014367 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014368else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014371rm -f core conftest.err conftest.$ac_objext \
14372 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014373LIBS=$ac_check_lib_save_LIBS
14374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14376$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014377if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014378
Matthias Kloseb9621712010-04-24 17:59:49 +000014379$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014380
Guido van Rossum353ae582001-07-10 16:45:32 +000014381fi
14382
Jack Jansendd19cf82001-12-06 22:36:17 +000014383
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014384# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014386/* end confdefs.h. */
14387#include <readline/readline.h>
14388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014389if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014390 have_readline=yes
14391else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014392 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014393
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014394fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014395rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014396if test $have_readline = yes
14397then
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014399/* end confdefs.h. */
14400#include <readline/readline.h>
14401
14402_ACEOF
14403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014404 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014405
Matthias Kloseb9621712010-04-24 17:59:49 +000014406$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014407
14408fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014409rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014410
14411fi
14412
Martin v. Löwis82bca632006-02-10 20:49:30 +000014413# End of readline checks: restore LIBS
14414LIBS=$LIBS_no_readline
14415
Matthias Kloseb9621712010-04-24 17:59:49 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14417$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014418if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014420else
Martin v. Löwis11437992002-04-12 09:54:03 +000014421
Matthias Kloseb9621712010-04-24 17:59:49 +000014422if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014423 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014424else
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014426/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014427
14428int main()
14429{
14430 int val1 = nice(1);
14431 if (val1 != -1 && val1 == nice(2))
14432 exit(0);
14433 exit(1);
14434}
14435
Martin v. Löwis11437992002-04-12 09:54:03 +000014436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014437if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014438 ac_cv_broken_nice=yes
14439else
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14443 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014444fi
14445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014446fi
14447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14449$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014450if test "$ac_cv_broken_nice" = yes
14451then
Martin v. Löwis11437992002-04-12 09:54:03 +000014452
Matthias Kloseb9621712010-04-24 17:59:49 +000014453$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014454
14455fi
14456
Matthias Kloseb9621712010-04-24 17:59:49 +000014457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14458$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014459if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014461else
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014463 ac_cv_broken_poll=no
14464else
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014466/* end confdefs.h. */
14467
14468#include <poll.h>
14469
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014470int main()
14471{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014472 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014473 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014474
14475 close (42);
14476
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014477 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014478 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014479 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014480 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014481 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014482 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014483 return 1;
14484}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014485
14486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014487if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014488 ac_cv_broken_poll=yes
14489else
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14493 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014496fi
14497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14499$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014500if test "$ac_cv_broken_poll" = yes
14501then
14502
Matthias Kloseb9621712010-04-24 17:59:49 +000014503$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014504
14505fi
14506
Brett Cannon43802422005-02-10 20:48:03 +000014507# 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 +000014508# (which is not required by ISO C or UNIX spec) and/or if we support
14509# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014510ac_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 +000014511#include <$ac_cv_struct_tm>
14512
Matthias Kloseb9621712010-04-24 17:59:49 +000014513"
Victor Stinnere0be4232011-10-25 13:06:09 +020014514if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014515
14516cat >>confdefs.h <<_ACEOF
14517#define HAVE_STRUCT_TM_TM_ZONE 1
14518_ACEOF
14519
14520
14521fi
14522
14523if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14524
Matthias Kloseb9621712010-04-24 17:59:49 +000014525$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014526
14527else
Matthias Kloseb9621712010-04-24 17:59:49 +000014528 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14529"
Victor Stinnere0be4232011-10-25 13:06:09 +020014530if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532else
Matthias Kloseb9621712010-04-24 17:59:49 +000014533 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534fi
14535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014537#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538_ACEOF
14539
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14541$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014542if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014543 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544else
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014546/* end confdefs.h. */
14547#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548#if !HAVE_DECL_TZNAME
14549extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014550#endif
14551
14552int
14553main ()
14554{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014556 ;
14557 return 0;
14558}
14559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014560if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014561 ac_cv_var_tzname=yes
14562else
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014565rm -f core conftest.err conftest.$ac_objext \
14566 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14569$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014570 if test $ac_cv_var_tzname = yes; then
14571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014573
14574 fi
14575fi
14576
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014577
Martin v. Löwis1d459062005-03-14 21:23:33 +000014578# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14580$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014581if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014583else
14584
Matthias Kloseb9621712010-04-24 17:59:49 +000014585if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014586 ac_cv_working_tzset=no
14587else
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014589/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014590
14591#include <stdlib.h>
14592#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014593#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014594
14595#if HAVE_TZNAME
14596extern char *tzname[];
14597#endif
14598
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014599int main()
14600{
Brett Cannon18367812003-09-19 00:59:16 +000014601 /* Note that we need to ensure that not only does tzset(3)
14602 do 'something' with localtime, but it works as documented
14603 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014604 This includes making sure that tzname is set properly if
14605 tm->tm_zone does not exist since it is the alternative way
14606 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014607
14608 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014609 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014610 */
14611
Martin v. Löwis1d459062005-03-14 21:23:33 +000014612 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014613 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14614
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014615 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014616 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014617 if (localtime(&groundhogday)->tm_hour != 0)
14618 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014619#if HAVE_TZNAME
14620 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14621 if (strcmp(tzname[0], "UTC") ||
14622 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14623 exit(1);
14624#endif
Brett Cannon18367812003-09-19 00:59:16 +000014625
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014626 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014627 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014628 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014629 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014630#if HAVE_TZNAME
14631 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14632 exit(1);
14633#endif
Brett Cannon18367812003-09-19 00:59:16 +000014634
14635 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14636 tzset();
14637 if (localtime(&groundhogday)->tm_hour != 11)
14638 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014639#if HAVE_TZNAME
14640 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14641 exit(1);
14642#endif
14643
14644#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014645 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14646 exit(1);
14647 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14648 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014649#endif
Brett Cannon18367812003-09-19 00:59:16 +000014650
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014651 exit(0);
14652}
14653
14654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014655if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014656 ac_cv_working_tzset=yes
14657else
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014662fi
14663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664fi
14665
Matthias Kloseb9621712010-04-24 17:59:49 +000014666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14667$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014668if test "$ac_cv_working_tzset" = yes
14669then
14670
Matthias Kloseb9621712010-04-24 17:59:49 +000014671$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014672
14673fi
14674
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014675# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14677$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014678if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014680else
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014682/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014683#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014684int
14685main ()
14686{
14687
14688struct stat st;
14689st.st_mtim.tv_nsec = 1;
14690
14691 ;
14692 return 0;
14693}
14694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014696 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014697else
Matthias Kloseb9621712010-04-24 17:59:49 +000014698 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14701fi
14702
Matthias Kloseb9621712010-04-24 17:59:49 +000014703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14704$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014705if test "$ac_cv_stat_tv_nsec" = yes
14706then
14707
Matthias Kloseb9621712010-04-24 17:59:49 +000014708$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014709
14710fi
14711
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014712# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14714$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014715if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014717else
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014719/* end confdefs.h. */
14720#include <sys/stat.h>
14721int
14722main ()
14723{
14724
14725struct stat st;
14726st.st_mtimespec.tv_nsec = 1;
14727
14728 ;
14729 return 0;
14730}
14731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014733 ac_cv_stat_tv_nsec2=yes
14734else
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14738fi
14739
Matthias Kloseb9621712010-04-24 17:59:49 +000014740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14741$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014742if test "$ac_cv_stat_tv_nsec2" = yes
14743then
14744
Matthias Kloseb9621712010-04-24 17:59:49 +000014745$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014746
14747fi
14748
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014749# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014750ac_save_cppflags="$CPPFLAGS"
14751CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014752
14753for ac_header in curses.h ncurses.h
14754do :
14755 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14756ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14757if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14758 cat >>confdefs.h <<_ACEOF
14759#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14760_ACEOF
14761
14762fi
14763
14764done
14765
14766
14767# On Solaris, term.h requires curses.h
14768for ac_header in term.h
14769do :
14770 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14771#ifdef HAVE_CURSES_H
14772#include <curses.h>
14773#endif
14774
14775"
14776if test "x$ac_cv_header_term_h" = xyes; then :
14777 cat >>confdefs.h <<_ACEOF
14778#define HAVE_TERM_H 1
14779_ACEOF
14780
14781fi
14782
14783done
14784
14785
Jack Jansen666b1e72001-10-31 12:11:48 +000014786# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14788$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014789if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014790 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014791else
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014793/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014794#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014795int
14796main ()
14797{
Jack Jansen666b1e72001-10-31 12:11:48 +000014798
14799 int rtn;
14800 rtn = mvwdelch(0,0,0);
14801
Martin v. Löwis11437992002-04-12 09:54:03 +000014802 ;
14803 return 0;
14804}
14805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014806if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014807 ac_cv_mvwdelch_is_expression=yes
14808else
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14812fi
14813
Matthias Kloseb9621712010-04-24 17:59:49 +000014814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14815$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014816
14817if test "$ac_cv_mvwdelch_is_expression" = yes
14818then
Martin v. Löwis11437992002-04-12 09:54:03 +000014819
Matthias Kloseb9621712010-04-24 17:59:49 +000014820$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014821
14822fi
14823
Matthias Kloseb9621712010-04-24 17:59:49 +000014824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14825$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014826if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014827 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014828else
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014830/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014831#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014832int
14833main ()
14834{
Jack Jansen666b1e72001-10-31 12:11:48 +000014835
14836 WINDOW *w;
14837 w->_flags = 0;
14838
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 ;
14840 return 0;
14841}
14842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014843if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014844 ac_cv_window_has_flags=yes
14845else
Matthias Kloseb9621712010-04-24 17:59:49 +000014846 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14849fi
14850
Matthias Kloseb9621712010-04-24 17:59:49 +000014851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14852$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014853
Jack Jansen666b1e72001-10-31 12:11:48 +000014854
14855if test "$ac_cv_window_has_flags" = yes
14856then
Martin v. Löwis11437992002-04-12 09:54:03 +000014857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014859
14860fi
14861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14863$as_echo_n "checking for is_term_resized... " >&6; }
14864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014865/* end confdefs.h. */
14866#include <curses.h>
14867int
14868main ()
14869{
14870void *x=is_term_resized
14871 ;
14872 return 0;
14873}
14874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014875if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014876
Matthias Kloseb9621712010-04-24 17:59:49 +000014877$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014878
Matthias Kloseb159a552010-04-25 21:00:44 +000014879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014880$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014881else
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14883$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014884
14885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14887
Matthias Kloseb9621712010-04-24 17:59:49 +000014888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14889$as_echo_n "checking for resize_term... " >&6; }
14890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014891/* end confdefs.h. */
14892#include <curses.h>
14893int
14894main ()
14895{
14896void *x=resize_term
14897 ;
14898 return 0;
14899}
14900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014901if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014904
Matthias Kloseb159a552010-04-25 21:00:44 +000014905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014906$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014907else
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14909$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014910
14911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14913
Matthias Kloseb9621712010-04-24 17:59:49 +000014914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14915$as_echo_n "checking for resizeterm... " >&6; }
14916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014917/* end confdefs.h. */
14918#include <curses.h>
14919int
14920main ()
14921{
14922void *x=resizeterm
14923 ;
14924 return 0;
14925}
14926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014927if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014928
Matthias Kloseb9621712010-04-24 17:59:49 +000014929$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014930
Matthias Kloseb159a552010-04-25 21:00:44 +000014931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014932$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014933else
Matthias Kloseb9621712010-04-24 17:59:49 +000014934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14935$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014936
14937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014939# last curses configure check
14940CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14943$as_echo "$as_me: checking for device files" >&6;}
14944
14945if test "x$cross_compiling" = xyes; then
14946 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14948$as_echo_n "checking for /dev/ptmx... " >&6; }
14949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14950$as_echo "not set" >&6; }
14951 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14952 fi
14953 if test "${ac_cv_file__dev_ptc+set}" != set; then
14954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14955$as_echo_n "checking for /dev/ptc... " >&6; }
14956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14957$as_echo "not set" >&6; }
14958 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14959 fi
14960fi
14961
Matthias Kloseb9621712010-04-24 17:59:49 +000014962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14963$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014964if ${ac_cv_file__dev_ptmx+:} false; then :
14965 $as_echo_n "(cached) " >&6
14966else
14967 test "$cross_compiling" = yes &&
14968 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14969if test -r "/dev/ptmx"; then
14970 ac_cv_file__dev_ptmx=yes
14971else
14972 ac_cv_file__dev_ptmx=no
14973fi
14974fi
14975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14976$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14977if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014978
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014979fi
14980
14981if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014982
Matthias Kloseb9621712010-04-24 17:59:49 +000014983$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014984
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14987$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014988if ${ac_cv_file__dev_ptc+:} false; then :
14989 $as_echo_n "(cached) " >&6
14990else
14991 test "$cross_compiling" = yes &&
14992 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14993if test -r "/dev/ptc"; then
14994 ac_cv_file__dev_ptc=yes
14995else
14996 ac_cv_file__dev_ptc=no
14997fi
14998fi
14999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15000$as_echo "$ac_cv_file__dev_ptc" >&6; }
15001if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015002
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015003fi
15004
15005if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015006
Matthias Kloseb9621712010-04-24 17:59:49 +000015007$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015008
Neal Norwitz865400f2003-03-21 01:42:58 +000015009fi
15010
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015011if test "$have_long_long" = yes
15012then
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15014$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015015 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015017else
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015019 ac_cv_have_long_long_format="cross -- assuming no"
15020 if test x$GCC = xyes; then
15021 save_CFLAGS=$CFLAGS
15022 CFLAGS="$CFLAGS -Werror -Wformat"
15023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15024/* end confdefs.h. */
15025
15026 #include <stdio.h>
15027 #include <stddef.h>
15028
15029int
15030main ()
15031{
15032
15033 char *buffer;
15034 sprintf(buffer, "%lld", (long long)123);
15035 sprintf(buffer, "%lld", (long long)-123);
15036 sprintf(buffer, "%llu", (unsigned long long)123);
15037
15038 ;
15039 return 0;
15040}
15041_ACEOF
15042if ac_fn_c_try_compile "$LINENO"; then :
15043 ac_cv_have_long_long_format=yes
15044
15045fi
15046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15047 CFLAGS=$save_CFLAGS
15048 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015049else
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015051/* end confdefs.h. */
15052
15053 #include <stdio.h>
15054 #include <stddef.h>
15055 #include <string.h>
15056
15057 #ifdef HAVE_SYS_TYPES_H
15058 #include <sys/types.h>
15059 #endif
15060
15061 int main()
15062 {
15063 char buffer[256];
15064
15065 if (sprintf(buffer, "%lld", (long long)123) < 0)
15066 return 1;
15067 if (strcmp(buffer, "123"))
15068 return 1;
15069
15070 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15071 return 1;
15072 if (strcmp(buffer, "-123"))
15073 return 1;
15074
15075 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15076 return 1;
15077 if (strcmp(buffer, "123"))
15078 return 1;
15079
15080 return 0;
15081 }
15082
15083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015084if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015085 ac_cv_have_long_long_format=yes
15086else
Matthias Kloseb9621712010-04-24 17:59:49 +000015087 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15090 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015091fi
15092
15093
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015094fi
15095
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15097$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015098fi
15099
Mark Dickinson89d7d412009-12-31 20:50:59 +000015100if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015101then
15102
Matthias Kloseb9621712010-04-24 17:59:49 +000015103$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015104
15105fi
15106
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015107if test $ac_sys_system = Darwin
15108then
15109 LIBS="$LIBS -framework CoreFoundation"
15110fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15113$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015114if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015115 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015116else
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015118 ac_cv_have_size_t_format="cross -- assuming yes"
15119
Thomas Wouters477c8d52006-05-27 19:21:47 +000015120else
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015122/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015123
Thomas Wouters477c8d52006-05-27 19:21:47 +000015124#include <stdio.h>
15125#include <stddef.h>
15126#include <string.h>
15127
Christian Heimes2c181612007-12-17 20:04:13 +000015128#ifdef HAVE_SYS_TYPES_H
15129#include <sys/types.h>
15130#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015131
15132#ifdef HAVE_SSIZE_T
15133typedef ssize_t Py_ssize_t;
15134#elif SIZEOF_VOID_P == SIZEOF_LONG
15135typedef long Py_ssize_t;
15136#else
15137typedef int Py_ssize_t;
15138#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015139
Christian Heimes2c181612007-12-17 20:04:13 +000015140int main()
15141{
15142 char buffer[256];
15143
Thomas Wouters477c8d52006-05-27 19:21:47 +000015144 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15145 return 1;
15146
Thomas Wouters89f507f2006-12-13 04:49:30 +000015147 if (strcmp(buffer, "123"))
15148 return 1;
15149
15150 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15151 return 1;
15152
15153 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015154 return 1;
15155
15156 return 0;
15157}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015158
Thomas Wouters477c8d52006-05-27 19:21:47 +000015159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015160if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015161 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015162else
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15166 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015167fi
15168
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15171$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015172if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015173
Matthias Kloseb9621712010-04-24 17:59:49 +000015174$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015175
15176fi
15177
Matthias Kloseb9621712010-04-24 17:59:49 +000015178ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015179#ifdef HAVE_SYS_TYPES_H
15180#include <sys/types.h>
15181#endif
15182#ifdef HAVE_SYS_SOCKET_H
15183#include <sys/socket.h>
15184#endif
15185
Matthias Kloseb9621712010-04-24 17:59:49 +000015186"
Victor Stinnere0be4232011-10-25 13:06:09 +020015187if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015188
Martin v. Löwis11437992002-04-12 09:54:03 +000015189else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015190
Matthias Kloseb9621712010-04-24 17:59:49 +000015191$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015192
15193fi
15194
Michael W. Hudson54241132001-12-07 15:38:26 +000015195
Matthias Kloseb9621712010-04-24 17:59:49 +000015196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15197$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015198if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015199 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015200else
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015202 ac_cv_broken_mbstowcs=no
15203else
Matthias Kloseb9621712010-04-24 17:59:49 +000015204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015205/* end confdefs.h. */
15206
Stefan Krah19c21392012-11-22 23:47:32 +010015207#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015208#include<stdlib.h>
15209int main() {
15210 size_t len = -1;
15211 const char *str = "text";
15212 len = mbstowcs(NULL, str, 0);
15213 return (len != 4);
15214}
15215
15216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015217if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015218 ac_cv_broken_mbstowcs=no
15219else
Matthias Kloseb9621712010-04-24 17:59:49 +000015220 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15223 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015224fi
15225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015226fi
15227
Matthias Kloseb9621712010-04-24 17:59:49 +000015228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15229$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015230if test "$ac_cv_broken_mbstowcs" = yes
15231then
15232
Matthias Kloseb9621712010-04-24 17:59:49 +000015233$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015234
15235fi
15236
Antoine Pitroub52ec782009-01-25 16:34:23 +000015237# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15239$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015240
15241# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015242if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015243 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015244if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015245then
15246
Matthias Kloseb9621712010-04-24 17:59:49 +000015247$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015248
Matthias Kloseb9621712010-04-24 17:59:49 +000015249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15250$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015251fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015252if test "$withval" = no
15253then
15254
15255$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15256
Matthias Kloseb9621712010-04-24 17:59:49 +000015257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15258$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015259fi
15260
Antoine Pitrou042b1282010-08-13 21:15:58 +000015261else
15262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15263$as_echo "no value specified" >&6; }
15264fi
15265
Antoine Pitroub52ec782009-01-25 16:34:23 +000015266
Matthias Kloseb17289e2012-03-15 19:51:34 +010015267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15268$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15269if ${ac_cv_computed_gotos+:} false; then :
15270 $as_echo_n "(cached) " >&6
15271else
15272 if test "$cross_compiling" = yes; then :
15273 if test "${with_computed_gotos+set}" = set; then
15274 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15275 else
15276 ac_cv_computed_gotos=no
15277 fi
15278else
15279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15280/* end confdefs.h. */
15281
15282int main(int argc, char **argv)
15283{
15284 static void *targets[1] = { &&LABEL1 };
15285 goto LABEL2;
15286LABEL1:
15287 return 0;
15288LABEL2:
15289 goto *targets[0];
15290 return 1;
15291}
15292
15293_ACEOF
15294if ac_fn_c_try_run "$LINENO"; then :
15295 ac_cv_computed_gotos=yes
15296else
15297 ac_cv_computed_gotos=no
15298fi
15299rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15300 conftest.$ac_objext conftest.beam conftest.$ac_ext
15301fi
15302
15303fi
15304
15305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15306$as_echo "$ac_cv_computed_gotos" >&6; }
15307case "$ac_cv_computed_gotos" in yes*)
15308
15309$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15310
15311esac
15312
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015313case $ac_sys_system in
15314AIX*)
15315
15316$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15317 ;;
15318esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015319
Michael W. Hudson54241132001-12-07 15:38:26 +000015320
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015321
15322
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015323for h in `(cd $srcdir;echo Python/thread_*.h)`
15324do
15325 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15326done
15327
Michael W. Hudson54241132001-12-07 15:38:26 +000015328
Neal Norwitzd24499d2005-12-18 21:36:39 +000015329SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15331$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015332for dir in $SRCDIRS; do
15333 if test ! -d $dir; then
15334 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015335 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015336done
Matthias Kloseb9621712010-04-24 17:59:49 +000015337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15338$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015339
Stefan Krah1919b7e2012-03-21 18:25:23 +010015340# Availability of -O2:
15341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15342$as_echo_n "checking for -O2... " >&6; }
15343saved_cflags="$CFLAGS"
15344CFLAGS="-O2"
15345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15346/* end confdefs.h. */
15347
15348int
15349main ()
15350{
15351
15352
15353 ;
15354 return 0;
15355}
15356_ACEOF
15357if ac_fn_c_try_compile "$LINENO"; then :
15358 have_O2=yes
15359else
15360 have_O2=no
15361fi
15362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15364$as_echo "$have_O2" >&6; }
15365CFLAGS="$saved_cflags"
15366
15367# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15368# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15370$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15371saved_cflags="$CFLAGS"
15372CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15373if test "$have_O2" = no; then
15374 CFLAGS=""
15375fi
15376if test "$cross_compiling" = yes; then :
15377 have_glibc_memmove_bug=undefined
15378else
15379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15380/* end confdefs.h. */
15381
15382#include <stdio.h>
15383#include <stdlib.h>
15384#include <string.h>
15385void foo(void *p, void *q) { memmove(p, q, 19); }
15386int main() {
15387 char a[32] = "123456789000000000";
15388 foo(&a[9], a);
15389 if (strcmp(a, "123456789123456789000000000") != 0)
15390 return 1;
15391 foo(a, &a[9]);
15392 if (strcmp(a, "123456789000000000") != 0)
15393 return 1;
15394 return 0;
15395}
15396
15397_ACEOF
15398if ac_fn_c_try_run "$LINENO"; then :
15399 have_glibc_memmove_bug=no
15400else
15401 have_glibc_memmove_bug=yes
15402fi
15403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15404 conftest.$ac_objext conftest.beam conftest.$ac_ext
15405fi
15406
15407CFLAGS="$saved_cflags"
15408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15409$as_echo "$have_glibc_memmove_bug" >&6; }
15410if test "$have_glibc_memmove_bug" = yes; then
15411
15412$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15413
15414fi
15415
15416if test "$have_gcc_asm_for_x87" = yes; then
15417 # Some versions of gcc miscompile inline asm:
15418 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15419 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15420 case $CC in
15421 *gcc*)
15422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15423$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15424 saved_cflags="$CFLAGS"
15425 CFLAGS="-O2"
15426 if test "$cross_compiling" = yes; then :
15427 have_ipa_pure_const_bug=undefined
15428else
15429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15430/* end confdefs.h. */
15431
15432 __attribute__((noinline)) int
15433 foo(int *p) {
15434 int r;
15435 asm ( "movl \$6, (%1)\n\t"
15436 "xorl %0, %0\n\t"
15437 : "=r" (r) : "r" (p) : "memory"
15438 );
15439 return r;
15440 }
15441 int main() {
15442 int p = 8;
15443 if ((foo(&p) ? : p) != 6)
15444 return 1;
15445 return 0;
15446 }
15447
15448_ACEOF
15449if ac_fn_c_try_run "$LINENO"; then :
15450 have_ipa_pure_const_bug=no
15451else
15452 have_ipa_pure_const_bug=yes
15453fi
15454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15455 conftest.$ac_objext conftest.beam conftest.$ac_ext
15456fi
15457
15458 CFLAGS="$saved_cflags"
15459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15460$as_echo "$have_ipa_pure_const_bug" >&6; }
15461 if test "$have_ipa_pure_const_bug" = yes; then
15462
15463$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15464
15465 fi
15466 ;;
15467 esac
15468fi
15469
Ned Deily322f5ba2013-11-21 23:01:59 -080015470# ensurepip option
15471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15472$as_echo_n "checking for ensurepip... " >&6; }
15473
15474# Check whether --with-ensurepip was given.
15475if test "${with_ensurepip+set}" = set; then :
15476 withval=$with_ensurepip;
15477else
15478 with_ensurepip=upgrade
15479fi
15480
15481case $with_ensurepip in #(
15482 yes|upgrade) :
15483 ENSUREPIP=upgrade ;; #(
15484 install) :
15485 ENSUREPIP=install ;; #(
15486 no) :
15487 ENSUREPIP=no ;; #(
15488 *) :
15489 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15490esac
15491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15492$as_echo "$ENSUREPIP" >&6; }
15493
15494
Guido van Rossum627b2d71993-12-24 10:39:16 +000015495# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015496ac_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 +000015497
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015498ac_config_files="$ac_config_files Modules/ld_so_aix"
15499
Martin v. Löwis11437992002-04-12 09:54:03 +000015500cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015501# This file is a shell script that caches the results of configure
15502# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015503# scripts and configure runs, see configure's option --config-cache.
15504# It is not useful on other systems. If it contains results you don't
15505# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015506#
Martin v. Löwis11437992002-04-12 09:54:03 +000015507# config.status only pays attention to the cache file if you give it
15508# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015509#
Skip Montanaro6dead952003-09-25 14:50:04 +000015510# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015511# loading this file, other *unset* `ac_cv_foo' will be assigned the
15512# following values.
15513
15514_ACEOF
15515
Guido van Rossumf78abae1997-01-21 22:02:36 +000015516# The following way of writing the cache mishandles newlines in values,
15517# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015518# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015519# Ultrix sh set writes to stderr and can't be redirected directly,
15520# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015521(
15522 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15523 eval ac_val=\$$ac_var
15524 case $ac_val in #(
15525 *${as_nl}*)
15526 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015527 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15528$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015529 esac
15530 case $ac_var in #(
15531 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15533 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015534 esac ;;
15535 esac
15536 done
15537
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015539 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15540 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015541 # `set' does not quote correctly, so add quotes: double-quote
15542 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015543 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015544 "s/'/'\\\\''/g;
15545 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015547 *)
15548 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015549 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015551 esac |
15552 sort
15553) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015556 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015558 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15559 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015560 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15561 :end' >>confcache
15562if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15563 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015564 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015565 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15566$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015567 if test ! -f "$cache_file" || test -h "$cache_file"; then
15568 cat confcache >"$cache_file"
15569 else
15570 case $cache_file in #(
15571 */* | ?:*)
15572 mv -f confcache "$cache_file"$$ &&
15573 mv -f "$cache_file"$$ "$cache_file" ;; #(
15574 *)
15575 mv -f confcache "$cache_file" ;;
15576 esac
15577 fi
15578 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015579 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15581$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015582 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015583fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015584rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015585
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015586test "x$prefix" = xNONE && prefix=$ac_default_prefix
15587# Let make expand exec_prefix.
15588test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015589
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015590DEFS=-DHAVE_CONFIG_H
15591
Skip Montanaro6dead952003-09-25 14:50:04 +000015592ac_libobjs=
15593ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015594U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015595for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15596 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015597 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015598 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015599 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15600 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015601 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15602 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015603done
15604LIBOBJS=$ac_libobjs
15605
15606LTLIBOBJS=$ac_ltlibobjs
15607
15608
Martin v. Löwis11437992002-04-12 09:54:03 +000015609
Matthias Kloseb9621712010-04-24 17:59:49 +000015610
Victor Stinnere0be4232011-10-25 13:06:09 +020015611: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015612ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015613ac_clean_files_save=$ac_clean_files
15614ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015615{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15616$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15617as_write_fail=0
15618cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015619#! $SHELL
15620# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015621# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015622# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015623# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015624
Martin v. Löwis11437992002-04-12 09:54:03 +000015625debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015626ac_cs_recheck=false
15627ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015628
Matthias Kloseb9621712010-04-24 17:59:49 +000015629SHELL=\${CONFIG_SHELL-$SHELL}
15630export SHELL
15631_ASEOF
15632cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15633## -------------------- ##
15634## M4sh Initialization. ##
15635## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637# Be more Bourne compatible
15638DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015639if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015640 emulate sh
15641 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015642 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015643 # is contrary to our usage. Disable this feature.
15644 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015645 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015646else
Matthias Kloseb9621712010-04-24 17:59:49 +000015647 case `(set -o) 2>/dev/null` in #(
15648 *posix*) :
15649 set -o posix ;; #(
15650 *) :
15651 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015653fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015654
15655
Matthias Kloseb9621712010-04-24 17:59:49 +000015656as_nl='
15657'
15658export as_nl
15659# Printing a long string crashes Solaris 7 /usr/bin/printf.
15660as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15661as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15662as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15663# Prefer a ksh shell builtin over an external printf program on Solaris,
15664# but without wasting forks for bash or zsh.
15665if test -z "$BASH_VERSION$ZSH_VERSION" \
15666 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15667 as_echo='print -r --'
15668 as_echo_n='print -rn --'
15669elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15670 as_echo='printf %s\n'
15671 as_echo_n='printf %s'
15672else
15673 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15674 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15675 as_echo_n='/usr/ucb/echo -n'
15676 else
15677 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15678 as_echo_n_body='eval
15679 arg=$1;
15680 case $arg in #(
15681 *"$as_nl"*)
15682 expr "X$arg" : "X\\(.*\\)$as_nl";
15683 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15684 esac;
15685 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15686 '
15687 export as_echo_n_body
15688 as_echo_n='sh -c $as_echo_n_body as_echo'
15689 fi
15690 export as_echo_body
15691 as_echo='sh -c $as_echo_body as_echo'
15692fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015693
15694# The user is always right.
15695if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015696 PATH_SEPARATOR=:
15697 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15698 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15699 PATH_SEPARATOR=';'
15700 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015703
15704# IFS
15705# We need space, tab and new line, in precisely that order. Quoting is
15706# there to prevent editors from complaining about space-tab.
15707# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15708# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015709IFS=" "" $as_nl"
15710
15711# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015712as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015713case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714 *[\\/]* ) as_myself=$0 ;;
15715 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015716for as_dir in $PATH
15717do
15718 IFS=$as_save_IFS
15719 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015720 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15721 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015722IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015724 ;;
15725esac
15726# We did not find ourselves, most probably we were run as `sh COMMAND'
15727# in which case we are not to be found in the path.
15728if test "x$as_myself" = x; then
15729 as_myself=$0
15730fi
15731if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15733 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734fi
15735
Matthias Kloseb9621712010-04-24 17:59:49 +000015736# Unset variables that we do not need and which cause bugs (e.g. in
15737# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15738# suppresses any "Segmentation fault" message there. '((' could
15739# trigger a bug in pdksh 5.2.14.
15740for as_var in BASH_ENV ENV MAIL MAILPATH
15741do eval test x\${$as_var+set} = xset \
15742 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015743done
15744PS1='$ '
15745PS2='> '
15746PS4='+ '
15747
15748# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015749LC_ALL=C
15750export LC_ALL
15751LANGUAGE=C
15752export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754# CDPATH.
15755(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15756
15757
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015758# as_fn_error STATUS ERROR [LINENO LOG_FD]
15759# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015760# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15761# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015762# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015763as_fn_error ()
15764{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015765 as_status=$1; test $as_status -eq 0 && as_status=1
15766 if test "$4"; then
15767 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15768 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015770 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015771 as_fn_exit $as_status
15772} # as_fn_error
15773
15774
15775# as_fn_set_status STATUS
15776# -----------------------
15777# Set $? to STATUS, without forking.
15778as_fn_set_status ()
15779{
15780 return $1
15781} # as_fn_set_status
15782
15783# as_fn_exit STATUS
15784# -----------------
15785# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15786as_fn_exit ()
15787{
15788 set +e
15789 as_fn_set_status $1
15790 exit $1
15791} # as_fn_exit
15792
15793# as_fn_unset VAR
15794# ---------------
15795# Portably unset VAR.
15796as_fn_unset ()
15797{
15798 { eval $1=; unset $1;}
15799}
15800as_unset=as_fn_unset
15801# as_fn_append VAR VALUE
15802# ----------------------
15803# Append the text in VALUE to the end of the definition contained in VAR. Take
15804# advantage of any shell optimizations that allow amortized linear growth over
15805# repeated appends, instead of the typical quadratic growth present in naive
15806# implementations.
15807if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15808 eval 'as_fn_append ()
15809 {
15810 eval $1+=\$2
15811 }'
15812else
15813 as_fn_append ()
15814 {
15815 eval $1=\$$1\$2
15816 }
15817fi # as_fn_append
15818
15819# as_fn_arith ARG...
15820# ------------------
15821# Perform arithmetic evaluation on the ARGs, and store the result in the
15822# global $as_val. Take advantage of shells that can avoid forks. The arguments
15823# must be portable across $(()) and expr.
15824if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15825 eval 'as_fn_arith ()
15826 {
15827 as_val=$(( $* ))
15828 }'
15829else
15830 as_fn_arith ()
15831 {
15832 as_val=`expr "$@" || test $? -eq 1`
15833 }
15834fi # as_fn_arith
15835
15836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015837if expr a : '\(a\)' >/dev/null 2>&1 &&
15838 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15839 as_expr=expr
15840else
15841 as_expr=false
15842fi
15843
15844if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15845 as_basename=basename
15846else
15847 as_basename=false
15848fi
15849
Matthias Kloseb9621712010-04-24 17:59:49 +000015850if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15851 as_dirname=dirname
15852else
15853 as_dirname=false
15854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856as_me=`$as_basename -- "$0" ||
15857$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15858 X"$0" : 'X\(//\)$' \| \
15859 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015860$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015861 sed '/^.*\/\([^/][^/]*\)\/*$/{
15862 s//\1/
15863 q
15864 }
15865 /^X\/\(\/\/\)$/{
15866 s//\1/
15867 q
15868 }
15869 /^X\/\(\/\).*/{
15870 s//\1/
15871 q
15872 }
15873 s/.*/./; q'`
15874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875# Avoid depending upon Character Ranges.
15876as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15877as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15878as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15879as_cr_digits='0123456789'
15880as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015881
15882ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015883case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015885 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015887 xy) ECHO_C='\c';;
15888 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15889 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015890 esac;;
15891*)
15892 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015893esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015894
Martin v. Löwis11437992002-04-12 09:54:03 +000015895rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015896if test -d conf$$.dir; then
15897 rm -f conf$$.dir/conf$$.file
15898else
15899 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015900 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015902if (echo >conf$$.file) 2>/dev/null; then
15903 if ln -s conf$$.file conf$$ 2>/dev/null; then
15904 as_ln_s='ln -s'
15905 # ... but there are two gotchas:
15906 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15907 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015908 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015909 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015910 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015911 elif ln conf$$.file conf$$ 2>/dev/null; then
15912 as_ln_s=ln
15913 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015914 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015915 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015916else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015917 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015919rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15920rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015921
Matthias Kloseb9621712010-04-24 17:59:49 +000015922
15923# as_fn_mkdir_p
15924# -------------
15925# Create "$as_dir" as a directory, including parents if necessary.
15926as_fn_mkdir_p ()
15927{
15928
15929 case $as_dir in #(
15930 -*) as_dir=./$as_dir;;
15931 esac
15932 test -d "$as_dir" || eval $as_mkdir_p || {
15933 as_dirs=
15934 while :; do
15935 case $as_dir in #(
15936 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15937 *) as_qdir=$as_dir;;
15938 esac
15939 as_dirs="'$as_qdir' $as_dirs"
15940 as_dir=`$as_dirname -- "$as_dir" ||
15941$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15942 X"$as_dir" : 'X\(//\)[^/]' \| \
15943 X"$as_dir" : 'X\(//\)$' \| \
15944 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15945$as_echo X"$as_dir" |
15946 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15947 s//\1/
15948 q
15949 }
15950 /^X\(\/\/\)[^/].*/{
15951 s//\1/
15952 q
15953 }
15954 /^X\(\/\/\)$/{
15955 s//\1/
15956 q
15957 }
15958 /^X\(\/\).*/{
15959 s//\1/
15960 q
15961 }
15962 s/.*/./; q'`
15963 test -d "$as_dir" && break
15964 done
15965 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015966 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015967
15968
15969} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015970if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015971 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015972else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015973 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015974 as_mkdir_p=false
15975fi
15976
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015977
15978# as_fn_executable_p FILE
15979# -----------------------
15980# Test if FILE is an executable regular file.
15981as_fn_executable_p ()
15982{
15983 test -f "$1" && test -x "$1"
15984} # as_fn_executable_p
15985as_test_x='test -x'
15986as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015987
15988# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015989as_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 +000015990
15991# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015992as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015993
15994
Martin v. Löwis11437992002-04-12 09:54:03 +000015995exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015996## ----------------------------------- ##
15997## Main body of $CONFIG_STATUS script. ##
15998## ----------------------------------- ##
15999_ASEOF
16000test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016001
Matthias Kloseb9621712010-04-24 17:59:49 +000016002cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16003# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016004# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016005# values after options handling.
16006ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020016007This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016008generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016009
16010 CONFIG_FILES = $CONFIG_FILES
16011 CONFIG_HEADERS = $CONFIG_HEADERS
16012 CONFIG_LINKS = $CONFIG_LINKS
16013 CONFIG_COMMANDS = $CONFIG_COMMANDS
16014 $ $0 $@
16015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016016on `(hostname || uname -n) 2>/dev/null | sed 1q`
16017"
16018
Martin v. Löwis11437992002-04-12 09:54:03 +000016019_ACEOF
16020
Matthias Kloseb9621712010-04-24 17:59:49 +000016021case $ac_config_files in *"
16022"*) set x $ac_config_files; shift; ac_config_files=$*;;
16023esac
16024
16025case $ac_config_headers in *"
16026"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16027esac
16028
16029
16030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016031# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016032config_files="$ac_config_files"
16033config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016035_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016038ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016039\`$as_me' instantiates files and other configuration actions
16040from templates according to the current configuration. Unless the files
16041and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016042
Matthias Kloseb9621712010-04-24 17:59:49 +000016043Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016044
16045 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016046 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016047 --config print configuration, then exit
16048 -q, --quiet, --silent
16049 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016050 -d, --debug don't remove temporary files
16051 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016052 --file=FILE[:TEMPLATE]
16053 instantiate the configuration file FILE
16054 --header=FILE[:TEMPLATE]
16055 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016056
16057Configuration files:
16058$config_files
16059
16060Configuration headers:
16061$config_headers
16062
Matthias Kloseb9621712010-04-24 17:59:49 +000016063Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016066cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16067ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016068ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020016069python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016070configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016071 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016072
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016073Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016074This config.status script is free software; the Free Software Foundation
16075gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016076
16077ac_pwd='$ac_pwd'
16078srcdir='$srcdir'
16079INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016080MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016081test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016082_ACEOF
16083
Matthias Kloseb9621712010-04-24 17:59:49 +000016084cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16085# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016086ac_need_defaults=:
16087while test $# != 0
16088do
16089 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016090 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016091 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16092 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016093 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016095 --*=)
16096 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16097 ac_optarg=
16098 ac_shift=:
16099 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016100 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016101 ac_option=$1
16102 ac_optarg=$2
16103 ac_shift=shift
16104 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016105 esac
16106
Skip Montanaro6dead952003-09-25 14:50:04 +000016107 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016108 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016109 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16110 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016111 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016112 $as_echo "$ac_cs_version"; exit ;;
16113 --config | --confi | --conf | --con | --co | --c )
16114 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016115 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016116 debug=: ;;
16117 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016118 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016119 case $ac_optarg in
16120 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016121 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016122 esac
16123 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016124 ac_need_defaults=false;;
16125 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016126 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016127 case $ac_optarg in
16128 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16129 esac
16130 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016131 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016132 --he | --h)
16133 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016134 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016135Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016137 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016138 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16139 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16140 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016141
16142 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016143 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016144Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016145
Matthias Kloseb9621712010-04-24 17:59:49 +000016146 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016147 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016148
16149 esac
16150 shift
16151done
16152
Skip Montanaro6dead952003-09-25 14:50:04 +000016153ac_configure_extra_args=
16154
16155if $ac_cs_silent; then
16156 exec 6>/dev/null
16157 ac_configure_extra_args="$ac_configure_extra_args --silent"
16158fi
16159
16160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016161cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016162if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016163 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016164 shift
16165 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16166 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016167 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016168 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016169fi
16170
Martin v. Löwis11437992002-04-12 09:54:03 +000016171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016172cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016173exec 5>>config.log
16174{
16175 echo
16176 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16177## Running $as_me. ##
16178_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016179 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016183cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016185
Matthias Kloseb9621712010-04-24 17:59:49 +000016186cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016187
16188# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016189for ac_config_target in $ac_config_targets
16190do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191 case $ac_config_target in
16192 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16193 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16194 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016195 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16196 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16198 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016199 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016200 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016201 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202
Victor Stinnere0be4232011-10-25 13:06:09 +020016203 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016204 esac
16205done
16206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016207
Martin v. Löwis11437992002-04-12 09:54:03 +000016208# If the user did not use the arguments to specify the items to instantiate,
16209# then the envvar interface is used. Set only those that are not.
16210# We use the long form for the default assignment because of an extremely
16211# bizarre bug on SunOS 4.1.3.
16212if $ac_need_defaults; then
16213 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16214 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16215fi
16216
Skip Montanaro6dead952003-09-25 14:50:04 +000016217# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016219# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220# Hook for its removal unless debugging.
16221# Note that there is a small window in which the directory will not be cleaned:
16222# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016223$debug ||
16224{
Victor Stinnere0be4232011-10-25 13:06:09 +020016225 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016226 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016227 : "${ac_tmp:=$tmp}"
16228 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016229' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016230 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016231}
Martin v. Löwis11437992002-04-12 09:54:03 +000016232# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016233
Martin v. Löwis11437992002-04-12 09:54:03 +000016234{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016235 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016236 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016237} ||
16238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239 tmp=./conf$$-$RANDOM
16240 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016241} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016242ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016243
Matthias Kloseb9621712010-04-24 17:59:49 +000016244# Set up the scripts for CONFIG_FILES section.
16245# No need to generate them if there are no CONFIG_FILES.
16246# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016247if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016248
Matthias Kloseb9621712010-04-24 17:59:49 +000016249
16250ac_cr=`echo X | tr X '\015'`
16251# On cygwin, bash can eat \r inside `` if the user requested igncr.
16252# But we know of no other shell where ac_cr would be empty at this
16253# point, so we can use a bashism as a fallback.
16254if test "x$ac_cr" = x; then
16255 eval ac_cr=\$\'\\r\'
16256fi
16257ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16258if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016259 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016260else
16261 ac_cs_awk_cr=$ac_cr
16262fi
16263
Victor Stinnere0be4232011-10-25 13:06:09 +020016264echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016265_ACEOF
16266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267
Matthias Kloseb9621712010-04-24 17:59:49 +000016268{
16269 echo "cat >conf$$subs.awk <<_ACEOF" &&
16270 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16271 echo "_ACEOF"
16272} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016273 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16274ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275ac_delim='%!_!# '
16276for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016277 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016278 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279
Matthias Kloseb9621712010-04-24 17:59:49 +000016280 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16281 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282 break
16283 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016284 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285 else
16286 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016287 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288done
Matthias Kloseb9621712010-04-24 17:59:49 +000016289rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290
Matthias Kloseb9621712010-04-24 17:59:49 +000016291cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016292cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016294sed -n '
16295h
16296s/^/S["/; s/!.*/"]=/
16297p
16298g
16299s/^[^!]*!//
16300:repl
16301t repl
16302s/'"$ac_delim"'$//
16303t delim
16304:nl
16305h
16306s/\(.\{148\}\)..*/\1/
16307t more1
16308s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16309p
16310n
16311b repl
16312:more1
16313s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16314p
16315g
16316s/.\{148\}//
16317t nl
16318:delim
16319h
16320s/\(.\{148\}\)..*/\1/
16321t more2
16322s/["\\]/\\&/g; s/^/"/; s/$/"/
16323p
16324b
16325:more2
16326s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16327p
16328g
16329s/.\{148\}//
16330t delim
16331' <conf$$subs.awk | sed '
16332/^[^""]/{
16333 N
16334 s/\n//
16335}
16336' >>$CONFIG_STATUS || ac_write_fail=1
16337rm -f conf$$subs.awk
16338cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16339_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016340cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016341 for (key in S) S_is_set[key] = 1
16342 FS = ""
16343
16344}
16345{
16346 line = $ 0
16347 nfields = split(line, field, "@")
16348 substed = 0
16349 len = length(field[1])
16350 for (i = 2; i < nfields; i++) {
16351 key = field[i]
16352 keylen = length(key)
16353 if (S_is_set[key]) {
16354 value = S[key]
16355 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16356 len += length(value) + length(field[++i])
16357 substed = 1
16358 } else
16359 len += 1 + keylen
16360 }
16361
16362 print line
16363}
16364
16365_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16368if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16369 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16370else
16371 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016372fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016373 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016374_ACEOF
16375
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016376# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16377# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378# trailing colons and then remove the whole line if VPATH becomes empty
16379# (actually we leave an empty line to preserve line numbers).
16380if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016381 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16382h
16383s///
16384s/^/:/
16385s/[ ]*$/:/
16386s/:\$(srcdir):/:/g
16387s/:\${srcdir}:/:/g
16388s/:@srcdir@:/:/g
16389s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016390s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016391x
16392s/\(=[ ]*\).*/\1/
16393G
16394s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395s/^[^=]*=[ ]*$//
16396}'
16397fi
16398
Matthias Kloseb9621712010-04-24 17:59:49 +000016399cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016400fi # test -n "$CONFIG_FILES"
16401
Matthias Kloseb9621712010-04-24 17:59:49 +000016402# Set up the scripts for CONFIG_HEADERS section.
16403# No need to generate them if there are no CONFIG_HEADERS.
16404# This happens for instance with `./config.status Makefile'.
16405if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016406cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016407BEGIN {
16408_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016409
Matthias Kloseb9621712010-04-24 17:59:49 +000016410# Transform confdefs.h into an awk script `defines.awk', embedded as
16411# here-document in config.status, that substitutes the proper values into
16412# config.h.in to produce config.h.
16413
16414# Create a delimiter string that does not exist in confdefs.h, to ease
16415# handling of long lines.
16416ac_delim='%!_!# '
16417for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016418 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16419 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016420 break
16421 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016422 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016423 else
16424 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16425 fi
16426done
16427
16428# For the awk script, D is an array of macro values keyed by name,
16429# likewise P contains macro parameters if any. Preserve backslash
16430# newline sequences.
16431
16432ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16433sed -n '
16434s/.\{148\}/&'"$ac_delim"'/g
16435t rset
16436:rset
16437s/^[ ]*#[ ]*define[ ][ ]*/ /
16438t def
16439d
16440:def
16441s/\\$//
16442t bsnl
16443s/["\\]/\\&/g
16444s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16445D["\1"]=" \3"/p
16446s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16447d
16448:bsnl
16449s/["\\]/\\&/g
16450s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16451D["\1"]=" \3\\\\\\n"\\/p
16452t cont
16453s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16454t cont
16455d
16456:cont
16457n
16458s/.\{148\}/&'"$ac_delim"'/g
16459t clear
16460:clear
16461s/\\$//
16462t bsnlc
16463s/["\\]/\\&/g; s/^/"/; s/$/"/p
16464d
16465:bsnlc
16466s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16467b cont
16468' <confdefs.h | sed '
16469s/'"$ac_delim"'/"\\\
16470"/g' >>$CONFIG_STATUS || ac_write_fail=1
16471
16472cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16473 for (key in D) D_is_set[key] = 1
16474 FS = ""
16475}
16476/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16477 line = \$ 0
16478 split(line, arg, " ")
16479 if (arg[1] == "#") {
16480 defundef = arg[2]
16481 mac1 = arg[3]
16482 } else {
16483 defundef = substr(arg[1], 2)
16484 mac1 = arg[2]
16485 }
16486 split(mac1, mac2, "(") #)
16487 macro = mac2[1]
16488 prefix = substr(line, 1, index(line, defundef) - 1)
16489 if (D_is_set[macro]) {
16490 # Preserve the white space surrounding the "#".
16491 print prefix "define", macro P[macro] D[macro]
16492 next
16493 } else {
16494 # Replace #undef with comments. This is necessary, for example,
16495 # in the case of _POSIX_SOURCE, which is predefined and required
16496 # on some systems where configure will not decide to define it.
16497 if (defundef == "undef") {
16498 print "/*", prefix defundef, macro, "*/"
16499 next
16500 }
16501 }
16502}
16503{ print }
16504_ACAWK
16505_ACEOF
16506cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016507 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016508fi # test -n "$CONFIG_HEADERS"
16509
16510
16511eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16512shift
16513for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016514do
16515 case $ac_tag in
16516 :[FHLC]) ac_mode=$ac_tag; continue;;
16517 esac
16518 case $ac_mode$ac_tag in
16519 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016520 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016521 :[FH]-) ac_tag=-:-;;
16522 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16523 esac
16524 ac_save_IFS=$IFS
16525 IFS=:
16526 set x $ac_tag
16527 IFS=$ac_save_IFS
16528 shift
16529 ac_file=$1
16530 shift
16531
16532 case $ac_mode in
16533 :L) ac_source=$1;;
16534 :[FH])
16535 ac_file_inputs=
16536 for ac_f
16537 do
16538 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016539 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016540 *) # Look for the file first in the build tree, then in the source tree
16541 # (if the path is not absolute). The absolute path cannot be DOS-style,
16542 # because $ac_f cannot contain `:'.
16543 test -f "$ac_f" ||
16544 case $ac_f in
16545 [\\/$]*) false;;
16546 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16547 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016548 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016549 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016550 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16551 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552 done
16553
16554 # Let's still pretend it is `configure' which instantiates (i.e., don't
16555 # use $as_me), people would be surprised to read:
16556 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016557 configure_input='Generated from '`
16558 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16559 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560 if test x"$ac_file" != x-; then
16561 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016562 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16563$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016565 # Neutralize special characters interpreted by sed in replacement strings.
16566 case $configure_input in #(
16567 *\&* | *\|* | *\\* )
16568 ac_sed_conf_input=`$as_echo "$configure_input" |
16569 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16570 *) ac_sed_conf_input=$configure_input;;
16571 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016572
16573 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016574 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16575 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016576 esac
16577 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 esac
16579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016580 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016581$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016582 X"$ac_file" : 'X\(//\)[^/]' \| \
16583 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016584 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016585$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016586 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16587 s//\1/
16588 q
16589 }
16590 /^X\(\/\/\)[^/].*/{
16591 s//\1/
16592 q
16593 }
16594 /^X\(\/\/\)$/{
16595 s//\1/
16596 q
16597 }
16598 /^X\(\/\).*/{
16599 s//\1/
16600 q
16601 }
16602 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016603 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016604 ac_builddir=.
16605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016606case "$ac_dir" in
16607.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16608*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016609 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016611 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016612 case $ac_top_builddir_sub in
16613 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16614 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16615 esac ;;
16616esac
16617ac_abs_top_builddir=$ac_pwd
16618ac_abs_builddir=$ac_pwd$ac_dir_suffix
16619# for backward compatibility:
16620ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016621
16622case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016624 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016625 ac_top_srcdir=$ac_top_builddir_sub
16626 ac_abs_top_srcdir=$ac_pwd ;;
16627 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016628 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629 ac_top_srcdir=$srcdir
16630 ac_abs_top_srcdir=$srcdir ;;
16631 *) # Relative name.
16632 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16633 ac_top_srcdir=$ac_top_build_prefix$srcdir
16634 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016635esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016636ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016637
Martin v. Löwis11437992002-04-12 09:54:03 +000016638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639 case $ac_mode in
16640 :F)
16641 #
16642 # CONFIG_FILE
16643 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016644
16645 case $INSTALL in
16646 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016649 ac_MKDIR_P=$MKDIR_P
16650 case $MKDIR_P in
16651 [\\/$]* | ?:[\\/]* ) ;;
16652 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16653 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016654_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016655
Matthias Kloseb9621712010-04-24 17:59:49 +000016656cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016657# If the template does not know about datarootdir, expand it.
16658# FIXME: This hack should be removed a few years after 2.60.
16659ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016660ac_sed_dataroot='
16661/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662 p
16663 q
16664}
16665/@datadir@/p
16666/@docdir@/p
16667/@infodir@/p
16668/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016669/@mandir@/p'
16670case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016671*datarootdir*) ac_datarootdir_seen=yes;;
16672*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16674$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016676cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016677 ac_datarootdir_hack='
16678 s&@datadir@&$datadir&g
16679 s&@docdir@&$docdir&g
16680 s&@infodir@&$infodir&g
16681 s&@localedir@&$localedir&g
16682 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016683 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016684esac
16685_ACEOF
16686
16687# Neutralize VPATH when `$srcdir' = `.'.
16688# Shell code in configure.ac might set extrasub.
16689# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016690cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16691ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016692$extrasub
16693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016694cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016695:t
16696/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016697s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016698s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016699s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016700s&@srcdir@&$ac_srcdir&;t t
16701s&@abs_srcdir@&$ac_abs_srcdir&;t t
16702s&@top_srcdir@&$ac_top_srcdir&;t t
16703s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16704s&@builddir@&$ac_builddir&;t t
16705s&@abs_builddir@&$ac_abs_builddir&;t t
16706s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16707s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016708s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016710"
Victor Stinnere0be4232011-10-25 13:06:09 +020016711eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16712 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016713
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016715 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16716 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16717 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016719which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016720$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016721which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016722
Victor Stinnere0be4232011-10-25 13:06:09 +020016723 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016724 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016725 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16726 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016727 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016728 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016729 ;;
16730 :H)
16731 #
16732 # CONFIG_HEADER
16733 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016734 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016735 {
16736 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016737 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16738 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016739 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016740 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016741 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16742$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016743 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016744 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016745 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016746 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016747 fi
16748 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016749 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016750 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016751 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016752 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016755
16756 esac
16757
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016758
16759 case $ac_file$ac_mode in
16760 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16761
16762 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016763done # for ac_tag
16764
Guido van Rossum627b2d71993-12-24 10:39:16 +000016765
Matthias Kloseb9621712010-04-24 17:59:49 +000016766as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016767_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016768ac_clean_files=$ac_clean_files_save
16769
Matthias Kloseb9621712010-04-24 17:59:49 +000016770test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016771 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016772
Martin v. Löwis11437992002-04-12 09:54:03 +000016773
16774# configure is writing to config.log, and then calls config.status.
16775# config.status does its own redirection, appending to config.log.
16776# Unfortunately, on DOS this fails, as config.log is still kept open
16777# by configure, so config.status won't be able to write to it; its
16778# output is simply discarded. So we exec the FD to /dev/null,
16779# effectively closing config.log, so it can be properly (re)opened and
16780# appended to by config.status. When coming back to configure, we
16781# need to make the FD available again.
16782if test "$no_create" != yes; then
16783 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016784 ac_config_status_args=
16785 test "$silent" = yes &&
16786 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016787 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016788 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016789 exec 5>>config.log
16790 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16791 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016792 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016793fi
16794if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16796$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016797fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016798
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016799
Christian Heimes75ed8902013-11-20 01:11:18 +010016800echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016801if test ! -f Modules/Setup
16802then
16803 cp $srcdir/Modules/Setup.dist Modules/Setup
16804fi
16805
Christian Heimes75ed8902013-11-20 01:11:18 +010016806echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016807if test ! -f Modules/Setup.local
16808then
16809 echo "# Edit this file for local setup changes" >Modules/Setup.local
16810fi
16811
Christian Heimes75ed8902013-11-20 01:11:18 +010016812echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016813$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16814 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016815 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016816mv config.c Modules