blob: 6bcc4b5b3e27245a421b0b19c372d12442e6d26e [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
653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700661SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
665BASECFLAGS
666OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000667ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100669MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000670INSTALL_DATA
671INSTALL_SCRIPT
672INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200673PYTHON
674ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200675ac_ct_READELF
676READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000677ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200678ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000679AR
680RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000681USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000682GNULD
683LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000684LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000685RUNSHARED
686INSTSONAME
687LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000688PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000689BLDLIBRARY
690DLLLIBRARY
691LDLIBRARY
692LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100693MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000694BUILDEXEEXT
695EGREP
696GREP
697CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200698NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200699ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000700MAINCC
701CXX
702OBJEXT
703EXEEXT
704ac_ct_CC
705CPPFLAGS
706LDFLAGS
707CFLAGS
708CC
709EXPORT_MACOSX_DEPLOYMENT_TARGET
710CONFIGURE_MACOSX_DEPLOYMENT_TARGET
711SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200712_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000713MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000714FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000715FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800716FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000717FRAMEWORKALTINSTALLLAST
718FRAMEWORKALTINSTALLFIRST
719FRAMEWORKINSTALLLAST
720FRAMEWORKINSTALLFIRST
721PYTHONFRAMEWORKINSTALLDIR
722PYTHONFRAMEWORKPREFIX
723PYTHONFRAMEWORKDIR
724PYTHONFRAMEWORKIDENTIFIER
725PYTHONFRAMEWORK
726LIPO_32BIT_FLAGS
727ARCH_RUN_32BIT
728UNIVERSALSDK
729CONFIG_ARGS
730SOVERSION
731VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100733host_os
734host_vendor
735host_cpu
736host
737build_os
738build_vendor
739build_cpu
740build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500741HAS_HG
742HGBRANCH
743HGTAG
744HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400745BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000746target_alias
747host_alias
748build_alias
749LIBS
750ECHO_T
751ECHO_N
752ECHO_C
753DEFS
754mandir
755localedir
756libdir
757psdir
758pdfdir
759dvidir
760htmldir
761infodir
762docdir
763oldincludedir
764includedir
765localstatedir
766sharedstatedir
767sysconfdir
768datadir
769datarootdir
770libexecdir
771sbindir
772bindir
773program_transform_name
774prefix
775exec_prefix
776PACKAGE_URL
777PACKAGE_BUGREPORT
778PACKAGE_STRING
779PACKAGE_VERSION
780PACKAGE_TARNAME
781PACKAGE_NAME
782PATH_SEPARATOR
783SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000784ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000785ac_user_opts='
786enable_option_checking
787enable_universalsdk
788with_universal_archs
789with_framework_name
790enable_framework
791with_gcc
792with_cxx_main
793with_suffix
794enable_shared
795enable_profiling
796with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100797with_hash_algorithm
Matthias Kloseb9621712010-04-24 17:59:49 +0000798with_libs
799with_system_expat
800with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100801with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000802enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700803with_tcltk_includes
804with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000805with_dbmliborder
806with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_threads
808with_thread
809enable_ipv6
810with_doc_strings
811with_tsc
812with_pymalloc
813with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_fpectl
815with_libm
816with_libc
817enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000818with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800819with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000820'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821 ac_precious_vars='build_alias
822host_alias
823target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100824MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825CC
826CFLAGS
827LDFLAGS
828LIBS
829CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200830CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831
Guido van Rossum627b2d71993-12-24 10:39:16 +0000832
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000834ac_init_help=
835ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000836ac_unrecognized_opts=
837ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838# The variables have the same names as the options, with
839# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000840cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843no_recursion=
844prefix=NONE
845program_prefix=NONE
846program_suffix=NONE
847program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852x_includes=NONE
853x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000854
855# Installation directory options.
856# These are left unexpanded so users can "make install exec_prefix=/foo"
857# and all the variables that are supposed to be based on exec_prefix
858# by default will actually change.
859# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861bindir='${exec_prefix}/bin'
862sbindir='${exec_prefix}/sbin'
863libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864datarootdir='${prefix}/share'
865datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866sysconfdir='${prefix}/etc'
867sharedstatedir='${prefix}/com'
868localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869includedir='${prefix}/include'
870oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
872infodir='${datarootdir}/info'
873htmldir='${docdir}'
874dvidir='${docdir}'
875pdfdir='${docdir}'
876psdir='${docdir}'
877libdir='${exec_prefix}/lib'
878localedir='${datarootdir}/locale'
879mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000882ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000884do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885 # If the previous option needs an argument, assign it.
886 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888 ac_prev=
889 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000890 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200893 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
894 *=) ac_optarg= ;;
895 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898 # Accept the important Cygnus configure options, so we can diagnose typos.
899
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900 case $ac_dashdash$ac_option in
901 --)
902 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904 -bindir | --bindir | --bindi | --bind | --bin | --bi)
905 ac_prev=bindir ;;
906 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908
909 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914 -cache-file | --cache-file | --cache-fil | --cache-fi \
915 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
916 ac_prev=cache_file ;;
917 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
918 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 cache_file=$ac_optarg ;;
920
921 --config-cache | -C)
922 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
930 | --dataroo | --dataro | --datar)
931 ac_prev=datarootdir ;;
932 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
933 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
934 datarootdir=$ac_optarg ;;
935
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000937 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000939 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200940 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000941 ac_useropt_orig=$ac_useropt
942 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
943 case $ac_user_opts in
944 *"
945"enable_$ac_useropt"
946"*) ;;
947 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
948 ac_unrecognized_sep=', ';;
949 esac
950 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951
952 -docdir | --docdir | --docdi | --doc | --do)
953 ac_prev=docdir ;;
954 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
955 docdir=$ac_optarg ;;
956
957 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
958 ac_prev=dvidir ;;
959 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
960 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
962 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200966 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt_orig=$ac_useropt
968 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
969 case $ac_user_opts in
970 *"
971"enable_$ac_useropt"
972"*) ;;
973 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
974 ac_unrecognized_sep=', ';;
975 esac
976 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
979 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
980 | --exec | --exe | --ex)
981 ac_prev=exec_prefix ;;
982 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
983 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
984 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Obsolete; use --with-gas.
989 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 -help | --help | --hel | --he | -h)
992 ac_init_help=long ;;
993 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
994 ac_init_help=recursive ;;
995 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
996 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
998 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001003 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1004 ac_prev=htmldir ;;
1005 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1006 | --ht=*)
1007 htmldir=$ac_optarg ;;
1008
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009 -includedir | --includedir | --includedi | --included | --include \
1010 | --includ | --inclu | --incl | --inc)
1011 ac_prev=includedir ;;
1012 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1013 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015
1016 -infodir | --infodir | --infodi | --infod | --info | --inf)
1017 ac_prev=infodir ;;
1018 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
1021 -libdir | --libdir | --libdi | --libd)
1022 ac_prev=libdir ;;
1023 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1027 | --libexe | --libex | --libe)
1028 ac_prev=libexecdir ;;
1029 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1030 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 -localedir | --localedir | --localedi | --localed | --locale)
1034 ac_prev=localedir ;;
1035 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1036 localedir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001039 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 ac_prev=localstatedir ;;
1041 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001042 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1046 ac_prev=mandir ;;
1047 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001051 # Obsolete; use --without-fp.
1052 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
1054 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 no_create=yes ;;
1057
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001058 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1059 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1060 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1063 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1064 | --oldin | --oldi | --old | --ol | --o)
1065 ac_prev=oldincludedir ;;
1066 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1067 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1068 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1072 ac_prev=prefix ;;
1073 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
1076 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1077 | --program-pre | --program-pr | --program-p)
1078 ac_prev=program_prefix ;;
1079 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1080 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1084 | --program-suf | --program-su | --program-s)
1085 ac_prev=program_suffix ;;
1086 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1087 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -program-transform-name | --program-transform-name \
1091 | --program-transform-nam | --program-transform-na \
1092 | --program-transform-n | --program-transform- \
1093 | --program-transform | --program-transfor \
1094 | --program-transfo | --program-transf \
1095 | --program-trans | --program-tran \
1096 | --progr-tra | --program-tr | --program-t)
1097 ac_prev=program_transform_name ;;
1098 -program-transform-name=* | --program-transform-name=* \
1099 | --program-transform-nam=* | --program-transform-na=* \
1100 | --program-transform-n=* | --program-transform-=* \
1101 | --program-transform=* | --program-transfor=* \
1102 | --program-transfo=* | --program-transf=* \
1103 | --program-trans=* | --program-tran=* \
1104 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001107 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1108 ac_prev=pdfdir ;;
1109 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1110 pdfdir=$ac_optarg ;;
1111
1112 -psdir | --psdir | --psdi | --psd | --ps)
1113 ac_prev=psdir ;;
1114 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1115 psdir=$ac_optarg ;;
1116
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1118 | -silent | --silent | --silen | --sile | --sil)
1119 silent=yes ;;
1120
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001121 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1122 ac_prev=sbindir ;;
1123 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1124 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126
1127 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1128 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1129 | --sharedst | --shareds | --shared | --share | --shar \
1130 | --sha | --sh)
1131 ac_prev=sharedstatedir ;;
1132 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1133 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1134 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1135 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001137
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138 -site | --site | --sit)
1139 ac_prev=site ;;
1140 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1144 ac_prev=srcdir ;;
1145 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001148 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1149 | --syscon | --sysco | --sysc | --sys | --sy)
1150 ac_prev=sysconfdir ;;
1151 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1152 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1161 verbose=yes ;;
1162
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 -version | --version | --versio | --versi | --vers | -V)
1164 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
1166 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001170 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 ac_useropt_orig=$ac_useropt
1172 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1173 case $ac_user_opts in
1174 *"
1175"with_$ac_useropt"
1176"*) ;;
1177 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1178 ac_unrecognized_sep=', ';;
1179 esac
1180 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
1182 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001184 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001186 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 ac_useropt_orig=$ac_useropt
1188 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1189 case $ac_user_opts in
1190 *"
1191"with_$ac_useropt"
1192"*) ;;
1193 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1194 ac_unrecognized_sep=', ';;
1195 esac
1196 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 --x)
1199 # Obsolete; use --with-x.
1200 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201
1202 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1203 | --x-incl | --x-inc | --x-in | --x-i)
1204 ac_prev=x_includes ;;
1205 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1206 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208
1209 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1210 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1211 ac_prev=x_libraries ;;
1212 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1213 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001214 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1217Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218 ;;
1219
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 *=*)
1221 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1222 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 case $ac_envvar in #(
1224 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 export $ac_envvar ;;
1229
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001230 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001232 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001235 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236 ;;
1237
1238 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001239done
1240
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001243 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244fi
1245
Matthias Kloseb9621712010-04-24 17:59:49 +00001246if test -n "$ac_unrecognized_opts"; then
1247 case $enable_option_checking in
1248 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001249 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001250 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1251 esac
1252fi
1253
1254# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1256 datadir sysconfdir sharedstatedir localstatedir includedir \
1257 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1258 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001259do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 # Remove trailing slashes.
1262 case $ac_val in
1263 */ )
1264 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1265 eval $ac_var=\$ac_val;;
1266 esac
1267 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269 [\\/$]* | ?:[\\/]* ) continue;;
1270 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001273done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274
Martin v. Löwis11437992002-04-12 09:54:03 +00001275# There might be people who depend on the old broken behavior: `$host'
1276# used to hold the argument of --host etc.
1277# FIXME: To remove some day.
1278build=$build_alias
1279host=$host_alias
1280target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281
Martin v. Löwis11437992002-04-12 09:54:03 +00001282# FIXME: To remove some day.
1283if test "x$host_alias" != x; then
1284 if test "x$build_alias" = x; then
1285 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001286 elif test "x$build_alias" != "x$host_alias"; then
1287 cross_compiling=yes
1288 fi
1289fi
1290
1291ac_tool_prefix=
1292test -n "$host_alias" && ac_tool_prefix=$host_alias-
1293
1294test "$silent" = yes && exec 6>/dev/null
1295
Guido van Rossum627b2d71993-12-24 10:39:16 +00001296
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297ac_pwd=`pwd` && test -n "$ac_pwd" &&
1298ac_ls_di=`ls -di .` &&
1299ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001300 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303
1304
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305# Find the source files, if location was not specified.
1306if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001307 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001309 ac_confdir=`$as_dirname -- "$as_myself" ||
1310$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1311 X"$as_myself" : 'X\(//\)[^/]' \| \
1312 X"$as_myself" : 'X\(//\)$' \| \
1313 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1314$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001315 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1316 s//\1/
1317 q
1318 }
1319 /^X\(\/\/\)[^/].*/{
1320 s//\1/
1321 q
1322 }
1323 /^X\(\/\/\)$/{
1324 s//\1/
1325 q
1326 }
1327 /^X\(\/\).*/{
1328 s//\1/
1329 q
1330 }
1331 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001332 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334 srcdir=..
1335 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336else
1337 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339if test ! -r "$srcdir/$ac_unique_file"; then
1340 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1344ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001345 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 pwd)`
1347# When building in place, set srcdir=.
1348if test "$ac_abs_confdir" = "$ac_pwd"; then
1349 srcdir=.
1350fi
1351# Remove unnecessary trailing slashes from srcdir.
1352# Double slashes in file names in object file debugging info
1353# mess up M-x gdb in Emacs.
1354case $srcdir in
1355*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1356esac
1357for ac_var in $ac_precious_vars; do
1358 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1359 eval ac_env_${ac_var}_value=\$${ac_var}
1360 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1361 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1362done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001363
Martin v. Löwis11437992002-04-12 09:54:03 +00001364#
1365# Report the --help message.
1366#
1367if test "$ac_init_help" = "long"; then
1368 # Omit some internal or obsolete options to make the list less imposing.
1369 # This message is too long to be a string in the A/UX 3.1 sh.
1370 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001371\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001372
1373Usage: $0 [OPTION]... [VAR=VALUE]...
1374
1375To assign environment variables (e.g., CC, CFLAGS...), specify them as
1376VAR=VALUE. See below for descriptions of some of the useful variables.
1377
1378Defaults for the options are specified in brackets.
1379
1380Configuration:
1381 -h, --help display this help and exit
1382 --help=short display options specific to this package
1383 --help=recursive display the short help of all the included packages
1384 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 --cache-file=FILE cache test results in FILE [disabled]
1387 -C, --config-cache alias for \`--cache-file=config.cache'
1388 -n, --no-create do not create output files
1389 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1390
Martin v. Löwis11437992002-04-12 09:54:03 +00001391Installation directories:
1392 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001393 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
1397By default, \`make install' will install all the files in
1398\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1399an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1400for instance \`--prefix=\$HOME'.
1401
1402For better control, use the options below.
1403
1404Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001405 --bindir=DIR user executables [EPREFIX/bin]
1406 --sbindir=DIR system admin executables [EPREFIX/sbin]
1407 --libexecdir=DIR program executables [EPREFIX/libexec]
1408 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1409 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1410 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1411 --libdir=DIR object code libraries [EPREFIX/lib]
1412 --includedir=DIR C header files [PREFIX/include]
1413 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1414 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1415 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1416 --infodir=DIR info documentation [DATAROOTDIR/info]
1417 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1418 --mandir=DIR man documentation [DATAROOTDIR/man]
1419 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1420 --htmldir=DIR html documentation [DOCDIR]
1421 --dvidir=DIR dvi documentation [DOCDIR]
1422 --pdfdir=DIR pdf documentation [DOCDIR]
1423 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424_ACEOF
1425
1426 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001427
1428System types:
1429 --build=BUILD configure for building on BUILD [guessed]
1430 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001431_ACEOF
1432fi
1433
1434if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001435 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001436 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001437 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 cat <<\_ACEOF
1439
1440Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001441 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1443 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001444 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001445 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --enable-framework[=INSTALLDIR]
1447 Build (MacOSX|Darwin) framework
1448 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001449 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001450 --enable-loadable-sqlite-extensions
1451 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --enable-ipv6 Enable ipv6 (with ipv4) support
1453 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001454 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001455 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001456
1457Optional Packages:
1458 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1459 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001460 --with-universal-archs=ARCH
1461 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001462 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001463 --with-framework-name=FRAMEWORK
1464 specify an alternate name of the framework built
1465 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001466 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001467 --with-cxx-main=<compiler>
1468 compile main() and link python executable with C++
1469 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001470 --with-suffix=.exe set executable suffix
1471 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001472 --with-hash-algorithm=[fnv|siphash24]
1473 select hash algorithm
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001475 --with-system-expat build pyexpat module using an installed expat
1476 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001477 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001478 --with-system-libmpdec build _decimal module using an installed libmpdec
1479 library
Ned Deilyd819b932013-09-06 01:07:05 -07001480 --with-tcltk-includes='-I...'
1481 override search for Tcl and Tk include files
1482 --with-tcltk-libs='-L...'
1483 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001484 --with-dbmliborder=db1:db2:...
1485 order to check db backends for dbm. Valid value is a
1486 colon separated string with the backend names
1487 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with(out)-threads[=DIRECTORY]
1490 disable/enable thread support
1491 --with(out)-thread[=DIRECTORY]
1492 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001494 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001496 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --with-fpectl enable SIGFPE catching
1498 --with-libm=STRING math library
1499 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001500 --with(out)-computed-gotos
1501 Use computed gotos in evaluation loop (enabled by
1502 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001503 --with(out)-ensurepip=[=upgrade]
1504 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
1506Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001507 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 CC C compiler command
1509 CFLAGS C compiler flags
1510 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1511 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001512 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001513 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 CPP C preprocessor
1516
1517Use these variables to override the choices made by `configure' or to help
1518it to find libraries and programs with nonstandard names/locations.
1519
Georg Brandle2e15612009-05-20 18:25:10 +00001520Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001521_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001522ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001523fi
1524
1525if test "$ac_init_help" = "recursive"; then
1526 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001528 test -d "$ac_dir" ||
1529 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1530 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001531 ac_builddir=.
1532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001533case "$ac_dir" in
1534.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1535*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001536 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001538 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539 case $ac_top_builddir_sub in
1540 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1541 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1542 esac ;;
1543esac
1544ac_abs_top_builddir=$ac_pwd
1545ac_abs_builddir=$ac_pwd$ac_dir_suffix
1546# for backward compatibility:
1547ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
1549case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001552 ac_top_srcdir=$ac_top_builddir_sub
1553 ac_abs_top_srcdir=$ac_pwd ;;
1554 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 ac_top_srcdir=$srcdir
1557 ac_abs_top_srcdir=$srcdir ;;
1558 *) # Relative name.
1559 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1560 ac_top_srcdir=$ac_top_build_prefix$srcdir
1561 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001562esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565 cd "$ac_dir" || { ac_status=$?; continue; }
1566 # Check for guested configure.
1567 if test -f "$ac_srcdir/configure.gnu"; then
1568 echo &&
1569 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1570 elif test -f "$ac_srcdir/configure"; then
1571 echo &&
1572 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001574 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575 fi || ac_status=$?
1576 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 done
1578fi
1579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001581if $ac_init_version; then
1582 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001583python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001584generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001585
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001586Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001587This configure script is free software; the Free Software Foundation
1588gives unlimited permission to copy, distribute and modify it.
1589_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001592
1593## ------------------------ ##
1594## Autoconf initialization. ##
1595## ------------------------ ##
1596
1597# ac_fn_c_try_compile LINENO
1598# --------------------------
1599# Try to compile conftest.$ac_ext, and return whether this succeeded.
1600ac_fn_c_try_compile ()
1601{
1602 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1603 rm -f conftest.$ac_objext
1604 if { { ac_try="$ac_compile"
1605case "(($ac_try" in
1606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1607 *) ac_try_echo=$ac_try;;
1608esac
1609eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1610$as_echo "$ac_try_echo"; } >&5
1611 (eval "$ac_compile") 2>conftest.err
1612 ac_status=$?
1613 if test -s conftest.err; then
1614 grep -v '^ *+' conftest.err >conftest.er1
1615 cat conftest.er1 >&5
1616 mv -f conftest.er1 conftest.err
1617 fi
1618 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1619 test $ac_status = 0; } && {
1620 test -z "$ac_c_werror_flag" ||
1621 test ! -s conftest.err
1622 } && test -s conftest.$ac_objext; then :
1623 ac_retval=0
1624else
1625 $as_echo "$as_me: failed program was:" >&5
1626sed 's/^/| /' conftest.$ac_ext >&5
1627
1628 ac_retval=1
1629fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001630 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001631 as_fn_set_status $ac_retval
1632
1633} # ac_fn_c_try_compile
1634
Matthias Kloseb9621712010-04-24 17:59:49 +00001635# ac_fn_c_try_link LINENO
1636# -----------------------
1637# Try to link conftest.$ac_ext, and return whether this succeeded.
1638ac_fn_c_try_link ()
1639{
1640 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1641 rm -f conftest.$ac_objext conftest$ac_exeext
1642 if { { ac_try="$ac_link"
1643case "(($ac_try" in
1644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1645 *) ac_try_echo=$ac_try;;
1646esac
1647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1648$as_echo "$ac_try_echo"; } >&5
1649 (eval "$ac_link") 2>conftest.err
1650 ac_status=$?
1651 if test -s conftest.err; then
1652 grep -v '^ *+' conftest.err >conftest.er1
1653 cat conftest.er1 >&5
1654 mv -f conftest.er1 conftest.err
1655 fi
1656 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1657 test $ac_status = 0; } && {
1658 test -z "$ac_c_werror_flag" ||
1659 test ! -s conftest.err
1660 } && test -s conftest$ac_exeext && {
1661 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001662 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001663 }; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
1671 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1672 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1673 # interfere with the next link command; also delete a directory that is
1674 # left behind by Apple's compiler. We do this before executing the actions.
1675 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_link
1680
Matthias Kloseb9621712010-04-24 17:59:49 +00001681# ac_fn_c_try_cpp LINENO
1682# ----------------------
1683# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_cpp ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1687 if { { ac_try="$ac_cpp conftest.$ac_ext"
1688case "(($ac_try" in
1689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690 *) ac_try_echo=$ac_try;;
1691esac
1692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1693$as_echo "$ac_try_echo"; } >&5
1694 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1695 ac_status=$?
1696 if test -s conftest.err; then
1697 grep -v '^ *+' conftest.err >conftest.er1
1698 cat conftest.er1 >&5
1699 mv -f conftest.er1 conftest.err
1700 fi
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001702 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001703 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1704 test ! -s conftest.err
1705 }; then :
1706 ac_retval=0
1707else
1708 $as_echo "$as_me: failed program was:" >&5
1709sed 's/^/| /' conftest.$ac_ext >&5
1710
1711 ac_retval=1
1712fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001713 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001714 as_fn_set_status $ac_retval
1715
1716} # ac_fn_c_try_cpp
1717
1718# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1719# -------------------------------------------------------
1720# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1721# the include files in INCLUDES and setting the cache variable VAR
1722# accordingly.
1723ac_fn_c_check_header_mongrel ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001726 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1728$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001729if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 $as_echo_n "(cached) " >&6
1731fi
1732eval ac_res=\$$3
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1734$as_echo "$ac_res" >&6; }
1735else
1736 # Is the header compilable?
1737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1738$as_echo_n "checking $2 usability... " >&6; }
1739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1740/* end confdefs.h. */
1741$4
1742#include <$2>
1743_ACEOF
1744if ac_fn_c_try_compile "$LINENO"; then :
1745 ac_header_compiler=yes
1746else
1747 ac_header_compiler=no
1748fi
1749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1751$as_echo "$ac_header_compiler" >&6; }
1752
1753# Is the header present?
1754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1755$as_echo_n "checking $2 presence... " >&6; }
1756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1757/* end confdefs.h. */
1758#include <$2>
1759_ACEOF
1760if ac_fn_c_try_cpp "$LINENO"; then :
1761 ac_header_preproc=yes
1762else
1763 ac_header_preproc=no
1764fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001765rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1767$as_echo "$ac_header_preproc" >&6; }
1768
1769# So? What about this header?
1770case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1771 yes:no: )
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1773$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1775$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1776 ;;
1777 no:yes:* )
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1779$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1781$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1783$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1785$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1787$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001788( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001789## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001790## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001791 ) | sed "s/^/$as_me: WARNING: /" >&2
1792 ;;
1793esac
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1795$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001796if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001797 $as_echo_n "(cached) " >&6
1798else
1799 eval "$3=\$ac_header_compiler"
1800fi
1801eval ac_res=\$$3
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1803$as_echo "$ac_res" >&6; }
1804fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001805 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001806
1807} # ac_fn_c_check_header_mongrel
1808
1809# ac_fn_c_try_run LINENO
1810# ----------------------
1811# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1812# that executables *can* be run.
1813ac_fn_c_try_run ()
1814{
1815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816 if { { ac_try="$ac_link"
1817case "(($ac_try" in
1818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1819 *) ac_try_echo=$ac_try;;
1820esac
1821eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1822$as_echo "$ac_try_echo"; } >&5
1823 (eval "$ac_link") 2>&5
1824 ac_status=$?
1825 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1826 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1827 { { case "(($ac_try" in
1828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829 *) ac_try_echo=$ac_try;;
1830esac
1831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1832$as_echo "$ac_try_echo"; } >&5
1833 (eval "$ac_try") 2>&5
1834 ac_status=$?
1835 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1836 test $ac_status = 0; }; }; then :
1837 ac_retval=0
1838else
1839 $as_echo "$as_me: program exited with status $ac_status" >&5
1840 $as_echo "$as_me: failed program was:" >&5
1841sed 's/^/| /' conftest.$ac_ext >&5
1842
1843 ac_retval=$ac_status
1844fi
1845 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847 as_fn_set_status $ac_retval
1848
1849} # ac_fn_c_try_run
1850
1851# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1852# -------------------------------------------------------
1853# Tests whether HEADER exists and can be compiled using the include files in
1854# INCLUDES, setting the cache variable VAR accordingly.
1855ac_fn_c_check_header_compile ()
1856{
1857 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1859$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001860if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001861 $as_echo_n "(cached) " >&6
1862else
1863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1864/* end confdefs.h. */
1865$4
1866#include <$2>
1867_ACEOF
1868if ac_fn_c_try_compile "$LINENO"; then :
1869 eval "$3=yes"
1870else
1871 eval "$3=no"
1872fi
1873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1874fi
1875eval ac_res=\$$3
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1877$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001878 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001879
1880} # ac_fn_c_check_header_compile
1881
Matthias Kloseb9621712010-04-24 17:59:49 +00001882# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1883# -------------------------------------------
1884# Tests whether TYPE exists after having included INCLUDES, setting cache
1885# variable VAR accordingly.
1886ac_fn_c_check_type ()
1887{
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1890$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001891if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001892 $as_echo_n "(cached) " >&6
1893else
1894 eval "$3=no"
1895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1896/* end confdefs.h. */
1897$4
1898int
1899main ()
1900{
1901if (sizeof ($2))
1902 return 0;
1903 ;
1904 return 0;
1905}
1906_ACEOF
1907if ac_fn_c_try_compile "$LINENO"; then :
1908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1909/* end confdefs.h. */
1910$4
1911int
1912main ()
1913{
1914if (sizeof (($2)))
1915 return 0;
1916 ;
1917 return 0;
1918}
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921
1922else
1923 eval "$3=yes"
1924fi
1925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926fi
1927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1928fi
1929eval ac_res=\$$3
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1931$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001933
1934} # ac_fn_c_check_type
1935
1936# ac_fn_c_find_uintX_t LINENO BITS VAR
1937# ------------------------------------
1938# Finds an unsigned integer type with width BITS, setting cache variable VAR
1939# accordingly.
1940ac_fn_c_find_uintX_t ()
1941{
1942 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1944$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001945if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001946 $as_echo_n "(cached) " >&6
1947else
1948 eval "$3=no"
1949 # Order is important - never check a type that is potentially smaller
1950 # than half of the expected target width.
1951 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1952 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1954/* end confdefs.h. */
1955$ac_includes_default
1956int
1957main ()
1958{
1959static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001960test_array [0] = 0;
1961return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001962
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968 case $ac_type in #(
1969 uint$2_t) :
1970 eval "$3=yes" ;; #(
1971 *) :
1972 eval "$3=\$ac_type" ;;
1973esac
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001976 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001977
1978else
1979 break
1980fi
1981 done
1982fi
1983eval ac_res=\$$3
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1985$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001986 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001987
1988} # ac_fn_c_find_uintX_t
1989
1990# ac_fn_c_find_intX_t LINENO BITS VAR
1991# -----------------------------------
1992# Finds a signed integer type with width BITS, setting cache variable VAR
1993# accordingly.
1994ac_fn_c_find_intX_t ()
1995{
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1998$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001999if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002000 $as_echo_n "(cached) " >&6
2001else
2002 eval "$3=no"
2003 # Order is important - never check a type that is potentially smaller
2004 # than half of the expected target width.
2005 for ac_type in int$2_t 'int' 'long int' \
2006 'long long int' 'short int' 'signed char'; do
2007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002010 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002011int
2012main ()
2013{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002014static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002015test_array [0] = 0;
2016return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002026 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002027int
2028main ()
2029{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002030static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002031 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002032test_array [0] = 0;
2033return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040
2041else
2042 case $ac_type in #(
2043 int$2_t) :
2044 eval "$3=yes" ;; #(
2045 *) :
2046 eval "$3=\$ac_type" ;;
2047esac
2048fi
2049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2050fi
2051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002052 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002053
2054else
2055 break
2056fi
2057 done
2058fi
2059eval ac_res=\$$3
2060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2061$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002062 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064} # ac_fn_c_find_intX_t
2065
2066# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2067# --------------------------------------------
2068# Tries to find the compile-time value of EXPR in a program that includes
2069# INCLUDES, setting VAR accordingly. Returns whether the value could be
2070# computed
2071ac_fn_c_compute_int ()
2072{
2073 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2074 if test "$cross_compiling" = yes; then
2075 # Depending upon the size, compute the lo and hi bounds.
2076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002083test_array [0] = 0;
2084return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091 ac_lo=0 ac_mid=0
2092 while :; do
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid; break
2109else
2110 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2111 if test $ac_lo -le $ac_mid; then
2112 ac_lo= ac_hi=
2113 break
2114 fi
2115 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2116fi
2117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118 done
2119else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123int
2124main ()
2125{
2126static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002127test_array [0] = 0;
2128return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002129
2130 ;
2131 return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135 ac_hi=-1 ac_mid=-1
2136 while :; do
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138/* end confdefs.h. */
2139$4
2140int
2141main ()
2142{
2143static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002144test_array [0] = 0;
2145return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_compile "$LINENO"; then :
2152 ac_lo=$ac_mid; break
2153else
2154 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2155 if test $ac_mid -le $ac_hi; then
2156 ac_lo= ac_hi=
2157 break
2158 fi
2159 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2160fi
2161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2162 done
2163else
2164 ac_lo= ac_hi=
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167fi
2168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2169# Binary search between lo and hi bounds.
2170while test "x$ac_lo" != "x$ac_hi"; do
2171 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173/* end confdefs.h. */
2174$4
2175int
2176main ()
2177{
2178static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002179test_array [0] = 0;
2180return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002181
2182 ;
2183 return 0;
2184}
2185_ACEOF
2186if ac_fn_c_try_compile "$LINENO"; then :
2187 ac_hi=$ac_mid
2188else
2189 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192done
2193case $ac_lo in #((
2194?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2195'') ac_retval=1 ;;
2196esac
2197 else
2198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199/* end confdefs.h. */
2200$4
2201static long int longval () { return $2; }
2202static unsigned long int ulongval () { return $2; }
2203#include <stdio.h>
2204#include <stdlib.h>
2205int
2206main ()
2207{
2208
2209 FILE *f = fopen ("conftest.val", "w");
2210 if (! f)
2211 return 1;
2212 if (($2) < 0)
2213 {
2214 long int i = longval ();
2215 if (i != ($2))
2216 return 1;
2217 fprintf (f, "%ld", i);
2218 }
2219 else
2220 {
2221 unsigned long int i = ulongval ();
2222 if (i != ($2))
2223 return 1;
2224 fprintf (f, "%lu", i);
2225 }
2226 /* Do not output a trailing newline, as this causes \r\n confusion
2227 on some platforms. */
2228 return ferror (f) || fclose (f) != 0;
2229
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234if ac_fn_c_try_run "$LINENO"; then :
2235 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2236else
2237 ac_retval=1
2238fi
2239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2240 conftest.$ac_objext conftest.beam conftest.$ac_ext
2241rm -f conftest.val
2242
2243 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002244 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002245 as_fn_set_status $ac_retval
2246
2247} # ac_fn_c_compute_int
2248
2249# ac_fn_c_check_func LINENO FUNC VAR
2250# ----------------------------------
2251# Tests whether FUNC exists, setting the cache variable VAR accordingly
2252ac_fn_c_check_func ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2256$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002257if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002258 $as_echo_n "(cached) " >&6
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2263 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2264#define $2 innocuous_$2
2265
2266/* System header to define __stub macros and hopefully few prototypes,
2267 which can conflict with char $2 (); below.
2268 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2269 <limits.h> exists even on freestanding compilers. */
2270
2271#ifdef __STDC__
2272# include <limits.h>
2273#else
2274# include <assert.h>
2275#endif
2276
2277#undef $2
2278
2279/* Override any GCC internal prototype to avoid an error.
2280 Use char because int might match the return type of a GCC
2281 builtin and then its argument prototype would still apply. */
2282#ifdef __cplusplus
2283extern "C"
2284#endif
2285char $2 ();
2286/* The GNU C library defines this for functions which it implements
2287 to always fail with ENOSYS. Some functions are actually named
2288 something starting with __ and the normal name is an alias. */
2289#if defined __stub_$2 || defined __stub___$2
2290choke me
2291#endif
2292
2293int
2294main ()
2295{
2296return $2 ();
2297 ;
2298 return 0;
2299}
2300_ACEOF
2301if ac_fn_c_try_link "$LINENO"; then :
2302 eval "$3=yes"
2303else
2304 eval "$3=no"
2305fi
2306rm -f core conftest.err conftest.$ac_objext \
2307 conftest$ac_exeext conftest.$ac_ext
2308fi
2309eval ac_res=\$$3
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2311$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002312 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002313
2314} # ac_fn_c_check_func
2315
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002316# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2317# ---------------------------------------------
2318# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2319# accordingly.
2320ac_fn_c_check_decl ()
2321{
2322 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2323 as_decl_name=`echo $2|sed 's/ *(.*//'`
2324 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2326$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2327if eval \${$3+:} false; then :
2328 $as_echo_n "(cached) " >&6
2329else
2330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h. */
2332$4
2333int
2334main ()
2335{
2336#ifndef $as_decl_name
2337#ifdef __cplusplus
2338 (void) $as_decl_use;
2339#else
2340 (void) $as_decl_name;
2341#endif
2342#endif
2343
2344 ;
2345 return 0;
2346}
2347_ACEOF
2348if ac_fn_c_try_compile "$LINENO"; then :
2349 eval "$3=yes"
2350else
2351 eval "$3=no"
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354fi
2355eval ac_res=\$$3
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2357$as_echo "$ac_res" >&6; }
2358 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2359
2360} # ac_fn_c_check_decl
2361
Matthias Kloseb9621712010-04-24 17:59:49 +00002362# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2363# ----------------------------------------------------
2364# Tries to find if the field MEMBER exists in type AGGR, after including
2365# INCLUDES, setting cache variable VAR accordingly.
2366ac_fn_c_check_member ()
2367{
2368 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2370$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002371if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002372 $as_echo_n "(cached) " >&6
2373else
2374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2375/* end confdefs.h. */
2376$5
2377int
2378main ()
2379{
2380static $2 ac_aggr;
2381if (ac_aggr.$3)
2382return 0;
2383 ;
2384 return 0;
2385}
2386_ACEOF
2387if ac_fn_c_try_compile "$LINENO"; then :
2388 eval "$4=yes"
2389else
2390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2391/* end confdefs.h. */
2392$5
2393int
2394main ()
2395{
2396static $2 ac_aggr;
2397if (sizeof ac_aggr.$3)
2398return 0;
2399 ;
2400 return 0;
2401}
2402_ACEOF
2403if ac_fn_c_try_compile "$LINENO"; then :
2404 eval "$4=yes"
2405else
2406 eval "$4=no"
2407fi
2408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409fi
2410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2411fi
2412eval ac_res=\$$4
2413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2414$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002415 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002416
2417} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002418cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002419This file contains any messages produced by compilers while
2420running configure, to aid debugging if configure makes a mistake.
2421
Georg Brandl08a90122012-09-29 09:34:13 +02002422It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002423generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002424
2425 $ $0 $@
2426
2427_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002428exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002429{
2430cat <<_ASUNAME
2431## --------- ##
2432## Platform. ##
2433## --------- ##
2434
2435hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2436uname -m = `(uname -m) 2>/dev/null || echo unknown`
2437uname -r = `(uname -r) 2>/dev/null || echo unknown`
2438uname -s = `(uname -s) 2>/dev/null || echo unknown`
2439uname -v = `(uname -v) 2>/dev/null || echo unknown`
2440
2441/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2442/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2443
2444/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2445/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2446/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002448/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2449/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2450/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2451
2452_ASUNAME
2453
2454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2455for as_dir in $PATH
2456do
2457 IFS=$as_save_IFS
2458 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 $as_echo "PATH: $as_dir"
2460 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002462
2463} >&5
2464
2465cat >&5 <<_ACEOF
2466
2467
2468## ----------- ##
2469## Core tests. ##
2470## ----------- ##
2471
2472_ACEOF
2473
2474
2475# Keep a trace of the command line.
2476# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002477# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002478# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002479# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002480ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002481ac_configure_args0=
2482ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002483ac_must_keep_next=false
2484for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002485do
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 for ac_arg
2487 do
2488 case $ac_arg in
2489 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2490 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2491 | -silent | --silent | --silen | --sile | --sil)
2492 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 esac
2496 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002501 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002503 case $ac_arg in
2504 *=* | --config-cache | -C | -disable-* | --disable-* \
2505 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2506 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2507 | -with-* | --with-* | -without-* | --without-* | --x)
2508 case "$ac_configure_args0 " in
2509 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2510 esac
2511 ;;
2512 -* ) ac_must_keep_next=true ;;
2513 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 ;;
2517 esac
2518 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002519done
Matthias Kloseb9621712010-04-24 17:59:49 +00002520{ ac_configure_args0=; unset ac_configure_args0;}
2521{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002522
2523# When interrupted or exit'd, cleanup temporary files, and complete
2524# config.log. We remove comments because anyway the quotes in there
2525# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526# WARNING: Use '\'' to represent an apostrophe within the trap.
2527# 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 +00002528trap 'exit_status=$?
2529 # Save into config.log some information that might help in debugging.
2530 {
2531 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002532
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002534## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002535## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
2537 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538(
2539 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2540 eval ac_val=\$$ac_var
2541 case $ac_val in #(
2542 *${as_nl}*)
2543 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2545$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 esac
2547 case $ac_var in #(
2548 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002549 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2550 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 esac ;;
2552 esac
2553 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002554 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2556 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 "s/'\''/'\''\\\\'\'''\''/g;
2559 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2560 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002561 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002563 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564 esac |
2565 sort
2566)
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002568
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002569 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002570## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002571## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002572 echo
2573 for ac_var in $ac_subst_vars
2574 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 eval ac_val=\$$ac_var
2576 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002580 done | sort
2581 echo
2582
2583 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002584 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002587 echo
2588 for ac_var in $ac_subst_files
2589 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590 eval ac_val=\$$ac_var
2591 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002595 done | sort
2596 echo
2597 fi
2598
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002601## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002602## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 echo
2606 fi
2607 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 $as_echo "$as_me: caught signal $ac_signal"
2609 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611 rm -f core *.core core.conftest.* &&
2612 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002615for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002617done
2618ac_signal=0
2619
2620# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002622
Matthias Kloseb9621712010-04-24 17:59:49 +00002623$as_echo "/* confdefs.h */" > confdefs.h
2624
Martin v. Löwis11437992002-04-12 09:54:03 +00002625# Predefined preprocessor variables.
2626
2627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_NAME "$PACKAGE_NAME"
2629_ACEOF
2630
Martin v. Löwis11437992002-04-12 09:54:03 +00002631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2633_ACEOF
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_VERSION "$PACKAGE_VERSION"
2637_ACEOF
2638
Martin v. Löwis11437992002-04-12 09:54:03 +00002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_STRING "$PACKAGE_STRING"
2641_ACEOF
2642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2645_ACEOF
2646
Matthias Kloseb9621712010-04-24 17:59:49 +00002647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_URL "$PACKAGE_URL"
2649_ACEOF
2650
Martin v. Löwis11437992002-04-12 09:54:03 +00002651
2652# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002653# Prefer an explicitly selected file to automatically selected ones.
2654ac_site_file1=NONE
2655ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002656if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002657 # We do not want a PATH search for config.site.
2658 case $CONFIG_SITE in #((
2659 -*) ac_site_file1=./$CONFIG_SITE;;
2660 */*) ac_site_file1=$CONFIG_SITE;;
2661 *) ac_site_file1=./$CONFIG_SITE;;
2662 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 ac_site_file1=$prefix/share/config.site
2665 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002666else
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 ac_site_file1=$ac_default_prefix/share/config.site
2668 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002670for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671do
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 test "x$ac_site_file" = xNONE && continue
2673 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2675$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002677 . "$ac_site_file" \
2678 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2680as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002681See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682 fi
2683done
2684
2685if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002686 # Some versions of bash will fail to source /dev/null (special files
2687 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2688 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2690$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2693 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 esac
2695 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696else
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2698$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002699 >$cache_file
2700fi
2701
2702# Check that the precious variables saved in the cache have kept the same
2703# value.
2704ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2707 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002708 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2709 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 case $ac_old_set,$ac_new_set in
2711 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2713$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 +00002714 ac_cache_corrupted=: ;;
2715 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2717$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 ac_cache_corrupted=: ;;
2719 ,);;
2720 *)
2721 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002722 # differences in whitespace do not lead to failure.
2723 ac_old_val_w=`echo x $ac_old_val`
2724 ac_new_val_w=`echo x $ac_new_val`
2725 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2727$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2728 ac_cache_corrupted=:
2729 else
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2731$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2732 eval $ac_var=\$ac_old_val
2733 fi
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2735$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2737$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 fi;;
2739 esac
2740 # Pass precious variables to config.status.
2741 if test "$ac_new_set" = set; then
2742 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002743 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 *) ac_arg=$ac_var=$ac_new_val ;;
2745 esac
2746 case " $ac_configure_args " in
2747 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002748 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 esac
2750 fi
2751done
2752if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002753 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2756$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002757 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002759## -------------------- ##
2760## Main body of script. ##
2761## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762
Guido van Rossum7f43da71994-08-01 12:15:30 +00002763ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002764ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002765ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2766ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2767ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768
Guido van Rossum627b2d71993-12-24 10:39:16 +00002769
Michael W. Hudson54241132001-12-07 15:38:26 +00002770
Trent Nelson4d4ec652012-10-16 08:51:24 -04002771
Trent Nelson5595ab52012-10-17 04:47:31 -04002772if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002773 # If we're building out-of-tree, we need to make sure the following
2774 # resources get picked up before their $srcdir counterparts.
2775 # Objects/ -> typeslots.inc
2776 # Include/ -> Python-ast.h, graminit.h
2777 # Python/ -> importlib.h
2778 # (A side effect of this is that these resources will automatically be
2779 # regenerated when building out-of-tree, regardless of whether or not
2780 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2781 # off.)
2782 BASECPPFLAGS="-IObjects -IInclude -IPython"
2783else
2784 BASECPPFLAGS=""
2785fi
2786
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002787
2788
2789
2790
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002791if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002792then
2793# Extract the first word of "hg", so it can be a program name with args.
2794set dummy hg; ac_word=$2
2795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002797if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002798 $as_echo_n "(cached) " >&6
2799else
2800 if test -n "$HAS_HG"; then
2801 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2802else
2803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2804for as_dir in $PATH
2805do
2806 IFS=$as_save_IFS
2807 test -z "$as_dir" && as_dir=.
2808 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002810 ac_cv_prog_HAS_HG="found"
2811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2812 break 2
2813 fi
2814done
2815 done
2816IFS=$as_save_IFS
2817
2818 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2819fi
2820fi
2821HAS_HG=$ac_cv_prog_HAS_HG
2822if test -n "$HAS_HG"; then
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2824$as_echo "$HAS_HG" >&6; }
2825else
2826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2827$as_echo "no" >&6; }
2828fi
2829
2830
2831else
2832HAS_HG=no-repository
2833fi
2834if test $HAS_HG = found
2835then
2836 HGVERSION="hg id -i \$(srcdir)"
2837 HGTAG="hg id -t \$(srcdir)"
2838 HGBRANCH="hg id -b \$(srcdir)"
2839else
2840 HGVERSION=""
2841 HGTAG=""
2842 HGBRANCH=""
2843fi
2844
2845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002846ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002847
2848
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002849ac_aux_dir=
2850for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2851 if test -f "$ac_dir/install-sh"; then
2852 ac_aux_dir=$ac_dir
2853 ac_install_sh="$ac_aux_dir/install-sh -c"
2854 break
2855 elif test -f "$ac_dir/install.sh"; then
2856 ac_aux_dir=$ac_dir
2857 ac_install_sh="$ac_aux_dir/install.sh -c"
2858 break
2859 elif test -f "$ac_dir/shtool"; then
2860 ac_aux_dir=$ac_dir
2861 ac_install_sh="$ac_aux_dir/shtool install -c"
2862 break
2863 fi
2864done
2865if test -z "$ac_aux_dir"; then
2866 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2867fi
2868
2869# These three variables are undocumented and unsupported,
2870# and are intended to be withdrawn in a future Autoconf release.
2871# They can cause serious problems if a builder's source tree is in a directory
2872# whose full name contains unusual characters.
2873ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2874ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2875ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2876
2877
2878# Make sure we can run config.sub.
2879$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2880 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2881
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2883$as_echo_n "checking build system type... " >&6; }
2884if ${ac_cv_build+:} false; then :
2885 $as_echo_n "(cached) " >&6
2886else
2887 ac_build_alias=$build_alias
2888test "x$ac_build_alias" = x &&
2889 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2890test "x$ac_build_alias" = x &&
2891 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2892ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2893 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2894
2895fi
2896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2897$as_echo "$ac_cv_build" >&6; }
2898case $ac_cv_build in
2899*-*-*) ;;
2900*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2901esac
2902build=$ac_cv_build
2903ac_save_IFS=$IFS; IFS='-'
2904set x $ac_cv_build
2905shift
2906build_cpu=$1
2907build_vendor=$2
2908shift; shift
2909# Remember, the first character of IFS is used to create $*,
2910# except with old shells:
2911build_os=$*
2912IFS=$ac_save_IFS
2913case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2914
2915
2916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2917$as_echo_n "checking host system type... " >&6; }
2918if ${ac_cv_host+:} false; then :
2919 $as_echo_n "(cached) " >&6
2920else
2921 if test "x$host_alias" = x; then
2922 ac_cv_host=$ac_cv_build
2923else
2924 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2925 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2926fi
2927
2928fi
2929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2930$as_echo "$ac_cv_host" >&6; }
2931case $ac_cv_host in
2932*-*-*) ;;
2933*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2934esac
2935host=$ac_cv_host
2936ac_save_IFS=$IFS; IFS='-'
2937set x $ac_cv_host
2938shift
2939host_cpu=$1
2940host_vendor=$2
2941shift; shift
2942# Remember, the first character of IFS is used to create $*,
2943# except with old shells:
2944host_os=$*
2945IFS=$ac_save_IFS
2946case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2947
2948
2949
doko@python.orga10e4a92013-01-25 18:45:12 +01002950
2951
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002952if test "$cross_compiling" = yes; then
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2954$as_echo_n "checking for python interpreter for cross build... " >&6; }
2955 if test -z "$PYTHON_FOR_BUILD"; then
2956 for interp in python$PACKAGE_VERSION python3 python; do
2957 which $interp >/dev/null 2>&1 || continue
2958 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2959 break
2960 fi
2961 interp=
2962 done
2963 if test x$interp = x; then
2964 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2965 fi
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2967$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002968 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 +02002969 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002970elif test "$cross_compiling" = maybe; then
2971 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002972else
2973 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2974fi
2975
2976
Martin v. Löwis11437992002-04-12 09:54:03 +00002977
Benjamin Petersond23f8222009-04-05 19:13:16 +00002978if test "$prefix" != "/"; then
2979 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2980fi
2981
2982
Martin v. Löwis11437992002-04-12 09:54:03 +00002983
2984
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002985# We don't use PACKAGE_ variables, and they cause conflicts
2986# with other autoconf-based packages that include Python.h
2987grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2988rm confdefs.h
2989mv confdefs.h.new confdefs.h
2990
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002991
Georg Brandl08a90122012-09-29 09:34:13 +02002992VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002993
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002994# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002995
2996SOVERSION=1.0
2997
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002998# The later defininition of _XOPEN_SOURCE disables certain features
2999# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002
3003
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003004# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3005# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3006# them.
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003009
3010
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003011# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3012# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3013# them.
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003016
3017
Martin v. Löwisd6320502004-08-12 13:45:08 +00003018# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3019# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003022
3023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003024# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3025# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3026# them.
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003029
3030
3031
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003032define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003033
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003034# Arguments passed to configure.
3035
3036CONFIG_ARGS="$ac_configure_args"
3037
Matthias Kloseb9621712010-04-24 17:59:49 +00003038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3039$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003041if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003043 case $enableval in
3044 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003045 # Locate the best usable SDK, see Mac/README.txt for more
3046 # information
3047 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003048 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003050 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3051 if test ! -d "${enableval}"
3052 then
3053 enableval=/
3054 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003055 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003056 ;;
3057 esac
3058 case $enableval in
3059 no)
3060 UNIVERSALSDK=
3061 enable_universalsdk=
3062 ;;
3063 *)
3064 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065 if test ! -d "${UNIVERSALSDK}"
3066 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003067 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003068 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003069 ;;
3070 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003071
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072
Thomas Wouters477c8d52006-05-27 19:21:47 +00003073else
3074
3075 UNIVERSALSDK=
3076 enable_universalsdk=
3077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003078fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003079
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003080if test -n "${UNIVERSALSDK}"
3081then
Matthias Kloseb9621712010-04-24 17:59:49 +00003082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3083$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003084else
Matthias Kloseb9621712010-04-24 17:59:49 +00003085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3086$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003087fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003089
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003090
Ned Deily87adb6e2013-10-18 21:09:56 -07003091ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003092
Ned Deilycbfb9a52012-06-23 16:02:19 -07003093# For backward compatibility reasons we prefer to select '32-bit' if available,
3094# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003096if test "`uname -s`" = "Darwin"
3097then
3098 if test -n "${UNIVERSALSDK}"
3099 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003100 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003101 then
3102 UNIVERSAL_ARCHS="intel"
3103 fi
3104 fi
3105fi
3106
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003107
Matthias Kloseb9621712010-04-24 17:59:49 +00003108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3109$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003110
3111# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003112if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003113 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114 UNIVERSAL_ARCHS="$withval"
3115
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003116fi
3117
Ned Deily87adb6e2013-10-18 21:09:56 -07003118if test -n "${UNIVERSALSDK}"
3119then
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3121$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3122else
3123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3124$as_echo "no" >&6; }
3125fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003126
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003127
3128# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003129if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003130 withval=$with_framework_name;
3131 PYTHONFRAMEWORK=${withval}
3132 PYTHONFRAMEWORKDIR=${withval}.framework
3133 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3134
3135else
3136
3137 PYTHONFRAMEWORK=Python
3138 PYTHONFRAMEWORKDIR=Python.framework
3139 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3140
3141fi
3142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003144if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003145 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003146 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003147 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003148 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003149 esac
3150 case $enableval in
3151 no)
3152 PYTHONFRAMEWORK=
3153 PYTHONFRAMEWORKDIR=no-framework
3154 PYTHONFRAMEWORKPREFIX=
3155 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003156 FRAMEWORKINSTALLFIRST=
3157 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003158 FRAMEWORKALTINSTALLFIRST=
3159 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003160 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003161 if test "x${prefix}" = "xNONE"; then
3162 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3163 else
3164 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3165 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003166 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003167 ;;
3168 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003169 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003170 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003171 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003172 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003173 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3174 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003175 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003176 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003177
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003178 if test "x${prefix}" = "xNONE" ; then
3179 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003180
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003181 else
3182 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3183 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184
3185 case "${enableval}" in
3186 /System*)
3187 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3188 if test "${prefix}" = "NONE" ; then
3189 # See below
3190 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3191 fi
3192 ;;
3193
3194 /Library*)
3195 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3196 ;;
3197
3198 */Library/Frameworks)
3199 MDIR="`dirname "${enableval}"`"
3200 MDIR="`dirname "${MDIR}"`"
3201 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3202
3203 if test "${prefix}" = "NONE"; then
3204 # User hasn't specified the
3205 # --prefix option, but wants to install
3206 # the framework in a non-default location,
3207 # ensure that the compatibility links get
3208 # installed relative to that prefix as well
3209 # instead of in /usr/local.
3210 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3211 fi
3212 ;;
3213
3214 *)
3215 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3216 ;;
3217 esac
3218
Jack Jansen127e56e2001-09-11 14:41:54 +00003219 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003221 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003222 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003227 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3228
3229 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3230
Jack Jansene578a632001-08-15 01:27:14 +00003231 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003232
Guido van Rossum563e7081996-09-10 18:20:48 +00003233else
Martin v. Löwis11437992002-04-12 09:54:03 +00003234
Jack Jansene578a632001-08-15 01:27:14 +00003235 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003236 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003237 PYTHONFRAMEWORKPREFIX=
3238 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003239 FRAMEWORKINSTALLFIRST=
3240 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003241 FRAMEWORKALTINSTALLFIRST=
3242 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003243 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003244 if test "x${prefix}" = "xNONE" ; then
3245 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3246 else
3247 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3248 fi
Jack Jansene578a632001-08-15 01:27:14 +00003249 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003252fi
3253
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254
3255
Michael W. Hudson54241132001-12-07 15:38:26 +00003256
3257
3258
3259
Jack Jansene578a632001-08-15 01:27:14 +00003260
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003261
3262
3263
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003264
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003265
Ned Deilyb8f944f2013-11-21 22:42:25 -08003266
Jack Jansene578a632001-08-15 01:27:14 +00003267##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003268## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003269## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003270##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271# Set name for machine-dependent library files
3272
Matthias Kloseb9621712010-04-24 17:59:49 +00003273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3274$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275if test -z "$MACHDEP"
3276then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 # avoid using uname for cross builds
3278 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003279 # ac_sys_system and ac_sys_release are used for setting
3280 # a lot of different things including 'define_xopen_source'
3281 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 case "$host" in
3283 *-*-linux*)
3284 ac_sys_system=Linux
3285 ;;
3286 *-*-cygwin*)
3287 ac_sys_system=Cygwin
3288 ;;
3289 *)
3290 # for now, limit cross builds to known configurations
3291 MACHDEP="unknown"
3292 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3293 esac
3294 ac_sys_release=
3295 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003296 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003297 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003298 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003299 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003300 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003301 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003302 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003303 fi
3304 ac_md_system=`echo $ac_sys_system |
3305 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3306 ac_md_release=`echo $ac_sys_release |
3307 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3308 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003309
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003310 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003311 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003312 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003313 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003314 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003315 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003316 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003317fi
Guido van Rossum91922671997-10-09 20:24:13 +00003318
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003319
3320if test "$cross_compiling" = yes; then
3321 case "$host" in
3322 *-*-linux*)
3323 case "$host_cpu" in
3324 arm*)
3325 _host_cpu=arm
3326 ;;
3327 *)
3328 _host_cpu=$host_cpu
3329 esac
3330 ;;
3331 *-*-cygwin*)
3332 _host_cpu=
3333 ;;
3334 *)
3335 # for now, limit cross builds to known configurations
3336 MACHDEP="unknown"
3337 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3338 esac
3339 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3340fi
3341
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003342# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3343# disable features if it is defined, without any means to access these
3344# features as extensions. For these systems, we skip the definition of
3345# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3346# some feature, make sure there is no alternative way to access this
3347# feature. Also, when using wildcards, make sure you have verified the
3348# need for not defining _XOPEN_SOURCE on all systems matching the
3349# wildcard, and that the wildcard does not include future systems
3350# (which may remove their limitations).
3351case $ac_sys_system/$ac_sys_release in
3352 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3353 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003354 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003355 # In addition, Stefan Krah confirms that issue #1244610 exists through
3356 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003357 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003358 define_xopen_source=no
3359 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3360 # also defined. This can be overridden by defining _BSD_SOURCE
3361 # As this has a different meaning on Linux, only define it on OpenBSD
3362
Matthias Kloseb9621712010-04-24 17:59:49 +00003363$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003364
3365 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003366 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003367 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3368 # also defined. This can be overridden by defining _BSD_SOURCE
3369 # As this has a different meaning on Linux, only define it on OpenBSD
3370
Matthias Kloseb9621712010-04-24 17:59:49 +00003371$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003372
3373 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003374 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3375 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3376 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003377 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 +00003378 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003379 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3380 # request to enable features supported by the standard as a request
3381 # to disable features not supported by the standard. The best way
3382 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3383 # entirely and define __EXTENSIONS__ instead.
3384 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003385 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003386 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3387 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003388 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003389 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003390 define_xopen_source=no;;
3391 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003392 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003393 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003394 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003395 # On FreeBSD 4, the math functions C89 does not cover are never defined
3396 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3397 FreeBSD/4.*)
3398 define_xopen_source=no;;
3399 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3400 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3401 # identifies itself as Darwin/7.*
3402 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3403 # disables platform specific features beyond repair.
3404 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3405 # has no effect, don't bother defining them
3406 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003407 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003408 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003409 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003410 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3411 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3412 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003413 AIX/4)
3414 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003415 AIX/5)
3416 if test `uname -r` -eq 1; then
3417 define_xopen_source=no
3418 fi
3419 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003420 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3421 # defining NI_NUMERICHOST.
3422 QNX/6.3.2)
3423 define_xopen_source=no
3424 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003425
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003426esac
3427
3428if test $define_xopen_source = yes
3429then
Victor Stinner14d098d2011-09-07 22:29:43 +02003430 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003431
Victor Stinner14d098d2011-09-07 22:29:43 +02003432$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003433
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003434
3435 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3436 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3437 # several APIs are not declared. Since this is also needed in some
3438 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003439
Matthias Kloseb9621712010-04-24 17:59:49 +00003440$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003441
3442
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003443
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003444$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003445
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003446fi
3447
Christian Heimes647cd872013-12-07 23:39:33 +01003448# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3449case $ac_sys_system in
3450hp*|HP*)
3451
3452$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3453
3454 ;;
3455esac
3456
Guido van Rossum91922671997-10-09 20:24:13 +00003457#
3458# SGI compilers allow the specification of the both the ABI and the
3459# ISA on the command line. Depending on the values of these switches,
3460# different and often incompatable code will be generated.
3461#
3462# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3463# thus supply support for various ABI/ISA combinations. The MACHDEP
3464# variable is also adjusted.
3465#
3466
3467if test ! -z "$SGI_ABI"
3468then
3469 CC="cc $SGI_ABI"
3470 LDFLAGS="$SGI_ABI $LDFLAGS"
3471 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3474$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003475
Jack Jansen6b08a402004-06-03 12:41:45 +00003476# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3477# it may influence the way we can build extensions, so distutils
3478# needs to check it
3479
Thomas Wouters477c8d52006-05-27 19:21:47 +00003480
Jack Jansen6b08a402004-06-03 12:41:45 +00003481CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003482EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003483
Guido van Rossum627b2d71993-12-24 10:39:16 +00003484# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003485
3486# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3487# for debug/optimization stuff. BASECFLAGS is for flags that are required
3488# just to get things to compile and link. Users are free to override OPT
3489# when running configure or make. The build should not break if they do.
3490# BASECFLAGS should generally not be messed with, however.
3491
3492# XXX shouldn't some/most/all of this code be merged with the stuff later
3493# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3495$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003497# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003498if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003499 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003500 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003501 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003502 without_gcc=yes;;
3503 yes) CC=gcc
3504 without_gcc=no;;
3505 *) CC=$withval
3506 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003507 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003508else
Martin v. Löwis11437992002-04-12 09:54:03 +00003509
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003510 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003511 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003512 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003513 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003514 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003515fi
3516
Matthias Kloseb9621712010-04-24 17:59:49 +00003517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3518$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003519
Guido van Rossum8b131c51995-03-09 14:10:13 +00003520# If the user switches compilers, we can't believe the cache
3521if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3522then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003523 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003524(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003525fi
3526
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003527# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3528# when the compiler supports them, but we don't always want -O2, and
3529# we set -g later.
3530if test -z "$CFLAGS"; then
3531 CFLAGS=
3532fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003533
3534if test "$ac_sys_system" = "Darwin"
3535then
3536 # Compiler selection on MacOSX is more complicated than
3537 # AC_PROG_CC can handle, see Mac/README.txt for more
3538 # information
3539 if test -z "${CC}"
3540 then
3541 found_gcc=
3542 found_clang=
3543 as_save_IFS=$IFS; IFS=:
3544 for as_dir in $PATH
3545 do
3546 IFS=$as_save_IFS
3547 if test -x $as_dir/gcc; then
3548 if test -z "${found_gcc}"; then
3549 found_gcc=$as_dir/gcc
3550 fi
3551 fi
3552 if test -x $as_dir/clang; then
3553 if test -z "${found_clang}"; then
3554 found_clang=$as_dir/clang
3555 fi
3556 fi
3557 done
3558 IFS=$as_save_IFS
3559
3560 if test -n "$found_gcc" -a -n "$found_clang"
3561 then
3562 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3563 then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3565$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3566 CC="$found_clang"
3567 CXX="$found_clang++"
3568 fi
3569
3570
3571 elif test -z "$found_gcc" -a -n "$found_clang"
3572 then
3573 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3574$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3575 CC="$found_clang"
3576 CXX="$found_clang++"
3577
3578 elif test -z "$found_gcc" -a -z "$found_clang"
3579 then
3580 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3581 if test -n "${found_clang}"
3582 then
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3584$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3585 CC="${found_clang}"
3586 CXX="`/usr/bin/xcrun -find clang++`"
3587
3588 # else: use default behaviour
3589 fi
3590 fi
3591 fi
3592fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003593ac_ext=c
3594ac_cpp='$CPP $CPPFLAGS'
3595ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3596ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3597ac_compiler_gnu=$ac_cv_c_compiler_gnu
3598if test -n "$ac_tool_prefix"; then
3599 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3600set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3602$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003603if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003605else
3606 if test -n "$CC"; then
3607 ac_cv_prog_CC="$CC" # Let the user override the test.
3608else
Martin v. Löwis11437992002-04-12 09:54:03 +00003609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3610for as_dir in $PATH
3611do
3612 IFS=$as_save_IFS
3613 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003615 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 $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 +00003618 break 2
3619 fi
3620done
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003623
Jack Jansendd19cf82001-12-06 22:36:17 +00003624fi
3625fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003626CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003627if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3629$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003630else
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3632$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003633fi
3634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635
Martin v. Löwis11437992002-04-12 09:54:03 +00003636fi
3637if test -z "$ac_cv_prog_CC"; then
3638 ac_ct_CC=$CC
3639 # Extract the first word of "gcc", so it can be a program name with args.
3640set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3642$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003643if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003645else
3646 if test -n "$ac_ct_CC"; then
3647 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3648else
3649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3650for as_dir in $PATH
3651do
3652 IFS=$as_save_IFS
3653 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003656 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 $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 +00003658 break 2
3659 fi
3660done
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003663
3664fi
3665fi
3666ac_ct_CC=$ac_cv_prog_ac_ct_CC
3667if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3669$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003670else
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3672$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003673fi
3674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003675 if test "x$ac_ct_CC" = x; then
3676 CC=""
3677 else
3678 case $cross_compiling:$ac_tool_warned in
3679yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003680{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3681$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682ac_tool_warned=yes ;;
3683esac
3684 CC=$ac_ct_CC
3685 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003686else
3687 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003688fi
3689
Jack Jansendd19cf82001-12-06 22:36:17 +00003690if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691 if test -n "$ac_tool_prefix"; then
3692 # 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 +00003693set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3695$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003696if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003698else
3699 if test -n "$CC"; then
3700 ac_cv_prog_CC="$CC" # Let the user override the test.
3701else
Martin v. Löwis11437992002-04-12 09:54:03 +00003702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3703for as_dir in $PATH
3704do
3705 IFS=$as_save_IFS
3706 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 $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 +00003711 break 2
3712 fi
3713done
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003716
3717fi
3718fi
3719CC=$ac_cv_prog_CC
3720if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3722$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003723else
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3725$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003726fi
3727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003730fi
3731if test -z "$CC"; then
3732 # Extract the first word of "cc", so it can be a program name with args.
3733set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3735$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003736if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003738else
3739 if test -n "$CC"; then
3740 ac_cv_prog_CC="$CC" # Let the user override the test.
3741else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003742 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3744for as_dir in $PATH
3745do
3746 IFS=$as_save_IFS
3747 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003749 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3751 ac_prog_rejected=yes
3752 continue
3753 fi
3754 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 $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 +00003756 break 2
3757 fi
3758done
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003761
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762if test $ac_prog_rejected = yes; then
3763 # We found a bogon in the path, so make sure we never use it.
3764 set dummy $ac_cv_prog_CC
3765 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767 # We chose a different compiler from the bogus one.
3768 # However, it has the same basename, so the bogon will be chosen
3769 # first if we set CC to just the basename; use the full file name.
3770 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003771 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772 fi
3773fi
3774fi
3775fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003776CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3779$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780else
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3782$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003783fi
3784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785
Martin v. Löwis11437992002-04-12 09:54:03 +00003786fi
3787if test -z "$CC"; then
3788 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 do
3791 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3792set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3794$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003795if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003797else
3798 if test -n "$CC"; then
3799 ac_cv_prog_CC="$CC" # Let the user override the test.
3800else
Martin v. Löwis11437992002-04-12 09:54:03 +00003801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3802for as_dir in $PATH
3803do
3804 IFS=$as_save_IFS
3805 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 $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 +00003810 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003811 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003812done
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003815
3816fi
3817fi
3818CC=$ac_cv_prog_CC
3819if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3821$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822else
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3824$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003825fi
3826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 test -n "$CC" && break
3829 done
3830fi
3831if test -z "$CC"; then
3832 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003834do
3835 # Extract the first word of "$ac_prog", so it can be a program name with args.
3836set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3838$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003839if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003841else
3842 if test -n "$ac_ct_CC"; then
3843 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3844else
3845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3846for as_dir in $PATH
3847do
3848 IFS=$as_save_IFS
3849 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003851 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 $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 +00003854 break 2
3855 fi
3856done
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003859
Martin v. Löwis11437992002-04-12 09:54:03 +00003860fi
3861fi
3862ac_ct_CC=$ac_cv_prog_ac_ct_CC
3863if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3865$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003866else
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3868$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003869fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871
Martin v. Löwis11437992002-04-12 09:54:03 +00003872 test -n "$ac_ct_CC" && break
3873done
Michael W. Hudson54241132001-12-07 15:38:26 +00003874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875 if test "x$ac_ct_CC" = x; then
3876 CC=""
3877 else
3878 case $cross_compiling:$ac_tool_warned in
3879yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003880{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3881$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882ac_tool_warned=yes ;;
3883esac
3884 CC=$ac_ct_CC
3885 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003886fi
3887
3888fi
3889
3890
Matthias Kloseb9621712010-04-24 17:59:49 +00003891test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003893as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003894See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003895
3896# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003897$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3898set X $ac_compile
3899ac_compiler=$2
3900for ac_option in --version -v -V -qversion; do
3901 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902case "(($ac_try" in
3903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3904 *) ac_try_echo=$ac_try;;
3905esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3907$as_echo "$ac_try_echo"; } >&5
3908 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 if test -s conftest.err; then
3911 sed '10a\
3912... rest of stderr output deleted ...
3913 10q' conftest.err >conftest.er1
3914 cat conftest.er1 >&5
3915 fi
3916 rm -f conftest.er1 conftest.err
3917 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3918 test $ac_status = 0; }
3919done
Martin v. Löwis11437992002-04-12 09:54:03 +00003920
Matthias Kloseb9621712010-04-24 17:59:49 +00003921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003922/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003923
Martin v. Löwis11437992002-04-12 09:54:03 +00003924int
3925main ()
3926{
3927
3928 ;
3929 return 0;
3930}
3931_ACEOF
3932ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003933ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003934# Try to create an executable without -o first, disregard a.out.
3935# It will help us diagnose broken compilers, and finding out an intuition
3936# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3938$as_echo_n "checking whether the C compiler works... " >&6; }
3939ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3940
3941# The possible output files:
3942ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944ac_rmfiles=
3945for ac_file in $ac_files
3946do
3947 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003948 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3950 esac
3951done
3952rm -f $ac_rmfiles
3953
Matthias Kloseb9621712010-04-24 17:59:49 +00003954if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955case "(($ac_try" in
3956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3957 *) ac_try_echo=$ac_try;;
3958esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003959eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3960$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003963 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3964 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3966# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3967# in a Makefile. We should not override ac_cv_exeext if it was cached,
3968# so that the user can short-circuit this test for compilers unknown to
3969# Autoconf.
3970for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003971do
3972 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003975 ;;
3976 [ab].out )
3977 # We found the default executable, but exeext='' is most
3978 # certainly right.
3979 break;;
3980 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003981 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982 then :; else
3983 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3984 fi
3985 # We set ac_cv_exeext here because the later test for it is not
3986 # safe: cross compilers may not add the suffix if given an `-o'
3987 # argument, so we may need to know it at that point already.
3988 # Even if this section looks crufty: it has the advantage of
3989 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003990 break;;
3991 * )
3992 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003993 esac
3994done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995test "$ac_cv_exeext" = no && ac_cv_exeext=
3996
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003997else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003998 ac_file=''
3999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004000if test -z "$ac_file"; then :
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4002$as_echo "no" >&6; }
4003$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004004sed 's/^/| /' conftest.$ac_ext >&5
4005
Matthias Kloseb9621712010-04-24 17:59:49 +00004006{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4007$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004008as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004009See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004010else
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4012$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4015$as_echo_n "checking for C compiler default output file name... " >&6; }
4016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4017$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004019
Matthias Kloseb9621712010-04-24 17:59:49 +00004020rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4023$as_echo_n "checking for suffix of executables... " >&6; }
4024if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004025case "(($ac_try" in
4026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4027 *) ac_try_echo=$ac_try;;
4028esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004029eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4030$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004032 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004033 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4034 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4036# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4037# work properly (i.e., refer to `conftest.exe'), while it won't with
4038# `rm'.
4039for ac_file in conftest.exe conftest conftest.*; do
4040 test -f "$ac_file" || continue
4041 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004043 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4044 break;;
4045 * ) break;;
4046 esac
4047done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004048else
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4050$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004051as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004052See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004054rm -f conftest conftest$ac_cv_exeext
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4056$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004057
4058rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004059EXEEXT=$ac_cv_exeext
4060ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4062/* end confdefs.h. */
4063#include <stdio.h>
4064int
4065main ()
4066{
4067FILE *f = fopen ("conftest.out", "w");
4068 return ferror (f) || fclose (f) != 0;
4069
4070 ;
4071 return 0;
4072}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004074ac_clean_files="$ac_clean_files conftest.out"
4075# Check that the compiler produces executables we can run. If not, either
4076# the compiler is broken, or we cross compile.
4077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4078$as_echo_n "checking whether we are cross compiling... " >&6; }
4079if test "$cross_compiling" != yes; then
4080 { { ac_try="$ac_link"
4081case "(($ac_try" in
4082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4083 *) ac_try_echo=$ac_try;;
4084esac
4085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4086$as_echo "$ac_try_echo"; } >&5
4087 (eval "$ac_link") 2>&5
4088 ac_status=$?
4089 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4090 test $ac_status = 0; }
4091 if { ac_try='./conftest$ac_cv_exeext'
4092 { { case "(($ac_try" in
4093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4094 *) ac_try_echo=$ac_try;;
4095esac
4096eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4097$as_echo "$ac_try_echo"; } >&5
4098 (eval "$ac_try") 2>&5
4099 ac_status=$?
4100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4101 test $ac_status = 0; }; }; then
4102 cross_compiling=no
4103 else
4104 if test "$cross_compiling" = maybe; then
4105 cross_compiling=yes
4106 else
4107 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4108$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004109as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004110If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004111See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 fi
4113 fi
4114fi
4115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4116$as_echo "$cross_compiling" >&6; }
4117
4118rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4119ac_clean_files=$ac_clean_files_save
4120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4121$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004122if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 $as_echo_n "(cached) " >&6
4124else
4125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004126/* end confdefs.h. */
4127
4128int
4129main ()
4130{
4131
4132 ;
4133 return 0;
4134}
4135_ACEOF
4136rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004137if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004138case "(($ac_try" in
4139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4140 *) ac_try_echo=$ac_try;;
4141esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004142eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4143$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004144 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004145 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4147 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148 for ac_file in conftest.o conftest.obj conftest.*; do
4149 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004150 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4153 break;;
4154 esac
4155done
4156else
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004158sed 's/^/| /' conftest.$ac_ext >&5
4159
Matthias Kloseb9621712010-04-24 17:59:49 +00004160{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004162as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004163See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004164fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004165rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4168$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004169OBJEXT=$ac_cv_objext
4170ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4172$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004173if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004175else
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004178
Martin v. Löwis11437992002-04-12 09:54:03 +00004179int
4180main ()
4181{
4182#ifndef __GNUC__
4183 choke me
4184#endif
4185
4186 ;
4187 return 0;
4188}
4189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004190if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004191 ac_compiler_gnu=yes
4192else
Matthias Kloseb9621712010-04-24 17:59:49 +00004193 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004196ac_cv_c_compiler_gnu=$ac_compiler_gnu
4197
4198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4200$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4201if test $ac_compiler_gnu = yes; then
4202 GCC=yes
4203else
4204 GCC=
4205fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_test_CFLAGS=${CFLAGS+set}
4207ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4209$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004210if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004212else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213 ac_save_c_werror_flag=$ac_c_werror_flag
4214 ac_c_werror_flag=yes
4215 ac_cv_prog_cc_g=no
4216 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004219
Martin v. Löwis11437992002-04-12 09:54:03 +00004220int
4221main ()
4222{
4223
4224 ;
4225 return 0;
4226}
4227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004228if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004229 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004230else
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 CFLAGS=""
4232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233/* end confdefs.h. */
4234
4235int
4236main ()
4237{
4238
4239 ;
4240 return 0;
4241}
4242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004243if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244
Matthias Kloseb9621712010-04-24 17:59:49 +00004245else
4246 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249/* end confdefs.h. */
4250
4251int
4252main ()
4253{
4254
4255 ;
4256 return 0;
4257}
4258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004259if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4267 ac_c_werror_flag=$ac_save_c_werror_flag
4268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4270$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004271if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004273elif test $ac_cv_prog_cc_g = yes; then
4274 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004275 CFLAGS="-g -O2"
4276 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004277 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004278 fi
4279else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004280 if test "$GCC" = yes; then
4281 CFLAGS="-O2"
4282 else
4283 CFLAGS=
4284 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4287$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004288if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004289 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004290else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004292ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004294/* end confdefs.h. */
4295#include <stdarg.h>
4296#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004297struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004298/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4299struct buf { int x; };
4300FILE * (*rcsopen) (struct buf *, struct stat *, int);
4301static char *e (p, i)
4302 char **p;
4303 int i;
4304{
4305 return p[i];
4306}
4307static char *f (char * (*g) (char **, int), char **p, ...)
4308{
4309 char *s;
4310 va_list v;
4311 va_start (v,p);
4312 s = g (p, va_arg (v,int));
4313 va_end (v);
4314 return s;
4315}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004316
4317/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4318 function prototypes and stuff, but not '\xHH' hex character constants.
4319 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4322 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004324int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4327 inside strings and character constants. */
4328#define FOO(x) 'x'
4329int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4330
Skip Montanaro6dead952003-09-25 14:50:04 +00004331int test (int i, double x);
4332struct s1 {int (*f) (int a);};
4333struct s2 {int (*f) (double a);};
4334int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4335int argc;
4336char **argv;
4337int
4338main ()
4339{
4340return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4341 ;
4342 return 0;
4343}
4344_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4346 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004347do
4348 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352rm -f core conftest.err conftest.$ac_objext
4353 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004354done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004356CC=$ac_save_CC
4357
4358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359# AC_CACHE_VAL
4360case "x$ac_cv_prog_cc_c89" in
4361 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4363$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4366$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004367 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4370$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004371esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004372if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004373
Matthias Kloseb9621712010-04-24 17:59:49 +00004374fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004375
Martin v. Löwis11437992002-04-12 09:54:03 +00004376ac_ext=c
4377ac_cpp='$CPP $CPPFLAGS'
4378ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4379ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4380ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004381
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004382
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004383
4384
Matthias Kloseb9621712010-04-24 17:59:49 +00004385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4386$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004389if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004391
4392 case $withval in
4393 no) with_cxx_main=no
4394 MAINCC='$(CC)';;
4395 yes) with_cxx_main=yes
4396 MAINCC='$(CXX)';;
4397 *) with_cxx_main=yes
4398 MAINCC=$withval
4399 if test -z "$CXX"
4400 then
4401 CXX=$withval
4402 fi;;
4403 esac
4404else
4405
4406 with_cxx_main=no
4407 MAINCC='$(CC)'
4408
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409fi
4410
Matthias Kloseb9621712010-04-24 17:59:49 +00004411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4412$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004413
4414preset_cxx="$CXX"
4415if test -z "$CXX"
4416then
4417 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004418 gcc) if test -n "$ac_tool_prefix"; then
4419 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4420set dummy ${ac_tool_prefix}g++; ac_word=$2
4421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4422$as_echo_n "checking for $ac_word... " >&6; }
4423if ${ac_cv_path_CXX+:} false; then :
4424 $as_echo_n "(cached) " >&6
4425else
4426 case $CXX in
4427 [\\/]* | ?:[\\/]*)
4428 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4429 ;;
4430 *)
4431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4432for as_dir in notfound
4433do
4434 IFS=$as_save_IFS
4435 test -z "$as_dir" && as_dir=.
4436 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004437 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004438 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4439 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4440 break 2
4441 fi
4442done
4443 done
4444IFS=$as_save_IFS
4445
4446 ;;
4447esac
4448fi
4449CXX=$ac_cv_path_CXX
4450if test -n "$CXX"; then
4451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4452$as_echo "$CXX" >&6; }
4453else
4454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4455$as_echo "no" >&6; }
4456fi
4457
4458
4459fi
4460if test -z "$ac_cv_path_CXX"; then
4461 ac_pt_CXX=$CXX
4462 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004463set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4465$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004466if ${ac_cv_path_ac_pt_CXX+:} false; then :
4467 $as_echo_n "(cached) " >&6
4468else
4469 case $ac_pt_CXX in
4470 [\\/]* | ?:[\\/]*)
4471 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4472 ;;
4473 *)
4474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4475for as_dir in notfound
4476do
4477 IFS=$as_save_IFS
4478 test -z "$as_dir" && as_dir=.
4479 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004480 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004481 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4482 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4483 break 2
4484 fi
4485done
4486 done
4487IFS=$as_save_IFS
4488
4489 ;;
4490esac
4491fi
4492ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4493if test -n "$ac_pt_CXX"; then
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4495$as_echo "$ac_pt_CXX" >&6; }
4496else
4497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4498$as_echo "no" >&6; }
4499fi
4500
4501 if test "x$ac_pt_CXX" = x; then
4502 CXX="g++"
4503 else
4504 case $cross_compiling:$ac_tool_warned in
4505yes:)
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4507$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4508ac_tool_warned=yes ;;
4509esac
4510 CXX=$ac_pt_CXX
4511 fi
4512else
4513 CXX="$ac_cv_path_CXX"
4514fi
4515 ;;
4516 cc) if test -n "$ac_tool_prefix"; then
4517 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4518set dummy ${ac_tool_prefix}c++; ac_word=$2
4519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4520$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004521if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004522 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004523else
4524 case $CXX in
4525 [\\/]* | ?:[\\/]*)
4526 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4527 ;;
4528 *)
4529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4530for as_dir in notfound
4531do
4532 IFS=$as_save_IFS
4533 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004534 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004536 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004538 break 2
4539 fi
4540done
Matthias Kloseb9621712010-04-24 17:59:49 +00004541 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004542IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004543
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004544 ;;
4545esac
4546fi
4547CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004548if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4550$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004551else
Matthias Kloseb9621712010-04-24 17:59:49 +00004552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4553$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004555
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004556
4557fi
4558if test -z "$ac_cv_path_CXX"; then
4559 ac_pt_CXX=$CXX
4560 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004561set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4563$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004564if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004565 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004566else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004567 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004568 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004569 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 +00004570 ;;
4571 *)
4572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573for as_dir in notfound
4574do
4575 IFS=$as_save_IFS
4576 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004577 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004579 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581 break 2
4582 fi
4583done
Matthias Kloseb9621712010-04-24 17:59:49 +00004584 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004585IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004586
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004587 ;;
4588esac
4589fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004590ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4591if test -n "$ac_pt_CXX"; then
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4593$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004594else
Matthias Kloseb9621712010-04-24 17:59:49 +00004595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4596$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004598
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004599 if test "x$ac_pt_CXX" = x; then
4600 CXX="c++"
4601 else
4602 case $cross_compiling:$ac_tool_warned in
4603yes:)
4604{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4605$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4606ac_tool_warned=yes ;;
4607esac
4608 CXX=$ac_pt_CXX
4609 fi
4610else
4611 CXX="$ac_cv_path_CXX"
4612fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004613 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004614 clang|*/clang) if test -n "$ac_tool_prefix"; then
4615 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4616set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4618$as_echo_n "checking for $ac_word... " >&6; }
4619if ${ac_cv_path_CXX+:} false; then :
4620 $as_echo_n "(cached) " >&6
4621else
4622 case $CXX in
4623 [\\/]* | ?:[\\/]*)
4624 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4625 ;;
4626 *)
4627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4628for as_dir in notfound
4629do
4630 IFS=$as_save_IFS
4631 test -z "$as_dir" && as_dir=.
4632 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004633 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004634 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4635 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4636 break 2
4637 fi
4638done
4639 done
4640IFS=$as_save_IFS
4641
Ned Deilycbfb9a52012-06-23 16:02:19 -07004642 ;;
4643esac
4644fi
4645CXX=$ac_cv_path_CXX
4646if test -n "$CXX"; then
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4648$as_echo "$CXX" >&6; }
4649else
4650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4651$as_echo "no" >&6; }
4652fi
4653
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004654
4655fi
4656if test -z "$ac_cv_path_CXX"; then
4657 ac_pt_CXX=$CXX
4658 # Extract the first word of "clang++", so it can be a program name with args.
4659set dummy clang++; ac_word=$2
4660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4661$as_echo_n "checking for $ac_word... " >&6; }
4662if ${ac_cv_path_ac_pt_CXX+:} false; then :
4663 $as_echo_n "(cached) " >&6
4664else
4665 case $ac_pt_CXX in
4666 [\\/]* | ?:[\\/]*)
4667 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4668 ;;
4669 *)
4670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4671for as_dir in notfound
4672do
4673 IFS=$as_save_IFS
4674 test -z "$as_dir" && as_dir=.
4675 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004677 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4678 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4679 break 2
4680 fi
4681done
4682 done
4683IFS=$as_save_IFS
4684
4685 ;;
4686esac
4687fi
4688ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4689if test -n "$ac_pt_CXX"; then
4690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4691$as_echo "$ac_pt_CXX" >&6; }
4692else
4693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4694$as_echo "no" >&6; }
4695fi
4696
4697 if test "x$ac_pt_CXX" = x; then
4698 CXX="clang++"
4699 else
4700 case $cross_compiling:$ac_tool_warned in
4701yes:)
4702{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4703$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4704ac_tool_warned=yes ;;
4705esac
4706 CXX=$ac_pt_CXX
4707 fi
4708else
4709 CXX="$ac_cv_path_CXX"
4710fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004711 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004712 esac
4713 if test "$CXX" = "notfound"
4714 then
4715 CXX=""
4716 fi
4717fi
4718if test -z "$CXX"
4719then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004720 if test -n "$ac_tool_prefix"; then
4721 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4722 do
4723 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4724set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4726$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004727if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004728 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004729else
4730 if test -n "$CXX"; then
4731 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4732else
4733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4734for as_dir in $PATH
4735do
4736 IFS=$as_save_IFS
4737 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004740 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742 break 2
4743 fi
4744done
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004746IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004747
4748fi
4749fi
4750CXX=$ac_cv_prog_CXX
4751if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4753$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004754else
Matthias Kloseb9621712010-04-24 17:59:49 +00004755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4756$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004757fi
4758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004759
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004760 test -n "$CXX" && break
4761 done
4762fi
4763if test -z "$CXX"; then
4764 ac_ct_CXX=$CXX
4765 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4766do
4767 # Extract the first word of "$ac_prog", so it can be a program name with args.
4768set dummy $ac_prog; ac_word=$2
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4770$as_echo_n "checking for $ac_word... " >&6; }
4771if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4772 $as_echo_n "(cached) " >&6
4773else
4774 if test -n "$ac_ct_CXX"; then
4775 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4776else
4777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4778for as_dir in $PATH
4779do
4780 IFS=$as_save_IFS
4781 test -z "$as_dir" && as_dir=.
4782 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784 ac_cv_prog_ac_ct_CXX="$ac_prog"
4785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4786 break 2
4787 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004789 done
4790IFS=$as_save_IFS
4791
4792fi
4793fi
4794ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4795if test -n "$ac_ct_CXX"; then
4796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4797$as_echo "$ac_ct_CXX" >&6; }
4798else
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4800$as_echo "no" >&6; }
4801fi
4802
4803
4804 test -n "$ac_ct_CXX" && break
4805done
4806
4807 if test "x$ac_ct_CXX" = x; then
4808 CXX="notfound"
4809 else
4810 case $cross_compiling:$ac_tool_warned in
4811yes:)
4812{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4813$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4814ac_tool_warned=yes ;;
4815esac
4816 CXX=$ac_ct_CXX
4817 fi
4818fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819
4820 if test "$CXX" = "notfound"
4821 then
4822 CXX=""
4823 fi
4824fi
4825if test "$preset_cxx" != "$CXX"
4826then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004827 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828
4829 By default, distutils will build C++ extension modules with \"$CXX\".
4830 If this is not intended, then set CXX on the configure command line.
4831 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004832$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833
4834 By default, distutils will build C++ extension modules with \"$CXX\".
4835 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004836 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837fi
4838
4839
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4841$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4842save_LDFLAGS="$LDFLAGS"
4843LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004844
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4846/* end confdefs.h. */
4847
4848int
4849main ()
4850{
4851
4852 ;
4853 return 0;
4854}
4855_ACEOF
4856if ac_fn_c_try_link "$LINENO"; then :
4857 NO_AS_NEEDED="-Wl,--no-as-needed"
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4859$as_echo "yes" >&6; }
4860else
4861 NO_AS_NEEDED=""
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4863$as_echo "no" >&6; }
4864fi
4865rm -f core conftest.err conftest.$ac_objext \
4866 conftest$ac_exeext conftest.$ac_ext
4867LDFLAGS="$save_LDFLAGS"
4868
4869
4870
4871# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004872ac_ext=c
4873ac_cpp='$CPP $CPPFLAGS'
4874ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4875ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4876ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4878$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004879# On Suns, sometimes $CPP names a directory.
4880if test -n "$CPP" && test -d "$CPP"; then
4881 CPP=
4882fi
4883if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004884 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004885 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004886else
Martin v. Löwis11437992002-04-12 09:54:03 +00004887 # Double quotes because CPP needs to be expanded
4888 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4889 do
4890 ac_preproc_ok=false
4891for ac_c_preproc_warn_flag in '' yes
4892do
4893 # Use a header file that comes with gcc, so configuring glibc
4894 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004895 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4896 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004897 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004898 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004900/* end confdefs.h. */
4901#ifdef __STDC__
4902# include <limits.h>
4903#else
4904# include <assert.h>
4905#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004906 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004908if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004909
Matthias Kloseb9621712010-04-24 17:59:49 +00004910else
Martin v. Löwis11437992002-04-12 09:54:03 +00004911 # Broken: fails on valid input.
4912continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004913fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004914rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004916 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004917 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004920#include <ac_nonexistent.h>
4921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004922if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004923 # Broken: success on invalid input.
4924continue
4925else
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 # Passes both tests.
4927ac_preproc_ok=:
4928break
4929fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004930rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004931
4932done
4933# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004934rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004935if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 break
4937fi
4938
4939 done
4940 ac_cv_prog_CPP=$CPP
4941
4942fi
4943 CPP=$ac_cv_prog_CPP
4944else
4945 ac_cv_prog_CPP=$CPP
4946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4948$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004949ac_preproc_ok=false
4950for ac_c_preproc_warn_flag in '' yes
4951do
4952 # Use a header file that comes with gcc, so configuring glibc
4953 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004954 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4955 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004956 # On the NeXT, cc -E runs the code through the compiler's parser,
4957 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004959/* end confdefs.h. */
4960#ifdef __STDC__
4961# include <limits.h>
4962#else
4963# include <assert.h>
4964#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004965 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004967if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004968
Matthias Kloseb9621712010-04-24 17:59:49 +00004969else
Martin v. Löwis11437992002-04-12 09:54:03 +00004970 # Broken: fails on valid input.
4971continue
4972fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004973rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004975 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004976 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004979#include <ac_nonexistent.h>
4980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004981if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004982 # Broken: success on invalid input.
4983continue
4984else
Martin v. Löwis11437992002-04-12 09:54:03 +00004985 # Passes both tests.
4986ac_preproc_ok=:
4987break
4988fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004989rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004990
4991done
4992# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004993rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004994if $ac_preproc_ok; then :
4995
Martin v. Löwis11437992002-04-12 09:54:03 +00004996else
Matthias Kloseb9621712010-04-24 17:59:49 +00004997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004999as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005000See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005001fi
5002
5003ac_ext=c
5004ac_cpp='$CPP $CPPFLAGS'
5005ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5006ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5007ac_compiler_gnu=$ac_cv_c_compiler_gnu
5008
5009
Matthias Kloseb9621712010-04-24 17:59:49 +00005010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5011$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005012if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005013 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005014else
Matthias Kloseb9621712010-04-24 17:59:49 +00005015 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005016 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 # Loop through the user's path and test for each of PROGNAME-LIST
5018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005019for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5020do
5021 IFS=$as_save_IFS
5022 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 for ac_prog in grep ggrep; do
5024 for ac_exec_ext in '' $ac_executable_extensions; do
5025 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005026 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005027# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005028 # Check for GNU $ac_path_GREP
5029case `"$ac_path_GREP" --version 2>&1` in
5030*GNU*)
5031 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5032*)
5033 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005035 while :
5036 do
5037 cat "conftest.in" "conftest.in" >"conftest.tmp"
5038 mv "conftest.tmp" "conftest.in"
5039 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005041 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5042 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005044 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5045 # Best one so far, save it but keep looking for a better one
5046 ac_cv_path_GREP="$ac_path_GREP"
5047 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005048 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049 # 10*(2^10) chars as input seems more than enough
5050 test $ac_count -gt 10 && break
5051 done
5052 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5053esac
5054
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 $ac_path_GREP_found && break 3
5056 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005057 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005061 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 +00005062 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005063else
5064 ac_cv_path_GREP=$GREP
5065fi
5066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5069$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005070 GREP="$ac_cv_path_GREP"
5071
5072
Matthias Kloseb9621712010-04-24 17:59:49 +00005073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5074$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005075if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077else
5078 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5079 then ac_cv_path_EGREP="$GREP -E"
5080 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005082 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 # Loop through the user's path and test for each of PROGNAME-LIST
5084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005085for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 for ac_prog in egrep; do
5090 for ac_exec_ext in '' $ac_executable_extensions; do
5091 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005092 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005093# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094 # Check for GNU $ac_path_EGREP
5095case `"$ac_path_EGREP" --version 2>&1` in
5096*GNU*)
5097 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5098*)
5099 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101 while :
5102 do
5103 cat "conftest.in" "conftest.in" >"conftest.tmp"
5104 mv "conftest.tmp" "conftest.in"
5105 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005107 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5108 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005110 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5111 # Best one so far, save it but keep looking for a better one
5112 ac_cv_path_EGREP="$ac_path_EGREP"
5113 ac_path_EGREP_max=$ac_count
5114 fi
5115 # 10*(2^10) chars as input seems more than enough
5116 test $ac_count -gt 10 && break
5117 done
5118 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5119esac
5120
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 $ac_path_EGREP_found && break 3
5122 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005123 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005124 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005125IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005127 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 +00005128 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005129else
5130 ac_cv_path_EGREP=$EGREP
5131fi
5132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005133 fi
5134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5136$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005137 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005138
5139
Matthias Kloseb9621712010-04-24 17:59:49 +00005140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5141$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005142if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 $as_echo_n "(cached) " >&6
5144else
5145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005146/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005147#include <stdlib.h>
5148#include <stdarg.h>
5149#include <string.h>
5150#include <float.h>
5151
5152int
5153main ()
5154{
5155
5156 ;
5157 return 0;
5158}
5159_ACEOF
5160if ac_fn_c_try_compile "$LINENO"; then :
5161 ac_cv_header_stdc=yes
5162else
5163 ac_cv_header_stdc=no
5164fi
5165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5166
5167if test $ac_cv_header_stdc = yes; then
5168 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5170/* end confdefs.h. */
5171#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005172
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005173_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005175 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005176
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005177else
Matthias Kloseb9621712010-04-24 17:59:49 +00005178 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005179fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005180rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005181
Matthias Kloseb9621712010-04-24 17:59:49 +00005182fi
5183
5184if test $ac_cv_header_stdc = yes; then
5185 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5187/* end confdefs.h. */
5188#include <stdlib.h>
5189
5190_ACEOF
5191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5192 $EGREP "free" >/dev/null 2>&1; then :
5193
5194else
5195 ac_cv_header_stdc=no
5196fi
5197rm -f conftest*
5198
5199fi
5200
5201if test $ac_cv_header_stdc = yes; then
5202 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5203 if test "$cross_compiling" = yes; then :
5204 :
5205else
5206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5207/* end confdefs.h. */
5208#include <ctype.h>
5209#include <stdlib.h>
5210#if ((' ' & 0x0FF) == 0x020)
5211# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5212# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5213#else
5214# define ISLOWER(c) \
5215 (('a' <= (c) && (c) <= 'i') \
5216 || ('j' <= (c) && (c) <= 'r') \
5217 || ('s' <= (c) && (c) <= 'z'))
5218# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5219#endif
5220
5221#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5222int
5223main ()
5224{
5225 int i;
5226 for (i = 0; i < 256; i++)
5227 if (XOR (islower (i), ISLOWER (i))
5228 || toupper (i) != TOUPPER (i))
5229 return 2;
5230 return 0;
5231}
5232_ACEOF
5233if ac_fn_c_try_run "$LINENO"; then :
5234
5235else
5236 ac_cv_header_stdc=no
5237fi
5238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5239 conftest.$ac_objext conftest.beam conftest.$ac_ext
5240fi
5241
5242fi
5243fi
5244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5245$as_echo "$ac_cv_header_stdc" >&6; }
5246if test $ac_cv_header_stdc = yes; then
5247
5248$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5249
5250fi
5251
5252# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5253for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5254 inttypes.h stdint.h unistd.h
5255do :
5256 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5257ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5258"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005259if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005260 cat >>confdefs.h <<_ACEOF
5261#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5262_ACEOF
5263
5264fi
5265
5266done
5267
5268
5269
5270 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 +02005271if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005272 MINIX=yes
5273else
5274 MINIX=
5275fi
5276
5277
5278 if test "$MINIX" = yes; then
5279
5280$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5281
5282
5283$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5284
5285
5286$as_echo "#define _MINIX 1" >>confdefs.h
5287
5288 fi
5289
5290
5291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5292$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005293if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005294 $as_echo_n "(cached) " >&6
5295else
5296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5297/* end confdefs.h. */
5298
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005299# define __EXTENSIONS__ 1
5300 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005301int
5302main ()
5303{
5304
5305 ;
5306 return 0;
5307}
5308_ACEOF
5309if ac_fn_c_try_compile "$LINENO"; then :
5310 ac_cv_safe_to_define___extensions__=yes
5311else
5312 ac_cv_safe_to_define___extensions__=no
5313fi
5314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5315fi
5316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5317$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5318 test $ac_cv_safe_to_define___extensions__ = yes &&
5319 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5320
5321 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5322
5323 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5324
5325 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5326
5327 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5328
5329
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005330
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331# Check for unsupported systems
5332case $ac_sys_system/$ac_sys_release in
5333atheos*|Linux*/1*)
5334 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5335 echo See README for details.
5336 exit 1;;
5337esac
5338
5339
Matthias Kloseb9621712010-04-24 17:59:49 +00005340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5341$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005342
5343# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005344if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345 withval=$with_suffix;
5346 case $withval in
5347 no) EXEEXT=;;
5348 yes) EXEEXT=.exe;;
5349 *) EXEEXT=$withval;;
5350 esac
5351fi
5352
Matthias Kloseb9621712010-04-24 17:59:49 +00005353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5354$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355
5356# Test whether we're running on a non-case-sensitive system, in which
5357# case we give a warning if no ext is given
5358
Matthias Kloseb9621712010-04-24 17:59:49 +00005359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5360$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361if test ! -d CaseSensitiveTestDir; then
5362mkdir CaseSensitiveTestDir
5363fi
5364
5365if test -d casesensitivetestdir
5366then
Matthias Kloseb9621712010-04-24 17:59:49 +00005367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5368$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369 BUILDEXEEXT=.exe
5370else
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5372$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373 BUILDEXEEXT=$EXEEXT
5374fi
5375rmdir CaseSensitiveTestDir
5376
5377case $MACHDEP in
5378bsdos*)
5379 case $CC in
5380 gcc) CC="$CC -D_HAVE_BSDI";;
5381 esac;;
5382esac
5383
5384case $ac_sys_system in
5385hp*|HP*)
5386 case $CC in
5387 cc|*/cc) CC="$CC -Ae";;
5388 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389esac
5390
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005391MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5392
5393
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005394
5395
Matthias Kloseb9621712010-04-24 17:59:49 +00005396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5397$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005398if test -z "$LIBRARY"
5399then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005400 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5403$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
5405# LDLIBRARY is the name of the library to link against (as opposed to the
5406# name of the library into which to insert object files). BLDLIBRARY is also
5407# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5408# is blank as the main program is not linked directly against LDLIBRARY.
5409# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5410# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5411# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5412# DLLLIBRARY is the shared (i.e., DLL) library.
5413#
5414# RUNSHARED is used to run shared python without installed libraries
5415#
5416# INSTSONAME is the name of the shared library that will be use to install
5417# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005418#
5419# LDVERSION is the shared library version number, normally the Python version
5420# with the ABI build flags appended.
5421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422
5423
5424
5425
5426
5427
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429LDLIBRARY="$LIBRARY"
5430BLDLIBRARY='$(LDLIBRARY)'
5431INSTSONAME='$(LDLIBRARY)'
5432DLLLIBRARY=''
5433LDLIBRARYDIR=''
5434RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005435LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436
5437# LINKCC is the command that links the python executable -- default is $(CC).
5438# If CXX is set, and if it is needed to link a main function that was
5439# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5440# python might then depend on the C++ runtime
5441# This is altered for AIX in order to build the export list before
5442# linking.
5443
Matthias Kloseb9621712010-04-24 17:59:49 +00005444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5445$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446if test -z "$LINKCC"
5447then
5448 LINKCC='$(PURIFY) $(MAINCC)'
5449 case $ac_sys_system in
5450 AIX*)
5451 exp_extra="\"\""
5452 if test $ac_sys_release -ge 5 -o \
5453 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5454 exp_extra="."
5455 fi
5456 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457 QNX*)
5458 # qcc must be used because the other compilers do not
5459 # support -N.
5460 LINKCC=qcc;;
5461 esac
5462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5464$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
5466# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5467# make sure we default having it set to "no": this is used by
5468# distutils.unixccompiler to know if it should add --enable-new-dtags
5469# to linker command lines, and failing to detect GNU ld simply results
5470# in the same bahaviour as before.
5471
Matthias Kloseb9621712010-04-24 17:59:49 +00005472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5473$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005474ac_prog=ld
5475if test "$GCC" = yes; then
5476 ac_prog=`$CC -print-prog-name=ld`
5477fi
5478case `"$ac_prog" -V 2>&1 < /dev/null` in
5479 *GNU*)
5480 GNULD=yes;;
5481 *)
5482 GNULD=no;;
5483esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5485$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5488$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005489if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005490 $as_echo_n "(cached) " >&6
5491else
5492 ac_cv_c_inline=no
5493for ac_kw in inline __inline__ __inline; do
5494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5495/* end confdefs.h. */
5496#ifndef __cplusplus
5497typedef int foo_t;
5498static $ac_kw foo_t static_foo () {return 0; }
5499$ac_kw foo_t foo () {return 0; }
5500#endif
5501
5502_ACEOF
5503if ac_fn_c_try_compile "$LINENO"; then :
5504 ac_cv_c_inline=$ac_kw
5505fi
5506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5507 test "$ac_cv_c_inline" != no && break
5508done
5509
5510fi
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5512$as_echo "$ac_cv_c_inline" >&6; }
5513
5514case $ac_cv_c_inline in
5515 inline | yes) ;;
5516 *)
5517 case $ac_cv_c_inline in
5518 no) ac_val=;;
5519 *) ac_val=$ac_cv_c_inline;;
5520 esac
5521 cat >>confdefs.h <<_ACEOF
5522#ifndef __cplusplus
5523#define inline $ac_val
5524#endif
5525_ACEOF
5526 ;;
5527esac
5528
5529if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005530
5531$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005532
5533
5534fi
5535
5536
Matthias Kloseb9621712010-04-24 17:59:49 +00005537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5538$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005540if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541 enableval=$enable_shared;
5542fi
5543
5544
5545if test -z "$enable_shared"
5546then
5547 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005548 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549 enable_shared="yes";;
5550 *)
5551 enable_shared="no";;
5552 esac
5553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5555$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556
Matthias Kloseb9621712010-04-24 17:59:49 +00005557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5558$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005560if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005561 enableval=$enable_profiling;
5562fi
5563
5564if test "x$enable_profiling" = xyes; then
5565 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005566 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005568/* end confdefs.h. */
5569int main() { return 0; }
5570_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005571if ac_fn_c_try_link "$LINENO"; then :
5572
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005574 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005576rm -f core conftest.err conftest.$ac_objext \
5577 conftest$ac_exeext conftest.$ac_ext
5578 CC="$ac_save_cc"
5579else
5580 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5583$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005584
doko@ubuntu.comba015832012-06-30 16:52:05 +02005585if test "x$enable_profiling" = xyes; then
5586 BASECFLAGS="-pg $BASECFLAGS"
5587 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588fi
5589
Matthias Kloseb9621712010-04-24 17:59:49 +00005590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5591$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592
5593# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5594# library that we build, but we do not want to link against it (we
5595# will find it with a -framework option). For this reason there is an
5596# extra variable BLDLIBRARY against which Python and the extension
5597# modules are linked, BLDLIBRARY. This is normally the same as
5598# LDLIBRARY, but empty for MacOSX framework builds.
5599if test "$enable_framework"
5600then
5601 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5602 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5603 BLDLIBRARY=''
5604else
5605 BLDLIBRARY='$(LDLIBRARY)'
5606fi
5607
5608# Other platforms follow
5609if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005610 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611
Matthias Kloseb9621712010-04-24 17:59:49 +00005612$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613
5614 case $ac_sys_system in
5615 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005616 LDLIBRARY='libpython$(LDVERSION).dll.a'
5617 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 ;;
5619 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005620 LDLIBRARY='libpython$(LDVERSION).so'
5621 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5623 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005624 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005625 then
5626 PY3LIBRARY=libpython3.so
5627 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005629 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).so'
5631 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5633 case $ac_sys_system in
5634 FreeBSD*)
5635 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5636 ;;
5637 esac
5638 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005639 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005640 then
5641 PY3LIBRARY=libpython3.so
5642 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 ;;
5644 hp*|HP*)
5645 case `uname -m` in
5646 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005647 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648 ;;
5649 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005650 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651 ;;
5652 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005653 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5655 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005657 LDLIBRARY='libpython$(LDVERSION).dylib'
5658 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5660 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005661 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005662 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005663 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5664 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665
5666 esac
5667else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005668 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 case $ac_sys_system in
5670 CYGWIN*)
5671 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005672 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673 ;;
5674 esac
5675fi
5676
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005677if test "$cross_compiling" = yes; then
5678 RUNSHARED=
5679fi
5680
Matthias Kloseb9621712010-04-24 17:59:49 +00005681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5682$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683
5684if test -n "$ac_tool_prefix"; then
5685 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5686set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5688$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005689if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005690 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691else
5692 if test -n "$RANLIB"; then
5693 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5694else
5695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5696for as_dir in $PATH
5697do
5698 IFS=$as_save_IFS
5699 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704 break 2
5705 fi
5706done
Matthias Kloseb9621712010-04-24 17:59:49 +00005707 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708IFS=$as_save_IFS
5709
5710fi
5711fi
5712RANLIB=$ac_cv_prog_RANLIB
5713if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5715$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716else
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5718$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719fi
5720
5721
5722fi
5723if test -z "$ac_cv_prog_RANLIB"; then
5724 ac_ct_RANLIB=$RANLIB
5725 # Extract the first word of "ranlib", so it can be a program name with args.
5726set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5728$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005729if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731else
5732 if test -n "$ac_ct_RANLIB"; then
5733 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5734else
5735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5736for as_dir in $PATH
5737do
5738 IFS=$as_save_IFS
5739 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005740 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744 break 2
5745 fi
5746done
Matthias Kloseb9621712010-04-24 17:59:49 +00005747 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748IFS=$as_save_IFS
5749
5750fi
5751fi
5752ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5753if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5755$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756else
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5758$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759fi
5760
5761 if test "x$ac_ct_RANLIB" = x; then
5762 RANLIB=":"
5763 else
5764 case $cross_compiling:$ac_tool_warned in
5765yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5767$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768ac_tool_warned=yes ;;
5769esac
5770 RANLIB=$ac_ct_RANLIB
5771 fi
5772else
5773 RANLIB="$ac_cv_prog_RANLIB"
5774fi
5775
5776
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005777if test -n "$ac_tool_prefix"; then
5778 for ac_prog in ar aal
5779 do
5780 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5781set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5783$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005784if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005785 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786else
5787 if test -n "$AR"; then
5788 ac_cv_prog_AR="$AR" # Let the user override the test.
5789else
5790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793 IFS=$as_save_IFS
5794 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005795 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005797 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799 break 2
5800 fi
5801done
Matthias Kloseb9621712010-04-24 17:59:49 +00005802 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803IFS=$as_save_IFS
5804
5805fi
5806fi
5807AR=$ac_cv_prog_AR
5808if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5810$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811else
Matthias Kloseb9621712010-04-24 17:59:49 +00005812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5813$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814fi
5815
5816
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005817 test -n "$AR" && break
5818 done
5819fi
5820if test -z "$AR"; then
5821 ac_ct_AR=$AR
5822 for ac_prog in ar aal
5823do
5824 # Extract the first word of "$ac_prog", so it can be a program name with args.
5825set dummy $ac_prog; ac_word=$2
5826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5827$as_echo_n "checking for $ac_word... " >&6; }
5828if ${ac_cv_prog_ac_ct_AR+:} false; then :
5829 $as_echo_n "(cached) " >&6
5830else
5831 if test -n "$ac_ct_AR"; then
5832 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5833else
5834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5835for as_dir in $PATH
5836do
5837 IFS=$as_save_IFS
5838 test -z "$as_dir" && as_dir=.
5839 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005841 ac_cv_prog_ac_ct_AR="$ac_prog"
5842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5843 break 2
5844 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005846 done
5847IFS=$as_save_IFS
5848
5849fi
5850fi
5851ac_ct_AR=$ac_cv_prog_ac_ct_AR
5852if test -n "$ac_ct_AR"; then
5853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5854$as_echo "$ac_ct_AR" >&6; }
5855else
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5857$as_echo "no" >&6; }
5858fi
5859
5860
5861 test -n "$ac_ct_AR" && break
5862done
5863
5864 if test "x$ac_ct_AR" = x; then
5865 AR="ar"
5866 else
5867 case $cross_compiling:$ac_tool_warned in
5868yes:)
5869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5871ac_tool_warned=yes ;;
5872esac
5873 AR=$ac_ct_AR
5874 fi
5875fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876
5877
5878# tweak ARFLAGS only if the user didn't set it on the command line
5879
5880if test -z "$ARFLAGS"
5881then
5882 ARFLAGS="rc"
5883fi
5884
doko@ubuntu.com58844492012-06-30 18:25:32 +02005885if test -n "$ac_tool_prefix"; then
5886 for ac_prog in readelf
5887 do
5888 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5889set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5891$as_echo_n "checking for $ac_word... " >&6; }
5892if ${ac_cv_prog_READELF+:} false; then :
5893 $as_echo_n "(cached) " >&6
5894else
5895 if test -n "$READELF"; then
5896 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5897else
5898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5899for as_dir in $PATH
5900do
5901 IFS=$as_save_IFS
5902 test -z "$as_dir" && as_dir=.
5903 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005905 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5907 break 2
5908 fi
5909done
5910 done
5911IFS=$as_save_IFS
5912
5913fi
5914fi
5915READELF=$ac_cv_prog_READELF
5916if test -n "$READELF"; then
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5918$as_echo "$READELF" >&6; }
5919else
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5921$as_echo "no" >&6; }
5922fi
5923
5924
5925 test -n "$READELF" && break
5926 done
5927fi
5928if test -z "$READELF"; then
5929 ac_ct_READELF=$READELF
5930 for ac_prog in readelf
5931do
5932 # Extract the first word of "$ac_prog", so it can be a program name with args.
5933set dummy $ac_prog; ac_word=$2
5934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5935$as_echo_n "checking for $ac_word... " >&6; }
5936if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5937 $as_echo_n "(cached) " >&6
5938else
5939 if test -n "$ac_ct_READELF"; then
5940 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5941else
5942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5943for as_dir in $PATH
5944do
5945 IFS=$as_save_IFS
5946 test -z "$as_dir" && as_dir=.
5947 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005948 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005949 ac_cv_prog_ac_ct_READELF="$ac_prog"
5950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5951 break 2
5952 fi
5953done
5954 done
5955IFS=$as_save_IFS
5956
5957fi
5958fi
5959ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5960if test -n "$ac_ct_READELF"; then
5961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5962$as_echo "$ac_ct_READELF" >&6; }
5963else
5964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5965$as_echo "no" >&6; }
5966fi
5967
5968
5969 test -n "$ac_ct_READELF" && break
5970done
5971
5972 if test "x$ac_ct_READELF" = x; then
5973 READELF=":"
5974 else
5975 case $cross_compiling:$ac_tool_warned in
5976yes:)
5977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5979ac_tool_warned=yes ;;
5980esac
5981 READELF=$ac_ct_READELF
5982 fi
5983fi
5984
5985if test "$cross_compiling" = yes; then
5986 case "$READELF" in
5987 readelf|:)
5988 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5989 ;;
5990 esac
5991fi
5992
5993
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994
Matthias Klosec4c48422012-10-21 23:05:35 +02005995for ac_prog in python$PACKAGE_VERSION python3 python
5996do
5997 # Extract the first word of "$ac_prog", so it can be a program name with args.
5998set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6000$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006001if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006002 $as_echo_n "(cached) " >&6
6003else
Matthias Klosec4c48422012-10-21 23:05:35 +02006004 if test -n "$PYTHON"; then
6005 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006006else
6007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008for as_dir in $PATH
6009do
6010 IFS=$as_save_IFS
6011 test -z "$as_dir" && as_dir=.
6012 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006013 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006014 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6016 break 2
6017 fi
6018done
6019 done
6020IFS=$as_save_IFS
6021
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006022fi
6023fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006024PYTHON=$ac_cv_prog_PYTHON
6025if test -n "$PYTHON"; then
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6027$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006028else
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030$as_echo "no" >&6; }
6031fi
6032
6033
Matthias Klosec4c48422012-10-21 23:05:35 +02006034 test -n "$PYTHON" && break
6035done
6036test -n "$PYTHON" || PYTHON="not-found"
6037
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006038if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006039 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6040else
6041 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006042fi
6043
6044
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045case $MACHDEP in
6046bsdos*|hp*|HP*)
6047 # install -d does not work on BSDI or HP-UX
6048 if test -z "$INSTALL"
6049 then
6050 INSTALL="${srcdir}/install-sh -c"
6051 fi
6052esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053# Find a good install program. We prefer a C program (faster),
6054# so one script is as good as another. But avoid the broken or
6055# incompatible versions:
6056# SysV /etc/install, /usr/sbin/install
6057# SunOS /usr/etc/install
6058# IRIX /sbin/install
6059# AIX /bin/install
6060# AmigaOS /C/install, which installs bootblocks on floppy discs
6061# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6062# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6063# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6064# OS/2's system install, which has a completely different semantic
6065# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006066# Reject install programs that cannot install multiple files.
6067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6068$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006070if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006071 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072else
6073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6074for as_dir in $PATH
6075do
6076 IFS=$as_save_IFS
6077 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 # Account for people who put trailing slashes in PATH elements.
6079case $as_dir/ in #((
6080 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083 /usr/ucb/* ) ;;
6084 *)
6085 # OSF1 and SCO ODT 3.0 have their own names for install.
6086 # Don't use installbsd from OSF since it installs stuff as root
6087 # by default.
6088 for ac_prog in ginstall scoinst install; do
6089 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006090 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091 if test $ac_prog = install &&
6092 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6093 # AIX install. It has an incompatible calling convention.
6094 :
6095 elif test $ac_prog = install &&
6096 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6097 # program-specific install script used by HP pwplus--don't use.
6098 :
6099 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006100 rm -rf conftest.one conftest.two conftest.dir
6101 echo one > conftest.one
6102 echo two > conftest.two
6103 mkdir conftest.dir
6104 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6105 test -s conftest.one && test -s conftest.two &&
6106 test -s conftest.dir/conftest.one &&
6107 test -s conftest.dir/conftest.two
6108 then
6109 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6110 break 3
6111 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006112 fi
6113 fi
6114 done
6115 done
6116 ;;
6117esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006118
6119 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006120IFS=$as_save_IFS
6121
Matthias Kloseb9621712010-04-24 17:59:49 +00006122rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006123
6124fi
6125 if test "${ac_cv_path_install+set}" = set; then
6126 INSTALL=$ac_cv_path_install
6127 else
6128 # As a last resort, use the slow shell script. Don't cache a
6129 # value for INSTALL within a source directory, because that will
6130 # break other packages using the cache if that directory is
6131 # removed, or if the value is a relative name.
6132 INSTALL=$ac_install_sh
6133 fi
6134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6136$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137
6138# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6139# It thinks the first close brace ends the variable substitution.
6140test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6141
6142test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6143
6144test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6145
Matthias Klose93a0ef12012-03-15 18:08:34 +01006146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6147$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6148if test -z "$MKDIR_P"; then
6149 if ${ac_cv_path_mkdir+:} false; then :
6150 $as_echo_n "(cached) " >&6
6151else
6152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6153for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6154do
6155 IFS=$as_save_IFS
6156 test -z "$as_dir" && as_dir=.
6157 for ac_prog in mkdir gmkdir; do
6158 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006159 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006160 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6161 'mkdir (GNU coreutils) '* | \
6162 'mkdir (coreutils) '* | \
6163 'mkdir (fileutils) '4.1*)
6164 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6165 break 3;;
6166 esac
6167 done
6168 done
6169 done
6170IFS=$as_save_IFS
6171
6172fi
6173
6174 test -d ./--version && rmdir ./--version
6175 if test "${ac_cv_path_mkdir+set}" = set; then
6176 MKDIR_P="$ac_cv_path_mkdir -p"
6177 else
6178 # As a last resort, use the slow shell script. Don't cache a
6179 # value for MKDIR_P within a source directory, because that will
6180 # break other packages using the cache if that directory is
6181 # removed, or if the value is a relative name.
6182 MKDIR_P="$ac_install_sh -d"
6183 fi
6184fi
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6186$as_echo "$MKDIR_P" >&6; }
6187
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188
6189# Not every filesystem supports hard links
6190
6191if test -z "$LN" ; then
6192 case $ac_sys_system in
6193 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194 *) LN=ln;;
6195 esac
6196fi
6197
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006198# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006199
6200ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006201
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6204$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205
6206# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006207if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208 withval=$with_pydebug;
6209if test "$withval" != no
6210then
6211
Matthias Kloseb9621712010-04-24 17:59:49 +00006212$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006213
Matthias Kloseb9621712010-04-24 17:59:49 +00006214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6215$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006216 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006217 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006218else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6219$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220fi
6221else
Matthias Kloseb9621712010-04-24 17:59:49 +00006222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6223$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006224fi
6225
6226
6227# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6228# merged with this chunk of code?
6229
6230# Optimizer/debugger flags
6231# ------------------------
6232# (The following bit of code is complicated enough - please keep things
6233# indented properly. Just pretend you're editing Python code. ;-)
6234
6235# There are two parallel sets of case statements below, one that checks to
6236# see if OPT was set and one that does BASECFLAGS setting based upon
6237# compiler and platform. BASECFLAGS tweaks need to be made even if the
6238# user set OPT.
6239
6240# tweak OPT based on compiler and platform, only if the user didn't set
6241# it on the command line
6242
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006243if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244then
6245 case $GCC in
6246 yes)
6247 if test "$CC" != 'g++' ; then
6248 STRICT_PROTO="-Wstrict-prototypes"
6249 fi
6250 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6251 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6252 WRAP="-fwrapv"
6253 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006254
6255 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006256 case $CC in
6257 *clang*) WRAP="-fwrapv"
6258 ;;
6259 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006260
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006261 case $ac_cv_prog_cc_g in
6262 yes)
6263 if test "$Py_DEBUG" = 'true' ; then
6264 # Optimization messes up debuggers, so turn it off for
6265 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006266 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267 else
6268 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6269 fi
6270 ;;
6271 *)
6272 OPT="-O3 -Wall $STRICT_PROTO"
6273 ;;
6274 esac
6275 case $ac_sys_system in
6276 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6277 ;;
6278 esac
6279 ;;
6280
6281 *)
6282 OPT="-O"
6283 ;;
6284 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285fi
6286
6287
6288
6289# The -arch flags for universal builds on OSX
6290UNIVERSAL_ARCH_FLAGS=
6291
6292
6293# tweak BASECFLAGS based on compiler and platform
6294case $GCC in
6295yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006296 # Python doesn't violate C99 aliasing rules, but older versions of
6297 # GCC produce warnings for legal Python code. Enable
6298 # -fno-strict-aliasing on versions of GCC that support but produce
6299 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6301$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302 ac_save_cc="$CC"
6303 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006304 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006305 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006306 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006307else
Matthias Kloseb9621712010-04-24 17:59:49 +00006308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006310
Matthias Kloseb159a552010-04-25 21:00:44 +00006311
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006312int
6313main ()
6314{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006315
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006316 ;
6317 return 0;
6318}
Matthias Kloseb159a552010-04-25 21:00:44 +00006319
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006321if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006322
6323 CC="$ac_save_cc -fstrict-aliasing"
6324 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006326/* end confdefs.h. */
6327
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006328 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006329int
6330main ()
6331{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006332double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006333 ;
6334 return 0;
6335}
Matthias Kloseb159a552010-04-25 21:00:44 +00006336
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006338if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006339
6340 ac_cv_no_strict_aliasing=no
6341
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342else
Matthias Kloseb159a552010-04-25 21:00:44 +00006343
6344 ac_cv_no_strict_aliasing=yes
6345
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006346fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006348
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006349else
Matthias Kloseb159a552010-04-25 21:00:44 +00006350
6351 ac_cv_no_strict_aliasing=no
6352
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006355fi
6356
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006357 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006358 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6360$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006361 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362 then
6363 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6364 fi
6365
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6367$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6368 ac_save_cc="$CC"
6369 CC="$CC -Wunused-result -Werror"
6370 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006371 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006372 $as_echo_n "(cached) " >&6
6373else
6374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6375/* end confdefs.h. */
6376
6377
6378int
6379main ()
6380{
6381
6382 ;
6383 return 0;
6384}
6385
6386_ACEOF
6387if ac_fn_c_try_compile "$LINENO"; then :
6388
6389 ac_cv_disable_unused_result_warning=yes
6390
6391else
6392
6393 ac_cv_disable_unused_result_warning=no
6394
6395fi
6396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6397fi
6398
6399 CFLAGS="$save_CFLAGS"
6400 CC="$ac_save_cc"
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6402$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6403
6404 if test $ac_cv_disable_unused_result_warning = yes
6405 then
6406 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6407 fi
6408
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6410$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6411 ac_save_cc="$CC"
6412 CC="$CC -Werror=declaration-after-statement"
6413 save_CFLAGS="$CFLAGS"
6414 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6415 $as_echo_n "(cached) " >&6
6416else
6417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6418/* end confdefs.h. */
6419
6420
6421int
6422main ()
6423{
6424
6425 ;
6426 return 0;
6427}
6428
6429_ACEOF
6430if ac_fn_c_try_compile "$LINENO"; then :
6431
6432 ac_cv_declaration_after_statement_warning=yes
6433
6434else
6435
6436 ac_cv_declaration_after_statement_warning=no
6437
6438fi
6439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6440fi
6441
6442 CFLAGS="$save_CFLAGS"
6443 CC="$ac_save_cc"
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6445$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6446
6447 if test $ac_cv_declaration_after_statement_warning = yes
6448 then
6449 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6450 fi
6451
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6453 # support. Without this, treatment of subnormals doesn't follow
6454 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006455 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006456 alpha*)
6457 BASECFLAGS="$BASECFLAGS -mieee"
6458 ;;
6459 esac
6460
6461 case $ac_sys_system in
6462 SCO_SV*)
6463 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6464 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006465
6466 # is there any other compiler on Darwin besides gcc?
6467 Darwin*)
6468 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6469 # used to be here, but non-Apple gcc doesn't accept them.
6470 if test "${CC}" = gcc
6471 then
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006473$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006474 case "${UNIVERSALSDK}" in
6475 */MacOSX10.4u.sdk)
6476 # Build using 10.4 SDK, force usage of gcc when the
6477 # compiler is gcc, otherwise the user will get very
6478 # confusing error messages when building on OSX 10.6
6479 CC=gcc-4.0
6480 CPP=cpp-4.0
6481 ;;
6482 esac
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006484$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006485 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006486
Ned Deily87adb6e2013-10-18 21:09:56 -07006487 if test "${enable_universalsdk}"
6488 then
6489 case "$UNIVERSAL_ARCHS" in
6490 32-bit)
6491 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6492 LIPO_32BIT_FLAGS=""
6493 ARCH_RUN_32BIT=""
6494 ;;
6495 64-bit)
6496 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6497 LIPO_32BIT_FLAGS=""
6498 ARCH_RUN_32BIT="true"
6499 ;;
6500 all)
6501 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6502 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6503 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6504 ;;
6505 intel)
6506 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6507 LIPO_32BIT_FLAGS="-extract i386"
6508 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6509 ;;
6510 intel-32)
6511 UNIVERSAL_ARCH_FLAGS="-arch i386"
6512 LIPO_32BIT_FLAGS=""
6513 ARCH_RUN_32BIT=""
6514 ;;
6515 3-way)
6516 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6517 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6518 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6519 ;;
6520 *)
6521 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6522 ;;
6523 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524
Ned Deily87adb6e2013-10-18 21:09:56 -07006525 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6526 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6527 if test "${UNIVERSALSDK}" != "/"
6528 then
6529 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6530 fi
6531 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532
Ned Deily87adb6e2013-10-18 21:09:56 -07006533 # Calculate an appropriate deployment target for this build:
6534 # The deployment target value is used explicitly to enable certain
6535 # features are enabled (such as builtin libedit support for readline)
6536 # through the use of Apple's Availabiliy Macros and is used as a
6537 # component of the string returned by distutils.get_platform().
6538 #
6539 # Use the value from:
6540 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6541 # 2. the operating system version of the build machine if >= 10.6
6542 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6543 # below to pick either 10.3, 10.4, or 10.5 as the target.
6544 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545
Ned Deily87adb6e2013-10-18 21:09:56 -07006546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6547$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
6548 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6549 if test ${cur_target} '>' 10.2 && \
6550 test ${cur_target} '<' 10.6
6551 then
6552 cur_target=10.3
6553 if test ${enable_universalsdk}
6554 then
6555 case "$UNIVERSAL_ARCHS" in
6556 all|3-way|intel|64-bit)
6557 # These configurations were first supported in 10.5
6558 cur_target='10.5'
6559 ;;
6560 esac
6561 else
6562 if test `/usr/bin/arch` = "i386"
6563 then
6564 # 10.4 was the first release to support Intel archs
6565 cur_target="10.4"
6566 fi
6567 fi
6568 fi
6569 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006570
Ned Deily87adb6e2013-10-18 21:09:56 -07006571 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6572 # environment with a value that is the same as what we'll use
6573 # in the Makefile to ensure that we'll get the same compiler
6574 # environment during configure and build time.
6575 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6576 export MACOSX_DEPLOYMENT_TARGET
6577 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6579$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006580
Ned Deily87adb6e2013-10-18 21:09:56 -07006581 # end of Darwin* tests
6582 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006583 esac
6584 ;;
6585
6586*)
6587 case $ac_sys_system in
6588 OpenUNIX*|UnixWare*)
6589 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6590 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006591 SCO_SV*)
6592 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6593 ;;
6594 esac
6595 ;;
6596esac
6597
6598if test "$Py_DEBUG" = 'true'; then
6599 :
6600else
6601 OPT="-DNDEBUG $OPT"
6602fi
6603
6604if test "$ac_arch_flags"
6605then
6606 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6607fi
6608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006609# On some compilers, pthreads are available without further options
6610# (e.g. MacOS X). On some of these systems, the compiler will not
6611# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6612# So we have to see first whether pthreads are available without
6613# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6615$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006616if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006617 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006618else
Matthias Kloseb9621712010-04-24 17:59:49 +00006619 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006620 ac_cv_pthread_is_default=no
6621else
Matthias Kloseb9621712010-04-24 17:59:49 +00006622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006623/* end confdefs.h. */
6624
Stefan Krah7dba5942012-11-22 22:49:11 +01006625#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006626#include <pthread.h>
6627
6628void* routine(void* p){return NULL;}
6629
6630int main(){
6631 pthread_t p;
6632 if(pthread_create(&p,NULL,routine,NULL)!=0)
6633 return 1;
6634 (void)pthread_detach(p);
6635 return 0;
6636}
6637
6638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006639if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640
6641 ac_cv_pthread_is_default=yes
6642 ac_cv_kthread=no
6643 ac_cv_pthread=no
6644
6645else
Matthias Kloseb9621712010-04-24 17:59:49 +00006646 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650fi
6651
6652
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006653fi
6654
Matthias Kloseb9621712010-04-24 17:59:49 +00006655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6656$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006657
6658
6659if test $ac_cv_pthread_is_default = yes
6660then
6661 ac_cv_kpthread=no
6662else
6663# -Kpthread, if available, provides the right #defines
6664# and linker options to make pthread_create available
6665# Some compilers won't report that they do not support -Kpthread,
6666# so we need to run a program to see whether it really made the
6667# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6669$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006670if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006671 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006672else
6673 ac_save_cc="$CC"
6674CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006675if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006676 ac_cv_kpthread=no
6677else
Matthias Kloseb9621712010-04-24 17:59:49 +00006678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006679/* end confdefs.h. */
6680
Stefan Krah7dba5942012-11-22 22:49:11 +01006681#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682#include <pthread.h>
6683
6684void* routine(void* p){return NULL;}
6685
6686int main(){
6687 pthread_t p;
6688 if(pthread_create(&p,NULL,routine,NULL)!=0)
6689 return 1;
6690 (void)pthread_detach(p);
6691 return 0;
6692}
6693
6694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006695if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696 ac_cv_kpthread=yes
6697else
Matthias Kloseb9621712010-04-24 17:59:49 +00006698 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6701 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006702fi
6703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006704CC="$ac_save_cc"
6705fi
6706
Matthias Kloseb9621712010-04-24 17:59:49 +00006707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6708$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709fi
6710
6711if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6712then
6713# -Kthread, if available, provides the right #defines
6714# and linker options to make pthread_create available
6715# Some compilers won't report that they do not support -Kthread,
6716# so we need to run a program to see whether it really made the
6717# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6719$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006720if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006721 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006722else
6723 ac_save_cc="$CC"
6724CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006725if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726 ac_cv_kthread=no
6727else
Matthias Kloseb9621712010-04-24 17:59:49 +00006728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729/* end confdefs.h. */
6730
Stefan Krah7dba5942012-11-22 22:49:11 +01006731#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006732#include <pthread.h>
6733
6734void* routine(void* p){return NULL;}
6735
6736int main(){
6737 pthread_t p;
6738 if(pthread_create(&p,NULL,routine,NULL)!=0)
6739 return 1;
6740 (void)pthread_detach(p);
6741 return 0;
6742}
6743
6744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006745if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746 ac_cv_kthread=yes
6747else
Matthias Kloseb9621712010-04-24 17:59:49 +00006748 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006752fi
6753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754CC="$ac_save_cc"
6755fi
6756
Matthias Kloseb9621712010-04-24 17:59:49 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6758$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006759fi
6760
6761if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6762then
6763# -pthread, if available, provides the right #defines
6764# and linker options to make pthread_create available
6765# Some compilers won't report that they do not support -pthread,
6766# so we need to run a program to see whether it really made the
6767# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6769$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006770if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006771 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006772else
6773 ac_save_cc="$CC"
6774CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006775if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006776 ac_cv_pthread=no
6777else
Matthias Kloseb9621712010-04-24 17:59:49 +00006778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779/* end confdefs.h. */
6780
Stefan Krah7dba5942012-11-22 22:49:11 +01006781#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006782#include <pthread.h>
6783
6784void* routine(void* p){return NULL;}
6785
6786int main(){
6787 pthread_t p;
6788 if(pthread_create(&p,NULL,routine,NULL)!=0)
6789 return 1;
6790 (void)pthread_detach(p);
6791 return 0;
6792}
6793
6794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006795if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796 ac_cv_pthread=yes
6797else
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6801 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006802fi
6803
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804CC="$ac_save_cc"
6805fi
6806
Matthias Kloseb9621712010-04-24 17:59:49 +00006807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6808$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006809fi
6810
6811# If we have set a CC compiler flag for thread support then
6812# check if it works for CXX, too.
6813ac_cv_cxx_thread=no
6814if test ! -z "$CXX"
6815then
Matthias Kloseb9621712010-04-24 17:59:49 +00006816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6817$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006818ac_save_cxx="$CXX"
6819
6820if test "$ac_cv_kpthread" = "yes"
6821then
6822 CXX="$CXX -Kpthread"
6823 ac_cv_cxx_thread=yes
6824elif test "$ac_cv_kthread" = "yes"
6825then
6826 CXX="$CXX -Kthread"
6827 ac_cv_cxx_thread=yes
6828elif test "$ac_cv_pthread" = "yes"
6829then
6830 CXX="$CXX -pthread"
6831 ac_cv_cxx_thread=yes
6832fi
6833
6834if test $ac_cv_cxx_thread = yes
6835then
6836 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6837 $CXX -c conftest.$ac_ext 2>&5
6838 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6839 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6840 then
6841 ac_cv_cxx_thread=yes
6842 else
6843 ac_cv_cxx_thread=no
6844 fi
6845 rm -fr conftest*
6846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6848$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849fi
6850CXX="$ac_save_cxx"
6851
6852
6853# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6855$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006856if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858else
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860/* end confdefs.h. */
6861#include <stdlib.h>
6862#include <stdarg.h>
6863#include <string.h>
6864#include <float.h>
6865
6866int
6867main ()
6868{
6869
6870 ;
6871 return 0;
6872}
6873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006874if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875 ac_cv_header_stdc=yes
6876else
Matthias Kloseb9621712010-04-24 17:59:49 +00006877 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6880
6881if test $ac_cv_header_stdc = yes; then
6882 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006884/* end confdefs.h. */
6885#include <string.h>
6886
6887_ACEOF
6888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006889 $EGREP "memchr" >/dev/null 2>&1; then :
6890
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891else
6892 ac_cv_header_stdc=no
6893fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006894rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895
6896fi
6897
6898if test $ac_cv_header_stdc = yes; then
6899 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006901/* end confdefs.h. */
6902#include <stdlib.h>
6903
6904_ACEOF
6905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006906 $EGREP "free" >/dev/null 2>&1; then :
6907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908else
6909 ac_cv_header_stdc=no
6910fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006911rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912
6913fi
6914
6915if test $ac_cv_header_stdc = yes; then
6916 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006917 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006918 :
6919else
Matthias Kloseb9621712010-04-24 17:59:49 +00006920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006921/* end confdefs.h. */
6922#include <ctype.h>
6923#include <stdlib.h>
6924#if ((' ' & 0x0FF) == 0x020)
6925# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6926# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6927#else
6928# define ISLOWER(c) \
6929 (('a' <= (c) && (c) <= 'i') \
6930 || ('j' <= (c) && (c) <= 'r') \
6931 || ('s' <= (c) && (c) <= 'z'))
6932# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6933#endif
6934
6935#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6936int
6937main ()
6938{
6939 int i;
6940 for (i = 0; i < 256; i++)
6941 if (XOR (islower (i), ISLOWER (i))
6942 || toupper (i) != TOUPPER (i))
6943 return 2;
6944 return 0;
6945}
6946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006947if ac_fn_c_try_run "$LINENO"; then :
6948
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949else
Matthias Kloseb9621712010-04-24 17:59:49 +00006950 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006954fi
6955
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956fi
6957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6959$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006960if test $ac_cv_header_stdc = yes; then
6961
Matthias Kloseb9621712010-04-24 17:59:49 +00006962$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006963
6964fi
6965
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006966ac_save_cppflags="$CPPFLAGS"
6967CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006968for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006969fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006970ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006971sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006972unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006973poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006974sys/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 +01006975sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006976sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006977sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006978sys/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 -07006979libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01006980bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
6981sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006982do :
6983 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6984ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006985if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006986 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006987#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006988_ACEOF
6989
6990fi
6991
Guido van Rossum627b2d71993-12-24 10:39:16 +00006992done
6993
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006994CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006995ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006996for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006997 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6999$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007000if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007001 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007002else
Matthias Kloseb9621712010-04-24 17:59:49 +00007003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007004/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007005#include <sys/types.h>
7006#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007007
Martin v. Löwis11437992002-04-12 09:54:03 +00007008int
7009main ()
7010{
7011if ((DIR *) 0)
7012return 0;
7013 ;
7014 return 0;
7015}
7016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007017if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007018 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007019else
Matthias Kloseb9621712010-04-24 17:59:49 +00007020 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007024eval ac_res=\$$as_ac_Header
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7026$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007027if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007028 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007029#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007030_ACEOF
7031
7032ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007033fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007035done
7036# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7037if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7039$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007040if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007041 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007042else
Martin v. Löwis11437992002-04-12 09:54:03 +00007043 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007047/* Override any GCC internal prototype to avoid an error.
7048 Use char because int might match the return type of a GCC
7049 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007050#ifdef __cplusplus
7051extern "C"
7052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007053char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007054int
7055main ()
7056{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007058 ;
7059 return 0;
7060}
7061_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007062for ac_lib in '' dir; do
7063 if test -z "$ac_lib"; then
7064 ac_res="none required"
7065 else
7066 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007067 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007069 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007070 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007072rm -f core conftest.err conftest.$ac_objext \
7073 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007074 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007075 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077done
Victor Stinnere0be4232011-10-25 13:06:09 +02007078if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007080else
7081 ac_cv_search_opendir=no
7082fi
7083rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007084LIBS=$ac_func_search_save_LIBS
7085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7087$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007088ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007089if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007090 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007093
Michael W. Hudson54241132001-12-07 15:38:26 +00007094else
Matthias Kloseb9621712010-04-24 17:59:49 +00007095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7096$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007097if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007098 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007099else
7100 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007104/* Override any GCC internal prototype to avoid an error.
7105 Use char because int might match the return type of a GCC
7106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007107#ifdef __cplusplus
7108extern "C"
7109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007110char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007111int
7112main ()
7113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007114return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007115 ;
7116 return 0;
7117}
7118_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007119for ac_lib in '' x; do
7120 if test -z "$ac_lib"; then
7121 ac_res="none required"
7122 else
7123 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007124 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007125 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007126 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007127 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007129rm -f core conftest.err conftest.$ac_objext \
7130 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007131 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007132 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007134done
Victor Stinnere0be4232011-10-25 13:06:09 +02007135if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007137else
7138 ac_cv_search_opendir=no
7139fi
7140rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007141LIBS=$ac_func_search_save_LIBS
7142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7144$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007145ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007146if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007147 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007149fi
7150
7151fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007152
Matthias Kloseb9621712010-04-24 17:59:49 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7154$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007155if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007156 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007157else
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007159/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007160#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007161int
7162main ()
7163{
7164return makedev(0, 0);
7165 ;
7166 return 0;
7167}
7168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007169if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007170 ac_cv_header_sys_types_h_makedev=yes
7171else
Matthias Kloseb9621712010-04-24 17:59:49 +00007172 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007174rm -f core conftest.err conftest.$ac_objext \
7175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007176
7177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7179$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007180
7181if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007182ac_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 +02007183if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007184
Matthias Kloseb9621712010-04-24 17:59:49 +00007185$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007186
7187fi
7188
7189
7190
7191 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007192 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 +02007193if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007194
Matthias Kloseb9621712010-04-24 17:59:49 +00007195$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007196
7197fi
7198
7199
7200 fi
7201fi
7202
Michael W. Hudson54241132001-12-07 15:38:26 +00007203
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007204# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7205for ac_header in net/if.h
7206do :
7207 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7208#ifdef STDC_HEADERS
7209# include <stdlib.h>
7210# include <stddef.h>
7211#else
7212# ifdef HAVE_STDLIB_H
7213# include <stdlib.h>
7214# endif
7215#endif
7216#ifdef HAVE_SYS_SOCKET_H
7217# include <sys/socket.h>
7218#endif
7219
7220"
Victor Stinnere0be4232011-10-25 13:06:09 +02007221if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007222 cat >>confdefs.h <<_ACEOF
7223#define HAVE_NET_IF_H 1
7224_ACEOF
7225
7226fi
7227
7228done
7229
7230
7231
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007232# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007233for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007234do :
7235 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007236#ifdef HAVE_CURSES_H
7237#include <curses.h>
7238#endif
7239
Matthias Kloseb9621712010-04-24 17:59:49 +00007240"
Victor Stinnere0be4232011-10-25 13:06:09 +02007241if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007242 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007243#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007244_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007245
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007246fi
7247
7248done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007249
7250
Martin v. Löwis11017b12006-01-14 18:12:57 +00007251# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007252for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007253do :
7254 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 +00007255#ifdef HAVE_ASM_TYPES_H
7256#include <asm/types.h>
7257#endif
7258#ifdef HAVE_SYS_SOCKET_H
7259#include <sys/socket.h>
7260#endif
7261
Matthias Kloseb9621712010-04-24 17:59:49 +00007262"
Victor Stinnere0be4232011-10-25 13:06:09 +02007263if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007265#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007266_ACEOF
7267
7268fi
7269
7270done
7271
7272
Charles-François Natali47413c12011-10-06 19:47:44 +02007273# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007274for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007275do :
7276 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7277ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7278#ifdef HAVE_SYS_SOCKET_H
7279#include <sys/socket.h>
7280#endif
7281
7282"
7283if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7284 cat >>confdefs.h <<_ACEOF
7285#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7286_ACEOF
7287
7288fi
7289
7290done
7291
7292
Guido van Rossum627b2d71993-12-24 10:39:16 +00007293# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007294was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7296$as_echo_n "checking for clock_t in time.h... " >&6; }
7297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007298/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007299#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007300
7301_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007303 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007304 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007305else
Martin v. Löwis11437992002-04-12 09:54:03 +00007306
7307
Matthias Kloseb9621712010-04-24 17:59:49 +00007308$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007309
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007310
Guido van Rossum627b2d71993-12-24 10:39:16 +00007311fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007312rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007313
Matthias Kloseb9621712010-04-24 17:59:49 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7315$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007316
Matthias Kloseb9621712010-04-24 17:59:49 +00007317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7318$as_echo_n "checking for makedev... " >&6; }
7319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007320/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007321
Jesus Cea740f53a2010-04-28 11:35:30 +00007322#if defined(MAJOR_IN_MKDEV)
7323#include <sys/mkdev.h>
7324#elif defined(MAJOR_IN_SYSMACROS)
7325#include <sys/sysmacros.h>
7326#else
7327#include <sys/types.h>
7328#endif
7329
Neal Norwitz11690112002-07-30 01:08:28 +00007330int
7331main ()
7332{
Jesus Cea740f53a2010-04-28 11:35:30 +00007333
7334 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007335 ;
7336 return 0;
7337}
Matthias Kloseb159a552010-04-25 21:00:44 +00007338
Neal Norwitz11690112002-07-30 01:08:28 +00007339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007340if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007341 ac_cv_has_makedev=yes
7342else
Matthias Kloseb9621712010-04-24 17:59:49 +00007343 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007345rm -f core conftest.err conftest.$ac_objext \
7346 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7348$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007349if test "$ac_cv_has_makedev" = "yes"; then
7350
Matthias Kloseb9621712010-04-24 17:59:49 +00007351$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007352
7353fi
7354
Christian Heimes985ecdc2013-11-20 11:46:18 +01007355# byte swapping
7356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7357$as_echo_n "checking for le64toh... " >&6; }
7358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7359/* end confdefs.h. */
7360
7361#ifdef HAVE_ENDIAN_H
7362#include <endian.h>
7363#elif defined(HAVE_SYS_ENDIAN_H)
7364#include <sys/endian.h>
7365#endif
7366
7367int
7368main ()
7369{
7370
7371 le64toh(1)
7372 ;
7373 return 0;
7374}
7375
7376_ACEOF
7377if ac_fn_c_try_link "$LINENO"; then :
7378 ac_cv_has_le64toh=yes
7379else
7380 ac_cv_has_le64toh=no
7381fi
7382rm -f core conftest.err conftest.$ac_objext \
7383 conftest$ac_exeext conftest.$ac_ext
7384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7385$as_echo "$ac_cv_has_le64toh" >&6; }
7386if test "$ac_cv_has_le64toh" = "yes"; then
7387
7388$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7389
7390fi
7391
Martin v. Löwis399a6892002-10-04 10:22:02 +00007392# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7393# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7394# defined, but the compiler does not support pragma redefine_extname,
7395# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7396# structures (such as rlimit64) without declaring them. As a
7397# work-around, disable LFS on such configurations
7398
7399use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7401$as_echo_n "checking Solaris LFS bug... " >&6; }
7402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007403/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007404
7405#define _LARGEFILE_SOURCE 1
7406#define _FILE_OFFSET_BITS 64
7407#include <sys/resource.h>
7408
Martin v. Löwis399a6892002-10-04 10:22:02 +00007409int
7410main ()
7411{
7412struct rlimit foo;
7413 ;
7414 return 0;
7415}
7416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007417if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007418 sol_lfs_bug=no
7419else
Matthias Kloseb9621712010-04-24 17:59:49 +00007420 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7424$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007425if test "$sol_lfs_bug" = "yes"; then
7426 use_lfs=no
7427fi
7428
7429if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007430# Two defines needed to enable largefile support on various platforms
7431# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007432case $ac_sys_system/$ac_sys_release in
7433AIX*)
7434
7435$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7436
7437 ;;
7438esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007439
Matthias Kloseb9621712010-04-24 17:59:49 +00007440$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007441
7442
Matthias Kloseb9621712010-04-24 17:59:49 +00007443$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007444
Martin v. Löwis399a6892002-10-04 10:22:02 +00007445fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007446
Guido van Rossum84e7b241996-08-19 21:59:00 +00007447# Add some code to confdefs.h so that the test for off_t works on SCO
7448cat >> confdefs.h <<\EOF
7449#if defined(SCO_DS)
7450#undef _OFF_T
7451#endif
7452EOF
7453
Guido van Rossumef2255b2000-03-10 22:30:29 +00007454# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007455ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007456if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007457
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007458else
Martin v. Löwis11437992002-04-12 09:54:03 +00007459
7460cat >>confdefs.h <<_ACEOF
7461#define mode_t int
7462_ACEOF
7463
7464fi
7465
Matthias Kloseb9621712010-04-24 17:59:49 +00007466ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007467if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007468
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007469else
Martin v. Löwis11437992002-04-12 09:54:03 +00007470
7471cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007472#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007473_ACEOF
7474
7475fi
7476
Matthias Kloseb9621712010-04-24 17:59:49 +00007477ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007478if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007479
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007480else
Martin v. Löwis11437992002-04-12 09:54:03 +00007481
7482cat >>confdefs.h <<_ACEOF
7483#define pid_t int
7484_ACEOF
7485
7486fi
7487
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007488
Martin v. Löwis11437992002-04-12 09:54:03 +00007489cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007490#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007491_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007492
Matthias Kloseb9621712010-04-24 17:59:49 +00007493ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007494if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007495
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007496else
Martin v. Löwis11437992002-04-12 09:54:03 +00007497
7498cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007499#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007500_ACEOF
7501
7502fi
7503
Matthias Kloseb9621712010-04-24 17:59:49 +00007504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7505$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007506if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007507 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007508else
Matthias Kloseb9621712010-04-24 17:59:49 +00007509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007510/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007511#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007512
7513_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007514if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007515 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007516 ac_cv_type_uid_t=yes
7517else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007518 ac_cv_type_uid_t=no
7519fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007520rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007521
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7524$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007525if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007526
Matthias Kloseb9621712010-04-24 17:59:49 +00007527$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007528
7529
Matthias Kloseb9621712010-04-24 17:59:49 +00007530$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007531
7532fi
7533
Mark Dickinson983bc162012-12-02 12:11:38 +00007534
7535# There are two separate checks for each of the exact-width integer types we
7536# need. First we check whether the type is available using the usual
7537# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7538# and <stdint.h> where available). We then also use the special type checks of
7539# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7540# directly, #define's uint32_t to be a suitable type.
7541
7542ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7543if test "x$ac_cv_type_uint32_t" = xyes; then :
7544
7545$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7546
7547fi
7548
Matthias Kloseb9621712010-04-24 17:59:49 +00007549ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7550case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007551 no|yes) ;; #(
7552 *)
7553
Matthias Kloseb9621712010-04-24 17:59:49 +00007554$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007555
7556
7557cat >>confdefs.h <<_ACEOF
7558#define uint32_t $ac_cv_c_uint32_t
7559_ACEOF
7560;;
7561 esac
7562
Mark Dickinson983bc162012-12-02 12:11:38 +00007563
7564ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7565if test "x$ac_cv_type_uint64_t" = xyes; then :
7566
7567$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7568
7569fi
7570
Matthias Kloseb9621712010-04-24 17:59:49 +00007571ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7572case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007573 no|yes) ;; #(
7574 *)
7575
Matthias Kloseb9621712010-04-24 17:59:49 +00007576$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007577
7578
7579cat >>confdefs.h <<_ACEOF
7580#define uint64_t $ac_cv_c_uint64_t
7581_ACEOF
7582;;
7583 esac
7584
Mark Dickinson983bc162012-12-02 12:11:38 +00007585
7586ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7587if test "x$ac_cv_type_int32_t" = xyes; then :
7588
7589$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7590
7591fi
7592
Matthias Kloseb9621712010-04-24 17:59:49 +00007593ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7594case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007595 no|yes) ;; #(
7596 *)
7597
7598cat >>confdefs.h <<_ACEOF
7599#define int32_t $ac_cv_c_int32_t
7600_ACEOF
7601;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007602esac
7603
Mark Dickinson983bc162012-12-02 12:11:38 +00007604
7605ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7606if test "x$ac_cv_type_int64_t" = xyes; then :
7607
7608$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7609
7610fi
7611
Matthias Kloseb9621712010-04-24 17:59:49 +00007612ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7613case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007614 no|yes) ;; #(
7615 *)
7616
7617cat >>confdefs.h <<_ACEOF
7618#define int64_t $ac_cv_c_int64_t
7619_ACEOF
7620;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007621esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007622
Mark Dickinson983bc162012-12-02 12:11:38 +00007623
Matthias Kloseb9621712010-04-24 17:59:49 +00007624ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007625if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626
Matthias Kloseb9621712010-04-24 17:59:49 +00007627$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007628
7629fi
7630
Stefan Krah1919b7e2012-03-21 18:25:23 +01007631ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7632if test "x$ac_cv_type___uint128_t" = xyes; then :
7633
7634$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7635
7636fi
7637
Jack Jansendd19cf82001-12-06 22:36:17 +00007638
Michael W. Hudson54241132001-12-07 15:38:26 +00007639# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007640# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007641# The cast to long int works around a bug in the HP C Compiler
7642# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7643# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7644# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7646$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007647if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007648 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007649else
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 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 +00007651
Martin v. Löwis11437992002-04-12 09:54:03 +00007652else
Matthias Kloseb9621712010-04-24 17:59:49 +00007653 if test "$ac_cv_type_int" = yes; then
7654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007656as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007657See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007658 else
7659 ac_cv_sizeof_int=0
7660 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007662
Martin v. Löwis11437992002-04-12 09:54:03 +00007663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7665$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007666
7667
7668
Martin v. Löwis11437992002-04-12 09:54:03 +00007669cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007670#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007671_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007672
7673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007674# The cast to long int works around a bug in the HP C Compiler
7675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7677# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7679$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007680if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007681 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007682else
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 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 +00007684
Martin v. Löwis11437992002-04-12 09:54:03 +00007685else
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 if test "$ac_cv_type_long" = yes; then
7687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007689as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007690See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007691 else
7692 ac_cv_sizeof_long=0
7693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007695
Martin v. Löwis11437992002-04-12 09:54:03 +00007696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7698$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699
7700
7701
Martin v. Löwis11437992002-04-12 09:54:03 +00007702cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007703#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007704_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007705
7706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007707# The cast to long int works around a bug in the HP C Compiler
7708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7710# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7712$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007713if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007715else
Matthias Kloseb9621712010-04-24 17:59:49 +00007716 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 +00007717
Martin v. Löwis11437992002-04-12 09:54:03 +00007718else
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 if test "$ac_cv_type_void_p" = yes; then
7720 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007722as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007723See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007724 else
7725 ac_cv_sizeof_void_p=0
7726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007728
Martin v. Löwis11437992002-04-12 09:54:03 +00007729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7731$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732
7733
7734
Martin v. Löwis11437992002-04-12 09:54:03 +00007735cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007736#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007737_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007738
7739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740# The cast to long int works around a bug in the HP C Compiler
7741# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7742# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7743# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7745$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007746if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007748else
Matthias Kloseb9621712010-04-24 17:59:49 +00007749 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 +00007750
Martin v. Löwis11437992002-04-12 09:54:03 +00007751else
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 if test "$ac_cv_type_short" = yes; then
7753 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007755as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007756See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757 else
7758 ac_cv_sizeof_short=0
7759 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7764$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007765
7766
7767
Martin v. Löwis11437992002-04-12 09:54:03 +00007768cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007769#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007770_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007771
7772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773# The cast to long int works around a bug in the HP C Compiler
7774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7776# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7778$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007779if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007780 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007781else
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 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 +00007783
Martin v. Löwis11437992002-04-12 09:54:03 +00007784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 if test "$ac_cv_type_float" = yes; then
7786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007788as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007789See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790 else
7791 ac_cv_sizeof_float=0
7792 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794
Martin v. Löwis11437992002-04-12 09:54:03 +00007795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7797$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798
7799
7800
Martin v. Löwis11437992002-04-12 09:54:03 +00007801cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007802#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007803_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007804
7805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806# The cast to long int works around a bug in the HP C Compiler
7807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7809# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7811$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007812if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007814else
Matthias Kloseb9621712010-04-24 17:59:49 +00007815 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 +00007816
Martin v. Löwis11437992002-04-12 09:54:03 +00007817else
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 if test "$ac_cv_type_double" = yes; then
7819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007821as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007822See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 else
7824 ac_cv_sizeof_double=0
7825 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007827
Martin v. Löwis11437992002-04-12 09:54:03 +00007828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7830$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831
7832
7833
Martin v. Löwis11437992002-04-12 09:54:03 +00007834cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007835#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007836_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007837
7838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839# The cast to long int works around a bug in the HP C Compiler
7840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7842# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7844$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007845if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007847else
Matthias Kloseb9621712010-04-24 17:59:49 +00007848 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 +00007849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850else
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 if test "$ac_cv_type_fpos_t" = yes; then
7852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007854as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007855See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856 else
7857 ac_cv_sizeof_fpos_t=0
7858 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860
Martin v. Löwis11437992002-04-12 09:54:03 +00007861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7863$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864
7865
7866
Martin v. Löwis11437992002-04-12 09:54:03 +00007867cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007868#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007869_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007870
Michael W. Hudson54241132001-12-07 15:38:26 +00007871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872# The cast to long int works around a bug in the HP C Compiler
7873# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7874# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7875# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7877$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007878if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007879 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007880else
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 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 +00007882
Martin v. Löwis18e16552006-02-15 17:27:45 +00007883else
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 if test "$ac_cv_type_size_t" = yes; then
7885 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007887as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007888See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889 else
7890 ac_cv_sizeof_size_t=0
7891 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007893
Martin v. Löwis18e16552006-02-15 17:27:45 +00007894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7896$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897
7898
7899
Martin v. Löwis18e16552006-02-15 17:27:45 +00007900cat >>confdefs.h <<_ACEOF
7901#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7902_ACEOF
7903
7904
Christian Heimes400adb02008-02-01 08:12:03 +00007905# The cast to long int works around a bug in the HP C Compiler
7906# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7907# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7908# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7910$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007911if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007913else
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 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 +00007915
Christian Heimes400adb02008-02-01 08:12:03 +00007916else
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 if test "$ac_cv_type_pid_t" = yes; then
7918 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007920as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007921See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007922 else
7923 ac_cv_sizeof_pid_t=0
7924 fi
7925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007926
Christian Heimes400adb02008-02-01 08:12:03 +00007927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7929$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007930
7931
7932
7933cat >>confdefs.h <<_ACEOF
7934#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7935_ACEOF
7936
7937
Michael W. Hudson54241132001-12-07 15:38:26 +00007938
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7940$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007941have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007943/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007944
Martin v. Löwis11437992002-04-12 09:54:03 +00007945int
7946main ()
7947{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007948long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ;
7950 return 0;
7951}
7952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007953if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007954
7955
Matthias Kloseb9621712010-04-24 17:59:49 +00007956$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007957
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007958 have_long_long=yes
7959
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7963$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007964if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965# The cast to long int works around a bug in the HP C Compiler
7966# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7967# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7968# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7970$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007971if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007972 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007973else
Matthias Kloseb9621712010-04-24 17:59:49 +00007974 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 +00007975
Martin v. Löwis11437992002-04-12 09:54:03 +00007976else
Matthias Kloseb9621712010-04-24 17:59:49 +00007977 if test "$ac_cv_type_long_long" = yes; then
7978 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007980as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007981See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982 else
7983 ac_cv_sizeof_long_long=0
7984 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007986
Martin v. Löwis11437992002-04-12 09:54:03 +00007987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7989$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990
7991
7992
Martin v. Löwis11437992002-04-12 09:54:03 +00007993cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007994#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007995_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007996
Michael W. Hudson54241132001-12-07 15:38:26 +00007997
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007998fi
7999
Matthias Kloseb9621712010-04-24 17:59:49 +00008000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8001$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008002have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008004/* end confdefs.h. */
8005
8006int
8007main ()
8008{
8009long double x; x = (long double)0;
8010 ;
8011 return 0;
8012}
8013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008014if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008015
8016
Matthias Kloseb9621712010-04-24 17:59:49 +00008017$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008018
8019 have_long_double=yes
8020
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008021fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8024$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008025if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008026# The cast to long int works around a bug in the HP C Compiler
8027# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8028# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8029# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8031$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008032if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008033 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008034else
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 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 +00008036
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008037else
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 if test "$ac_cv_type_long_double" = yes; then
8039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008041as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008042See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008043 else
8044 ac_cv_sizeof_long_double=0
8045 fi
8046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008047
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8050$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008051
8052
8053
8054cat >>confdefs.h <<_ACEOF
8055#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8056_ACEOF
8057
8058
8059fi
8060
8061
Matthias Kloseb9621712010-04-24 17:59:49 +00008062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8063$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008064have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008066/* end confdefs.h. */
8067
8068int
8069main ()
8070{
8071_Bool x; x = (_Bool)0;
8072 ;
8073 return 0;
8074}
8075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008076if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008077
8078
Matthias Kloseb9621712010-04-24 17:59:49 +00008079$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008080
8081 have_c99_bool=yes
8082
Thomas Woutersb2137042007-02-01 18:02:27 +00008083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8086$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008087if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008088# The cast to long int works around a bug in the HP C Compiler
8089# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8090# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8091# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8093$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008094if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008096else
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 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 +00008098
Thomas Woutersb2137042007-02-01 18:02:27 +00008099else
Matthias Kloseb9621712010-04-24 17:59:49 +00008100 if test "$ac_cv_type__Bool" = yes; then
8101 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8102$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008103as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008104See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105 else
8106 ac_cv_sizeof__Bool=0
8107 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008109
Thomas Woutersb2137042007-02-01 18:02:27 +00008110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8112$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113
8114
8115
Thomas Woutersb2137042007-02-01 18:02:27 +00008116cat >>confdefs.h <<_ACEOF
8117#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8118_ACEOF
8119
8120
8121fi
8122
Matthias Kloseb9621712010-04-24 17:59:49 +00008123ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008124 #include <stdint.h>
8125 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008126 #ifdef HAVE_INTTYPES_H
8127 #include <inttypes.h>
8128 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008129"
Victor Stinnere0be4232011-10-25 13:06:09 +02008130if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008131
8132cat >>confdefs.h <<_ACEOF
8133#define HAVE_UINTPTR_T 1
8134_ACEOF
8135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008136# The cast to long int works around a bug in the HP C Compiler
8137# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8138# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8139# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8141$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008142if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008143 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008144else
Matthias Kloseb9621712010-04-24 17:59:49 +00008145 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 +00008146
Martin v. Löwis11437992002-04-12 09:54:03 +00008147else
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 if test "$ac_cv_type_uintptr_t" = yes; then
8149 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008151as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008152See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153 else
8154 ac_cv_sizeof_uintptr_t=0
8155 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008157
Martin v. Löwis11437992002-04-12 09:54:03 +00008158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8160$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008161
8162
8163
Martin v. Löwis11437992002-04-12 09:54:03 +00008164cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008165#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008166_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008167
Michael W. Hudson54241132001-12-07 15:38:26 +00008168
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008169fi
8170
Thomas Wouters89f507f2006-12-13 04:49:30 +00008171
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008172# The cast to long int works around a bug in the HP C Compiler
8173# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8174# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8175# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8177$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008178if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008179 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008180else
Matthias Kloseb9621712010-04-24 17:59:49 +00008181 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008182#ifdef HAVE_SYS_TYPES_H
8183#include <sys/types.h>
8184#endif
8185
Matthias Kloseb9621712010-04-24 17:59:49 +00008186"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008187
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008188else
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 if test "$ac_cv_type_off_t" = yes; then
8190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008192as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008193See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008194 else
8195 ac_cv_sizeof_off_t=0
8196 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008198
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8201$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008203
8204
Martin v. Löwis11437992002-04-12 09:54:03 +00008205cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008206#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008207_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008208
Michael W. Hudson54241132001-12-07 15:38:26 +00008209
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008210
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8212$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008213if test "$have_long_long" = yes
8214then
8215if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008216 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008217
Matthias Kloseb9621712010-04-24 17:59:49 +00008218$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008219
Matthias Kloseb9621712010-04-24 17:59:49 +00008220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8221$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008222else
Matthias Kloseb9621712010-04-24 17:59:49 +00008223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8224$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008225fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8228$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008229fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008230
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008231# The cast to long int works around a bug in the HP C Compiler
8232# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8233# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8234# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8236$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008237if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008238 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008239else
Matthias Kloseb9621712010-04-24 17:59:49 +00008240 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008241#ifdef HAVE_SYS_TYPES_H
8242#include <sys/types.h>
8243#endif
8244#ifdef HAVE_TIME_H
8245#include <time.h>
8246#endif
8247
Matthias Kloseb9621712010-04-24 17:59:49 +00008248"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008249
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008250else
Matthias Kloseb9621712010-04-24 17:59:49 +00008251 if test "$ac_cv_type_time_t" = yes; then
8252 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8253$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008254as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008255See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008256 else
8257 ac_cv_sizeof_time_t=0
8258 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008260
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8263$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008264
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008265
8266
Martin v. Löwis11437992002-04-12 09:54:03 +00008267cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008268#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008269_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008270
Michael W. Hudson54241132001-12-07 15:38:26 +00008271
8272
Trent Mick635f6fb2000-08-23 21:33:05 +00008273# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008274ac_save_cc="$CC"
8275if test "$ac_cv_kpthread" = "yes"
8276then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008277elif test "$ac_cv_kthread" = "yes"
8278then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008279elif test "$ac_cv_pthread" = "yes"
8280then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008281fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008282
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8284$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008285have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008287/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008288
8289 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008290int
8291main ()
8292{
Guido van Rossum12580492000-09-24 16:47:19 +00008293pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008294 ;
8295 return 0;
8296}
Matthias Kloseb159a552010-04-25 21:00:44 +00008297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008299if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008300 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8304$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008305if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008307# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8308# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8309# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8311$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008312if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008314else
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008316#ifdef HAVE_PTHREAD_H
8317#include <pthread.h>
8318#endif
8319
Matthias Kloseb9621712010-04-24 17:59:49 +00008320"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008321
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008322else
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 if test "$ac_cv_type_pthread_t" = yes; then
8324 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8325$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008326as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008327See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008328 else
8329 ac_cv_sizeof_pthread_t=0
8330 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008332
Trent Mick635f6fb2000-08-23 21:33:05 +00008333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8335$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008336
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008337
8338
Martin v. Löwis11437992002-04-12 09:54:03 +00008339cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008340#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008341_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008342
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008343
Trent Mick635f6fb2000-08-23 21:33:05 +00008344fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008345CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008346
Michael W. Hudson54241132001-12-07 15:38:26 +00008347
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008348case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008349 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008350 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8351 ;;
8352 Darwin/*)
8353 OTHER_LIBTOOL_OPT=""
8354 ;;
8355esac
8356
8357
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008358
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008359case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008360 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008361 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8362 if test "${enable_universalsdk}"; then
8363 :
8364 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008365 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008366 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008367 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008368 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008369 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008370 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008371 if test ${gcc_version} '<' 4.0
8372 then
8373 LIBTOOL_CRUFT="-lcc_dynamic"
8374 else
8375 LIBTOOL_CRUFT=""
8376 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008378 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008379else
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008381/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008382
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008383 #include <unistd.h>
8384 int main(int argc, char*argv[])
8385 {
8386 if (sizeof(long) == 4) {
8387 return 0;
8388 } else {
8389 return 1;
8390 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008391 }
8392
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008394if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008395 ac_osx_32bit=yes
8396else
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8400 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008401fi
8402
8403
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008404 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008405 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008406 i386)
8407 MACOSX_DEFAULT_ARCH="i386"
8408 ;;
8409 ppc)
8410 MACOSX_DEFAULT_ARCH="ppc"
8411 ;;
8412 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008413 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008414 ;;
8415 esac
8416 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008417 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008418 i386)
8419 MACOSX_DEFAULT_ARCH="x86_64"
8420 ;;
8421 ppc)
8422 MACOSX_DEFAULT_ARCH="ppc64"
8423 ;;
8424 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008425 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008426 ;;
8427 esac
8428
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008429 fi
8430
8431 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008432 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008433 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008434esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8436$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008437if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008438then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008439 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008440 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008441 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008442
Matthias Kloseb9621712010-04-24 17:59:49 +00008443$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8446$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008447 if test $enable_shared = "yes"
8448 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008449 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 +00008450 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008451else
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008454fi
8455
Matthias Kloseb9621712010-04-24 17:59:49 +00008456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8457$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008458case $ac_sys_system/$ac_sys_release in
8459 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008462
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8464$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008465 ;;
8466 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8468$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008469 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008470esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008471
Guido van Rossum0a516c91994-09-12 10:58:40 +00008472# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008473
Michael W. Hudson54241132001-12-07 15:38:26 +00008474
8475
8476
8477
Benjamin Peterson99f03762010-04-11 22:15:28 +00008478
Thomas Wouters477c8d52006-05-27 19:21:47 +00008479
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008480# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8481# -- usually .so, .sl on HP-UX, .dll on Cygwin
8482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8483$as_echo_n "checking the extension of shared libraries... " >&6; }
8484if test -z "$SHLIB_SUFFIX"; then
8485 case $ac_sys_system in
8486 hp*|HP*)
8487 case `uname -m` in
8488 ia64) SHLIB_SUFFIX=.so;;
8489 *) SHLIB_SUFFIX=.sl;;
8490 esac
8491 ;;
8492 CYGWIN*) SHLIB_SUFFIX=.dll;;
8493 *) SHLIB_SUFFIX=.so;;
8494 esac
8495fi
8496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8497$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008498
Guido van Rossum0a516c91994-09-12 10:58:40 +00008499# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008500# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008501# (Shared libraries in this instance are shared modules to be loaded into
8502# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8504$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008505if test -z "$LDSHARED"
8506then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008507 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008508 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008509 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008510 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008511 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008512 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008513 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008515 if test "$GCC" = "yes" ; then
8516 LDSHARED='$(CC) -shared'
8517 LDCXXSHARED='$(CXX) -shared'
8518 else
8519 LDSHARED='$(CC) -G'
8520 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008521 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008522 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008523 if test "$GCC" = "yes" ; then
8524 LDSHARED='$(CC) -shared'
8525 LDCXXSHARED='$(CXX) -shared'
8526 else
8527 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008528 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008529 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008530 LDSHARED='$(CC) -bundle'
8531 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008532 if test "$enable_framework" ; then
8533 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008534 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8535 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008536 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008537 else
8538 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008539 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008540 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008541 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008542 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008543 LDSHARED='$(CC) -bundle'
8544 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008545 if test "$enable_framework" ; then
8546 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008547 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8548 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008549 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008550 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008551 # No framework, use the Python app as bundle-loader
8552 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008553 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008554 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008555 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008556 Darwin/*)
8557 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8558 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008559
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008560 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008561 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008562 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8563 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008564 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008565 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008566 LDSHARED='$(CC) -bundle'
8567 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008568 if test "$enable_framework" ; then
8569 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008570 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8571 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008572 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008573 else
8574 # No framework, use the Python app as bundle-loader
8575 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8576 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008577 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008578 fi
8579 fi
8580 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008581 Linux*|GNU*|QNX*)
8582 LDSHARED='$(CC) -shared'
8583 LDCXXSHARED='$(CXX) -shared';;
8584 BSD/OS*/4*)
8585 LDSHARED="gcc -shared"
8586 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008587 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008588 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008589 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008590 LDSHARED='$(CC) -shared'
8591 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008592 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008593 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008594 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008595 OpenBSD*)
8596 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8597 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008598 LDSHARED='$(CC) -shared $(CCSHARED)'
8599 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008600 else
8601 case `uname -r` in
8602 [01].* | 2.[0-7] | 2.[0-7].*)
8603 LDSHARED="ld -Bshareable ${LDFLAGS}"
8604 ;;
8605 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008606 LDSHARED='$(CC) -shared $(CCSHARED)'
8607 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008608 ;;
8609 esac
8610 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008611 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008612 LDSHARED='$(CC) -shared'
8613 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008614 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008615 if test "$GCC" = "yes" ; then
8616 LDSHARED='$(CC) -shared'
8617 LDCXXSHARED='$(CXX) -shared'
8618 else
8619 LDSHARED='$(CC) -G'
8620 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008621 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008622 SCO_SV*)
8623 LDSHARED='$(CC) -Wl,-G,-Bexport'
8624 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8625 CYGWIN*)
8626 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8627 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008628 *) LDSHARED="ld";;
8629 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8632$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008633LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008634BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008635# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008636# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8638$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008639if test -z "$CCSHARED"
8640then
Guido van Rossum07397971997-04-29 21:49:50 +00008641 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008642 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008643 then CCSHARED="-fPIC";
8644 elif test `uname -p` = sparc;
8645 then CCSHARED="-xcode=pic32";
8646 else CCSHARED="-Kpic";
8647 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008648 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008649 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008650 else CCSHARED="+z";
8651 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008652 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008653 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008654 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008655 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008656 if test "$GCC" = "yes"
8657 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008658 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008659 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008660 SCO_SV*)
8661 if test "$GCC" = "yes"
8662 then CCSHARED="-fPIC"
8663 else CCSHARED="-Kpic -belf"
8664 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008665 IRIX*/6*) case $CC in
8666 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008667 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008668 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008669 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8672$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008673# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008674# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8676$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008677if test -z "$LINKFORSHARED"
8678then
Guido van Rossum07397971997-04-29 21:49:50 +00008679 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008680 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008681 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008682 LINKFORSHARED="-Wl,-E -Wl,+s";;
8683# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008684 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008685 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008686 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008687 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008688 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008689
8690 # Issue #18075: the default maximum stack size (8MBytes) is too
8691 # small for the default recursion limit. Increase the stack size
8692 # to ensure that tests don't crash
8693 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8694
Jack Jansene578a632001-08-15 01:27:14 +00008695 if test "$enable_framework"
8696 then
Jack Jansenda49e192005-01-07 13:08:22 +00008697 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008698 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008699 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008700 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008701 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008702 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008703 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008704 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8705 then
8706 LINKFORSHARED="-Wl,--export-dynamic"
8707 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008708 SunOS/5*) case $CC in
8709 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008710 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008711 then
8712 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008713 fi;;
8714 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008715 CYGWIN*)
8716 if test $enable_shared = "no"
8717 then
8718 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8719 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008720 QNX*)
8721 # -Wl,-E causes the symbols to be added to the dynamic
8722 # symbol table so that they can be found when a module
8723 # is loaded. -N 2048K causes the stack size to be set
8724 # to 2048 kilobytes so that the stack doesn't overflow
8725 # when running test_compile.py.
8726 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008727 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8730$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008731
Michael W. Hudson54241132001-12-07 15:38:26 +00008732
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008733
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8735$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008736if test ! "$LIBRARY" = "$LDLIBRARY"
8737then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008738 case $ac_sys_system in
8739 CYGWIN*)
8740 # Cygwin needs CCSHARED when building extension DLLs
8741 # but not when building the interpreter DLL.
8742 CFLAGSFORSHARED='';;
8743 *)
8744 CFLAGSFORSHARED='$(CCSHARED)'
8745 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8748$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008749
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008750# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8751# library (with --enable-shared).
8752# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008753# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8754# if it is not required, since it creates a dependency of the shared library
8755# to LIBS. This, in turn, means that applications linking the shared libpython
8756# don't need to link LIBS explicitly. The default should be only changed
8757# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008758
Matthias Kloseb9621712010-04-24 17:59:49 +00008759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8760$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008761case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008762 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008763 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008764esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8766$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008767
8768
Guido van Rossum627b2d71993-12-24 10:39:16 +00008769# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8771$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008772if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008773 $as_echo_n "(cached) " >&6
8774else
8775 ac_check_lib_save_LIBS=$LIBS
8776LIBS="-lsendfile $LIBS"
8777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8778/* end confdefs.h. */
8779
8780/* Override any GCC internal prototype to avoid an error.
8781 Use char because int might match the return type of a GCC
8782 builtin and then its argument prototype would still apply. */
8783#ifdef __cplusplus
8784extern "C"
8785#endif
8786char sendfile ();
8787int
8788main ()
8789{
8790return sendfile ();
8791 ;
8792 return 0;
8793}
8794_ACEOF
8795if ac_fn_c_try_link "$LINENO"; then :
8796 ac_cv_lib_sendfile_sendfile=yes
8797else
8798 ac_cv_lib_sendfile_sendfile=no
8799fi
8800rm -f core conftest.err conftest.$ac_objext \
8801 conftest$ac_exeext conftest.$ac_ext
8802LIBS=$ac_check_lib_save_LIBS
8803fi
8804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8805$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008806if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008807 cat >>confdefs.h <<_ACEOF
8808#define HAVE_LIBSENDFILE 1
8809_ACEOF
8810
8811 LIBS="-lsendfile $LIBS"
8812
8813fi
8814
Matthias Kloseb9621712010-04-24 17:59:49 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8816$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008817if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008819else
Martin v. Löwis11437992002-04-12 09:54:03 +00008820 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008821LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825/* Override any GCC internal prototype to avoid an error.
8826 Use char because int might match the return type of a GCC
8827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008828#ifdef __cplusplus
8829extern "C"
8830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008831char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008832int
8833main ()
8834{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008836 ;
8837 return 0;
8838}
8839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008842else
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845rm -f core conftest.err conftest.$ac_objext \
8846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008847LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8850$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008851if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 cat >>confdefs.h <<_ACEOF
8853#define HAVE_LIBDL 1
8854_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008855
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008856 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008857
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008858fi
8859 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8861$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008862if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008864else
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008866LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870/* Override any GCC internal prototype to avoid an error.
8871 Use char because int might match the return type of a GCC
8872 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008873#ifdef __cplusplus
8874extern "C"
8875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008876char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008877int
8878main ()
8879{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008880return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008881 ;
8882 return 0;
8883}
8884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008885if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008886 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008887else
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008890rm -f core conftest.err conftest.$ac_objext \
8891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008892LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8895$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008896if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008897 cat >>confdefs.h <<_ACEOF
8898#define HAVE_LIBDLD 1
8899_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008900
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008901 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008902
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008903fi
8904 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008905
Georg Brandlb1441c72009-01-03 22:33:39 +00008906# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008907if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8909$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008910if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008912else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008913 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917/* Override any GCC internal prototype to avoid an error.
8918 Use char because int might match the return type of a GCC
8919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008920#ifdef __cplusplus
8921extern "C"
8922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008923char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008924int
8925main ()
8926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008927return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 ;
8929 return 0;
8930}
8931_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008932for ac_lib in '' pthread rt posix4; do
8933 if test -z "$ac_lib"; then
8934 ac_res="none required"
8935 else
8936 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008937 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008940 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008942rm -f core conftest.err conftest.$ac_objext \
8943 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008944 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947done
Victor Stinnere0be4232011-10-25 13:06:09 +02008948if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008950else
8951 ac_cv_search_sem_init=no
8952fi
8953rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008954LIBS=$ac_func_search_save_LIBS
8955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8957$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008959if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008961
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008962fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008963 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008964 # posix4 on Solaris 2.6
8965 # pthread (first!) on Linux
8966fi
8967
Martin v. Löwis19d17342003-06-14 21:03:05 +00008968# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8970$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008971if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008973else
8974 ac_check_lib_save_LIBS=$LIBS
8975LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008977/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008978
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008979/* Override any GCC internal prototype to avoid an error.
8980 Use char because int might match the return type of a GCC
8981 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008982#ifdef __cplusplus
8983extern "C"
8984#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008985char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008986int
8987main ()
8988{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008989return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008990 ;
8991 return 0;
8992}
8993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008994if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008995 ac_cv_lib_intl_textdomain=yes
8996else
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008999rm -f core conftest.err conftest.$ac_objext \
9000 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009001LIBS=$ac_check_lib_save_LIBS
9002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9004$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009005if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009006
Matthias Kloseb9621712010-04-24 17:59:49 +00009007$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009008
Brett Cannonc6d936e2009-06-07 20:09:53 +00009009 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009010fi
9011
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009012
9013# checks for system dependent C++ extensions support
9014case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9016$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009018/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009019
Georg Brandl59e87bd2011-02-15 19:48:59 +00009020 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009021int
9022main ()
9023{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009024loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 ;
9026 return 0;
9027}
Matthias Kloseb159a552010-04-25 21:00:44 +00009028
Martin v. Löwis11437992002-04-12 09:54:03 +00009029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009030if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009031
Matthias Kloseb159a552010-04-25 21:00:44 +00009032
Matthias Kloseb9621712010-04-24 17:59:49 +00009033$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009034
Matthias Kloseb159a552010-04-25 21:00:44 +00009035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009036$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009037
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009038else
Matthias Kloseb159a552010-04-25 21:00:44 +00009039
9040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009041$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009042
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009044rm -f core conftest.err conftest.$ac_objext \
9045 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009046 *) ;;
9047esac
9048
Christian Heimes985ecdc2013-11-20 11:46:18 +01009049# check for systems that require aligned memory access
9050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9051$as_echo_n "checking aligned memory access is required... " >&6; }
9052if test "$cross_compiling" = yes; then :
9053 aligned_required=yes
9054else
9055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9056/* end confdefs.h. */
9057
9058int main()
9059{
9060 char s[16];
9061 int i, *p1, *p2;
9062 for (i=0; i < 16; i++)
9063 s[i] = i;
9064 p1 = (int*)(s+1);
9065 p2 = (int*)(s+2);
9066 if (*p1 == *p2)
9067 return 1;
9068 return 0;
9069}
9070
9071_ACEOF
9072if ac_fn_c_try_run "$LINENO"; then :
9073 aligned_required=no
9074else
9075 aligned_required=yes
9076fi
9077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9078 conftest.$ac_objext conftest.beam conftest.$ac_ext
9079fi
9080
9081
9082if test "$aligned_required" = yes ; then
9083
9084$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9085
9086fi
9087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9088$as_echo "$aligned_required" >&6; }
9089
9090
9091# str, bytes and memoryview hash algorithm
9092
9093
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9095$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9096
9097# Check whether --with-hash_algorithm was given.
9098if test "${with_hash_algorithm+set}" = set; then :
9099 withval=$with_hash_algorithm;
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9101$as_echo "$withval" >&6; }
9102case "$withval" in
9103 siphash24)
9104 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9105
9106 ;;
9107 fnv)
9108 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9109
9110 ;;
9111 *)
9112 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9113 ;;
9114esac
9115
9116else
9117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9118$as_echo "default" >&6; }
9119fi
9120
9121
Guido van Rossum70c7f481998-03-26 18:44:10 +00009122# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9124$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009125if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009126 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009127else
Martin v. Löwis11437992002-04-12 09:54:03 +00009128 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009129LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009133/* Override any GCC internal prototype to avoid an error.
9134 Use char because int might match the return type of a GCC
9135 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009136#ifdef __cplusplus
9137extern "C"
9138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009139char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009140int
9141main ()
9142{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009143return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 ;
9145 return 0;
9146}
9147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009148if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009150else
Matthias Kloseb9621712010-04-24 17:59:49 +00009151 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009153rm -f core conftest.err conftest.$ac_objext \
9154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009155LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9158$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009159if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009160 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009161fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009162 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9164$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009165if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009166 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009167else
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009169LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009173/* Override any GCC internal prototype to avoid an error.
9174 Use char because int might match the return type of a GCC
9175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009176#ifdef __cplusplus
9177extern "C"
9178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009179char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009180int
9181main ()
9182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009183return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 ;
9185 return 0;
9186}
9187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009188if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009190else
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009193rm -f core conftest.err conftest.$ac_objext \
9194 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009195LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9198$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009199if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009200 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009201fi
9202 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009203
Matthias Kloseb9621712010-04-24 17:59:49 +00009204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9205$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009207# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009208if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009209 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9211$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009212LIBS="$withval $LIBS"
9213
9214else
Matthias Kloseb9621712010-04-24 17:59:49 +00009215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9216$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217fi
9218
Guido van Rossum7f43da71994-08-01 12:15:30 +00009219
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009220if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009221 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9222set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9224$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009225if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009226 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009227else
9228 case $PKG_CONFIG in
9229 [\\/]* | ?:[\\/]*)
9230 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9231 ;;
9232 *)
9233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9234for as_dir in $PATH
9235do
9236 IFS=$as_save_IFS
9237 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009238 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009239 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009240 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009241 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009242 break 2
9243 fi
9244done
Matthias Kloseb9621712010-04-24 17:59:49 +00009245 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009246IFS=$as_save_IFS
9247
9248 ;;
9249esac
9250fi
9251PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9252if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9254$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009255else
Matthias Kloseb9621712010-04-24 17:59:49 +00009256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9257$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009258fi
9259
9260
9261fi
9262if test -z "$ac_cv_path_PKG_CONFIG"; then
9263 ac_pt_PKG_CONFIG=$PKG_CONFIG
9264 # Extract the first word of "pkg-config", so it can be a program name with args.
9265set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9267$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009268if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009269 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009270else
9271 case $ac_pt_PKG_CONFIG in
9272 [\\/]* | ?:[\\/]*)
9273 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9274 ;;
9275 *)
9276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9277for as_dir in $PATH
9278do
9279 IFS=$as_save_IFS
9280 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009281 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009282 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009283 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009285 break 2
9286 fi
9287done
Matthias Kloseb9621712010-04-24 17:59:49 +00009288 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009289IFS=$as_save_IFS
9290
9291 ;;
9292esac
9293fi
9294ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9295if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9297$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009298else
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9300$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009301fi
9302
9303 if test "x$ac_pt_PKG_CONFIG" = x; then
9304 PKG_CONFIG=""
9305 else
9306 case $cross_compiling:$ac_tool_warned in
9307yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9309$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009310ac_tool_warned=yes ;;
9311esac
9312 PKG_CONFIG=$ac_pt_PKG_CONFIG
9313 fi
9314else
9315 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9316fi
9317
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009318
9319# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9321$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009322
9323# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009324if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009325 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009326else
9327 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009328fi
9329
9330
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9332$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009333
9334# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9336$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009337
9338# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009339if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009340 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009341else
9342 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009343fi
9344
9345
9346if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009347 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9348else
9349 LIBFFI_INCLUDEDIR=""
9350fi
9351
9352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9354$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009355
Stefan Krah60187b52012-03-23 19:06:27 +01009356# Check for use of the system libmpdec library
9357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9358$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9359
9360# Check whether --with-system_libmpdec was given.
9361if test "${with_system_libmpdec+set}" = set; then :
9362 withval=$with_system_libmpdec;
9363else
9364 with_system_libmpdec="no"
9365fi
9366
9367
9368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9369$as_echo "$with_system_libmpdec" >&6; }
9370
Benjamin Peterson076ed002010-10-31 17:11:02 +00009371# Check for support for loadable sqlite extensions
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9373$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9374# Check whether --enable-loadable-sqlite-extensions was given.
9375if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9376 enableval=$enable_loadable_sqlite_extensions;
9377else
9378 enable_loadable_sqlite_extensions="no"
9379fi
9380
9381
9382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9383$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9384
Ned Deilyd819b932013-09-06 01:07:05 -07009385# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9386
9387
9388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9389$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9390
9391# Check whether --with-tcltk-includes was given.
9392if test "${with_tcltk_includes+set}" = set; then :
9393 withval=$with_tcltk_includes;
9394else
9395 with_tcltk_includes="default"
9396fi
9397
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9399$as_echo "$with_tcltk_includes" >&6; }
9400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9401$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9402
9403# Check whether --with-tcltk-libs was given.
9404if test "${with_tcltk_libs+set}" = set; then :
9405 withval=$with_tcltk_libs;
9406else
9407 with_tcltk_libs="default"
9408fi
9409
9410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9411$as_echo "$with_tcltk_libs" >&6; }
9412if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9413then
9414 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9415 then
9416 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9417 fi
9418 TCLTK_INCLUDES=""
9419 TCLTK_LIBS=""
9420else
9421 TCLTK_INCLUDES="$with_tcltk_includes"
9422 TCLTK_LIBS="$with_tcltk_libs"
9423fi
9424
Matthias Klose55708cc2009-04-30 08:06:49 +00009425# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9427$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009428
9429# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009430if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009431 withval=$with_dbmliborder;
9432if test x$with_dbmliborder = xyes
9433then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009434as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009435else
9436 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9437 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9438 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009439 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009440 fi
9441 done
9442fi
9443fi
9444
Matthias Kloseb9621712010-04-24 17:59:49 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9446$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009447
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009448# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009449
9450
Matthias Kloseb9621712010-04-24 17:59:49 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9452$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009455if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456 withval=$with_signal_module;
9457fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009458
9459
9460if test -z "$with_signal_module"
9461then with_signal_module="yes"
9462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9464$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009465
9466if test "${with_signal_module}" = "yes"; then
9467 USE_SIGNAL_MODULE=""
9468 SIGNAL_OBJS=""
9469else
9470 USE_SIGNAL_MODULE="#"
9471 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9472fi
9473
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009474# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009475
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009476USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478
Martin v. Löwis11437992002-04-12 09:54:03 +00009479
9480# Templates for things AC_DEFINEd more than once.
9481# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009482
9483
Martin v. Löwis11437992002-04-12 09:54:03 +00009484
Matthias Kloseb9621712010-04-24 17:59:49 +00009485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9486$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009489if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490 withval=$with_threads;
9491fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009492
9493
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009494# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009497if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498 withval=$with_thread; with_threads=$with_thread
9499fi
9500
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009501
9502if test -z "$with_threads"
9503then with_threads="yes"
9504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9506$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009507
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009508
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009509if test "$with_threads" = "no"
9510then
9511 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009512elif test "$ac_cv_pthread_is_default" = yes
9513then
Matthias Kloseb9621712010-04-24 17:59:49 +00009514 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009515
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009516 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009517 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009518
9519 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009521elif test "$ac_cv_kpthread" = "yes"
9522then
9523 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009524 if test "$ac_cv_cxx_thread" = "yes"; then
9525 CXX="$CXX -Kpthread"
9526 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009528
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009529 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009530 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009531elif test "$ac_cv_kthread" = "yes"
9532then
9533 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009534 if test "$ac_cv_cxx_thread" = "yes"; then
9535 CXX="$CXX -Kthread"
9536 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009537 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009538
9539 posix_threads=yes
9540 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009541elif test "$ac_cv_pthread" = "yes"
9542then
9543 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009544 if test "$ac_cv_cxx_thread" = "yes"; then
9545 CXX="$CXX -pthread"
9546 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009547 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009548
9549 posix_threads=yes
9550 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009551else
9552 if test ! -z "$with_threads" -a -d "$with_threads"
9553 then LDFLAGS="$LDFLAGS -L$with_threads"
9554 fi
9555 if test ! -z "$withval" -a -d "$withval"
9556 then LDFLAGS="$LDFLAGS -L$withval"
9557 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009558
9559 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009560 # define _POSIX_THREADS in unistd.h. Some apparently don't
9561 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9563$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009565/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009566
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009567#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009568#ifdef _POSIX_THREADS
9569yes
9570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009571
9572_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009573if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009574 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009575 unistd_defines_pthreads=yes
9576else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009577 unistd_defines_pthreads=no
9578fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009579rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009580
Matthias Kloseb9621712010-04-24 17:59:49 +00009581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9582$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009583
Matthias Kloseb9621712010-04-24 17:59:49 +00009584 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009585
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009586 # Just looking for pthread_create in libpthread is not enough:
9587 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9588 # So we really have to include pthread.h, and then link.
9589 _libs=$LIBS
9590 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9592$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009594/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009595
9596#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009597#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009598
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009599void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009600int
9601main ()
9602{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009603
9604pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 ;
9606 return 0;
9607}
9608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009609if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009610
Matthias Kloseb9621712010-04-24 17:59:49 +00009611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9612$as_echo "yes" >&6; }
9613 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009614
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009615 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009616 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009617else
Martin v. Löwis11437992002-04-12 09:54:03 +00009618
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009619 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009621if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009622 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009623
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009624 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009625 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009626else
Guido van Rossumad678af1998-10-02 14:42:15 +00009627
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9629$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009630if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009631 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009632else
Martin v. Löwis11437992002-04-12 09:54:03 +00009633 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009634LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009638/* Override any GCC internal prototype to avoid an error.
9639 Use char because int might match the return type of a GCC
9640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009641#ifdef __cplusplus
9642extern "C"
9643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009644char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009645int
9646main ()
9647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 ;
9650 return 0;
9651}
9652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009653if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009655else
Matthias Kloseb9621712010-04-24 17:59:49 +00009656 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009658rm -f core conftest.err conftest.$ac_objext \
9659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009660LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9663$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009664if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009666
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009667 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009668 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009669 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009670else
Greg Steinadf63d62000-07-05 10:38:09 +00009671
Matthias Kloseb9621712010-04-24 17:59:49 +00009672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9673$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009674if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009676else
Martin v. Löwis11437992002-04-12 09:54:03 +00009677 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009678LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009682/* Override any GCC internal prototype to avoid an error.
9683 Use char because int might match the return type of a GCC
9684 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009685#ifdef __cplusplus
9686extern "C"
9687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009688char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009689int
9690main ()
9691{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 ;
9694 return 0;
9695}
9696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009697if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009699else
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009702rm -f core conftest.err conftest.$ac_objext \
9703 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009704LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9707$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009708if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009709 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009710
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009711 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009712 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009713 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009714else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009715
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9717$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009718if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009720else
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009722LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726/* Override any GCC internal prototype to avoid an error.
9727 Use char because int might match the return type of a GCC
9728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009729#ifdef __cplusplus
9730extern "C"
9731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009732char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009733int
9734main ()
9735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 ;
9738 return 0;
9739}
9740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009743else
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009746rm -f core conftest.err conftest.$ac_objext \
9747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009748LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9751$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009752if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009753 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009754
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009755 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009756 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009757 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009758else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009759
Matthias Kloseb9621712010-04-24 17:59:49 +00009760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9761$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009762if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009763 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009764else
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009766LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009770/* Override any GCC internal prototype to avoid an error.
9771 Use char because int might match the return type of a GCC
9772 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009773#ifdef __cplusplus
9774extern "C"
9775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009776char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009777int
9778main ()
9779{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ;
9782 return 0;
9783}
9784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009785if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009787else
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009790rm -f core conftest.err conftest.$ac_objext \
9791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009792LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9795$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009796if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009797 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009798
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009799 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009800 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009801 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009802else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009803
Martin v. Löwis130fb172001-07-19 11:00:41 +00009804 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009805fi
9806
Guido van Rossum627b2d71993-12-24 10:39:16 +00009807
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009808fi
9809
Guido van Rossum0be3e491997-05-22 20:33:33 +00009810fi
9811
Guido van Rossum49545951997-12-02 19:28:29 +00009812fi
9813
Guido van Rossumb93a8621998-05-07 13:27:32 +00009814fi
9815
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009817rm -f core conftest.err conftest.$ac_objext \
9818 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009819
Matthias Kloseb9621712010-04-24 17:59:49 +00009820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9821$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009822if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009824else
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009826LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009830/* Override any GCC internal prototype to avoid an error.
9831 Use char because int might match the return type of a GCC
9832 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009833#ifdef __cplusplus
9834extern "C"
9835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009836char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009837int
9838main ()
9839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 ;
9842 return 0;
9843}
9844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009845if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009846 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009847else
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009850rm -f core conftest.err conftest.$ac_objext \
9851 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009852LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9855$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009856if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009858
Martin v. Löwis130fb172001-07-19 11:00:41 +00009859 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009860 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009861 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009862fi
9863
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009864
Neal Norwitza978ab02002-11-02 16:58:05 +00009865 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9867$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009868if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009870else
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009872LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876/* Override any GCC internal prototype to avoid an error.
9877 Use char because int might match the return type of a GCC
9878 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009879#ifdef __cplusplus
9880extern "C"
9881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009882char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009883int
9884main ()
9885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 ;
9888 return 0;
9889}
9890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009893else
Matthias Kloseb9621712010-04-24 17:59:49 +00009894 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009896rm -f core conftest.err conftest.$ac_objext \
9897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009898LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9901$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009902if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009904
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009905 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009906 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009907 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009908fi
9909
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009910 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009911fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009912
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009913if test "$posix_threads" = "yes"; then
9914 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009915
Matthias Kloseb9621712010-04-24 17:59:49 +00009916$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009917
9918 fi
9919
9920 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9921 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009922 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009923$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009924
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009925 ;;
9926 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009927$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009928
9929 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009930 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009931$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009932
9933 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009934 esac
9935
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9937$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009938 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009940else
Matthias Kloseb9621712010-04-24 17:59:49 +00009941 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009942 ac_cv_pthread_system_supported=no
9943else
Matthias Kloseb9621712010-04-24 17:59:49 +00009944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009945/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009946
9947 #include <stdio.h>
9948 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009949 void *foo(void *parm) {
9950 return NULL;
9951 }
9952 main() {
9953 pthread_attr_t attr;
9954 pthread_t id;
9955 if (pthread_attr_init(&attr)) exit(-1);
9956 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9957 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9958 exit(0);
9959 }
9960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009961if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009962 ac_cv_pthread_system_supported=yes
9963else
Matthias Kloseb9621712010-04-24 17:59:49 +00009964 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9967 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009968fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009970
Guido van Rossum627b2d71993-12-24 10:39:16 +00009971fi
9972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9974$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009975 if test "$ac_cv_pthread_system_supported" = "yes"; then
9976
Matthias Kloseb9621712010-04-24 17:59:49 +00009977$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009978
9979 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 for ac_func in pthread_sigmask
9981do :
9982 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009983if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009984 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009985#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009986_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009987 case $ac_sys_system in
9988 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009989
Matthias Kloseb9621712010-04-24 17:59:49 +00009990$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009991
9992 ;;
9993 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009994fi
9995done
9996
Christian Heimesf77b4b22013-08-21 13:26:05 +02009997 for ac_func in pthread_atfork
9998do :
9999 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10000if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10001 cat >>confdefs.h <<_ACEOF
10002#define HAVE_PTHREAD_ATFORK 1
10003_ACEOF
10004
10005fi
10006done
10007
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010008fi
10009
10010
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010011# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010012
Matthias Kloseb9621712010-04-24 17:59:49 +000010013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10014$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010016if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010018 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10020$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010021 ipv6=no
10022 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10024$as_echo "yes" >&6; }
10025 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010026
10027 ipv6=yes
10028 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010030else
Martin v. Löwis11437992002-04-12 09:54:03 +000010031
Matthias Kloseb9621712010-04-24 17:59:49 +000010032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010033/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010034 /* AF_INET6 available check */
10035#include <sys/types.h>
10036#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010037int
10038main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010039{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010040int domain = AF_INET6;
10041 ;
10042 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010043}
Martin v. Löwis11437992002-04-12 09:54:03 +000010044_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010045if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010046
Matthias Kloseb9621712010-04-24 17:59:49 +000010047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10048$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010049 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010050
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010051else
Matthias Kloseb159a552010-04-25 21:00:44 +000010052
Matthias Kloseb9621712010-04-24 17:59:49 +000010053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10054$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010055 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010056
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010057fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010059
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010060if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10062$as_echo_n "checking if RFC2553 API is available... " >&6; }
10063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010064/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010065
10066 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010067#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010068int
10069main ()
10070{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010071struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010072 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010073 ;
10074 return 0;
10075}
Matthias Kloseb159a552010-04-25 21:00:44 +000010076
Martin v. Löwis11437992002-04-12 09:54:03 +000010077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010078if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010079
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010081$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010082 ipv6=yes
10083
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010084else
Matthias Kloseb159a552010-04-25 21:00:44 +000010085
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010087$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010088 ipv6=no
10089
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010092fi
10093
10094if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010096
10097fi
10098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010099fi
10100
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010101
10102ipv6type=unknown
10103ipv6lib=none
10104ipv6trylibc=no
10105
10106if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10108$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010109 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10110 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010111 case $i in
10112 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010114/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010116#include <netinet/in.h>
10117#ifdef IPV6_INRIA_VERSION
10118yes
10119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010120_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010122 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010123 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010124fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010125rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010126
10127 ;;
10128 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010130/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010131
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010132#include <netinet/in.h>
10133#ifdef __KAME__
10134yes
10135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010136_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010138 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010139 ipv6type=$i;
10140 ipv6lib=inet6
10141 ipv6libdir=/usr/local/v6/lib
10142 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010143fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010144rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010145
10146 ;;
10147 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010149/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010150
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010151#include <features.h>
10152#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10153yes
10154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010155_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010157 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010158 ipv6type=$i;
10159 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010160fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010161rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010162
10163 ;;
10164 linux-inet6)
10165 if test -d /usr/inet6; then
10166 ipv6type=$i
10167 ipv6lib=inet6
10168 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010169 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010170 fi
10171 ;;
10172 solaris)
10173 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010174 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010175 ipv6type=$i
10176 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010177 fi
10178 fi
10179 ;;
10180 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010182/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010183
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010184#include <sys/param.h>
10185#ifdef _TOSHIBA_INET6
10186yes
10187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010188_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010191 ipv6type=$i;
10192 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010193 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010194fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010195rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010196
10197 ;;
10198 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010200/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010201
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010202#include </usr/local/v6/include/sys/v6config.h>
10203#ifdef __V6D__
10204yes
10205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010206_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010209 ipv6type=$i;
10210 ipv6lib=v6;
10211 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010212 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010213fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010214rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010215
10216 ;;
10217 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010219/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010220
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010221#include <sys/param.h>
10222#ifdef _ZETA_MINAMI_INET6
10223yes
10224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010225_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010227 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010228 ipv6type=$i;
10229 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010230 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010231fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010232rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010233
10234 ;;
10235 esac
10236 if test "$ipv6type" != "unknown"; then
10237 break
10238 fi
10239 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10241$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010242fi
10243
10244if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10245 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10246 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10247 echo "using lib$ipv6lib"
10248 else
10249 if test $ipv6trylibc = "yes"; then
10250 echo "using libc"
10251 else
10252 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10253 echo "You need to fetch lib$ipv6lib.a from appropriate"
10254 echo 'ipv6 kit and compile beforehand.'
10255 exit 1
10256 fi
10257 fi
10258fi
10259
Matthias Kloseb9621712010-04-24 17:59:49 +000010260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10261$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010263/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010264
10265 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010266int
10267main ()
10268{
10269FSIORefNum fRef = 0
10270 ;
10271 return 0;
10272}
Matthias Kloseb159a552010-04-25 21:00:44 +000010273
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010275if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010276
Matthias Kloseb159a552010-04-25 21:00:44 +000010277
Matthias Kloseb9621712010-04-24 17:59:49 +000010278$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010279
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10281$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010282
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010283else
Matthias Kloseb159a552010-04-25 21:00:44 +000010284
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10286$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010287
10288fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10290
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010291# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10293$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010296if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297 withval=$with_doc_strings;
10298fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010299
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010300
10301if test -z "$with_doc_strings"
10302then with_doc_strings="yes"
10303fi
10304if test "$with_doc_strings" != "no"
10305then
10306
Matthias Kloseb9621712010-04-24 17:59:49 +000010307$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010308
10309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10311$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010312
Antoine Pitrou042b1282010-08-13 21:15:58 +000010313# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10315$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010317# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010318if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010320if test "$withval" != no
10321then
10322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010324
Matthias Kloseb9621712010-04-24 17:59:49 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10326$as_echo "yes" >&6; }
10327else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010329fi
10330else
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10332$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333fi
10334
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010335
10336# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10338$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010341if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010342 withval=$with_pymalloc;
10343fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010344
Neil Schemenauera35c6882001-02-27 04:45:05 +000010345
Neil Schemenauer16c22972002-03-22 15:34:49 +000010346if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010347then
10348 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010349fi
10350if test "$with_pymalloc" != "no"
10351then
Martin v. Löwis11437992002-04-12 09:54:03 +000010352
Matthias Kloseb9621712010-04-24 17:59:49 +000010353$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010354
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010355 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10358$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010359
Benjamin Peterson05159c42009-12-03 03:01:27 +000010360# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10362$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010363
10364# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010365if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010366 withval=$with_valgrind;
10367else
10368 with_valgrind=no
10369fi
10370
Matthias Kloseb9621712010-04-24 17:59:49 +000010371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10372$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010373if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 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 +020010375if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010376
Matthias Kloseb9621712010-04-24 17:59:49 +000010377$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010378
10379else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010380 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010381
10382fi
10383
10384
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010385 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010386fi
10387
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010388# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010389
Guido van Rossum98935bf2001-09-05 19:13:16 +000010390DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010391
Guido van Rossume97ee181999-12-20 21:27:22 +000010392# the dlopen() function means we might want to use dynload_shlib.o. some
10393# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010394for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010395do :
10396 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010397if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010399#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010400_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010401
Guido van Rossume97ee181999-12-20 21:27:22 +000010402fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010403done
Guido van Rossume97ee181999-12-20 21:27:22 +000010404
Michael W. Hudson54241132001-12-07 15:38:26 +000010405
Guido van Rossume97ee181999-12-20 21:27:22 +000010406# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10407# loading of modules.
10408
Matthias Kloseb9621712010-04-24 17:59:49 +000010409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10410$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010411if test -z "$DYNLOADFILE"
10412then
10413 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010414 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10415 if test "$ac_cv_func_dlopen" = yes
10416 then DYNLOADFILE="dynload_shlib.o"
10417 else DYNLOADFILE="dynload_aix.o"
10418 fi
10419 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010420 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010421 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10422 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010423 *)
10424 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10425 # out any dynamic loading
10426 if test "$ac_cv_func_dlopen" = yes
10427 then DYNLOADFILE="dynload_shlib.o"
10428 else DYNLOADFILE="dynload_stub.o"
10429 fi
10430 ;;
10431 esac
10432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10434$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010435if test "$DYNLOADFILE" != "dynload_stub.o"
10436then
Martin v. Löwis11437992002-04-12 09:54:03 +000010437
Matthias Kloseb9621712010-04-24 17:59:49 +000010438$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010439
10440fi
10441
Neil Schemenauer4e425612001-06-19 15:44:15 +000010442# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10443
Michael W. Hudson54241132001-12-07 15:38:26 +000010444
Matthias Kloseb9621712010-04-24 17:59:49 +000010445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10446$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010447if test -z "$MACHDEP_OBJS"
10448then
Jack Jansene578a632001-08-15 01:27:14 +000010449 MACHDEP_OBJS=$extra_machdep_objs
10450else
10451 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010452fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010453if test -z "$MACHDEP_OBJS"; then
10454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10455$as_echo "none" >&6; }
10456else
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10458$as_echo "$MACHDEP_OBJS" >&6; }
10459fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010460
Guido van Rossum627b2d71993-12-24 10:39:16 +000010461# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010462for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010463 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010464 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010465 futimens futimes gai_strerror \
10466 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010467 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010468 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010469 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10470 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010471 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010472 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010473 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010474 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010475 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010476 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010477 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10478 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010479 sigaction sigaltstack siginterrupt sigpending sigrelse \
10480 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010481 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010482 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010483 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010484do :
10485 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10486ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010487if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010490_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010491
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010492fi
10493done
10494
Michael W. Hudson54241132001-12-07 15:38:26 +000010495
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010496ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10497 #include <dirent.h>
10498"
10499if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10500
10501$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10502
10503fi
10504
10505
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010506# For some functions, having a definition is not sufficient, since
10507# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10509$as_echo_n "checking for chroot... " >&6; }
10510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010511/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010512#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010513int
10514main ()
10515{
10516void *x=chroot
10517 ;
10518 return 0;
10519}
10520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010521if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010522
Matthias Kloseb9621712010-04-24 17:59:49 +000010523$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010524
Matthias Kloseb159a552010-04-25 21:00:44 +000010525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010526$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010527else
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10529$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010530
10531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10534$as_echo_n "checking for link... " >&6; }
10535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010536/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010537#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010538int
10539main ()
10540{
10541void *x=link
10542 ;
10543 return 0;
10544}
10545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010546if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010547
Matthias Kloseb9621712010-04-24 17:59:49 +000010548$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010549
Matthias Kloseb159a552010-04-25 21:00:44 +000010550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010551$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010552else
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10554$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010555
10556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10559$as_echo_n "checking for symlink... " >&6; }
10560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010561/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010562#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010563int
10564main ()
10565{
10566void *x=symlink
10567 ;
10568 return 0;
10569}
10570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010571if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010572
Matthias Kloseb9621712010-04-24 17:59:49 +000010573$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010574
Matthias Kloseb159a552010-04-25 21:00:44 +000010575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010576$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010577else
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010580
10581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10584$as_echo_n "checking for fchdir... " >&6; }
10585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010586/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010587#include <unistd.h>
10588int
10589main ()
10590{
10591void *x=fchdir
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öwisa64988c2003-09-20 15:30:20 +000010597
Matthias Kloseb9621712010-04-24 17:59:49 +000010598$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 fsync" >&5
10609$as_echo_n "checking for fsync... " >&6; }
10610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010611/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010612#include <unistd.h>
10613int
10614main ()
10615{
10616void *x=fsync
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öwisa64988c2003-09-20 15:30:20 +000010622
Matthias Kloseb9621712010-04-24 17:59:49 +000010623$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 fdatasync" >&5
10634$as_echo_n "checking for fdatasync... " >&6; }
10635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010636/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010637#include <unistd.h>
10638int
10639main ()
10640{
10641void *x=fdatasync
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öwisa64988c2003-09-20 15:30:20 +000010647
Matthias Kloseb9621712010-04-24 17:59:49 +000010648$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 epoll" >&5
10659$as_echo_n "checking for epoll... " >&6; }
10660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010661/* end confdefs.h. */
10662#include <sys/epoll.h>
10663int
10664main ()
10665{
10666void *x=epoll_create
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öwisc8ad7cc2002-11-11 13:23:45 +000010672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +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; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010677else
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10679$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010680
10681fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10684$as_echo_n "checking for epoll_create1... " >&6; }
10685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10686/* end confdefs.h. */
10687#include <sys/epoll.h>
10688int
10689main ()
10690{
10691void *x=epoll_create1
10692 ;
10693 return 0;
10694}
10695_ACEOF
10696if ac_fn_c_try_compile "$LINENO"; then :
10697
10698$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10699
10700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10701$as_echo "yes" >&6; }
10702else
10703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10704$as_echo "no" >&6; }
10705
10706fi
10707rm -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 kqueue" >&5
10709$as_echo_n "checking for kqueue... " >&6; }
10710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010711/* end confdefs.h. */
10712
10713#include <sys/types.h>
10714#include <sys/event.h>
10715
10716int
10717main ()
10718{
10719int x=kqueue()
10720 ;
10721 return 0;
10722}
10723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010724if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010725
Matthias Kloseb9621712010-04-24 17:59:49 +000010726$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010727
Matthias Kloseb159a552010-04-25 21:00:44 +000010728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010729$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010730else
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10732$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010733
10734fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10737$as_echo_n "checking for prlimit... " >&6; }
10738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10739/* end confdefs.h. */
10740
10741#include <sys/time.h>
10742#include <sys/resource.h>
10743
10744int
10745main ()
10746{
10747void *x=prlimit
10748 ;
10749 return 0;
10750}
10751_ACEOF
10752if ac_fn_c_try_compile "$LINENO"; then :
10753
10754$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10755
10756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10757$as_echo "yes" >&6; }
10758else
10759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10760$as_echo "no" >&6; }
10761
10762fi
10763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10764
Martin v. Löwisd5843682002-11-21 20:41:28 +000010765# On some systems (eg. FreeBSD 5), we would find a definition of the
10766# functions ctermid_r, setgroups in the library, but no prototype
10767# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10768# address to avoid compiler warnings and potential miscompilations
10769# because of the missing prototypes.
10770
Matthias Kloseb9621712010-04-24 17:59:49 +000010771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10772$as_echo_n "checking for ctermid_r... " >&6; }
10773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010774/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010775
Martin v. Löwisd5843682002-11-21 20:41:28 +000010776#include <stdio.h>
10777
Martin v. Löwisd5843682002-11-21 20:41:28 +000010778int
10779main ()
10780{
10781void* p = ctermid_r
10782 ;
10783 return 0;
10784}
10785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010786if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010787
Matthias Kloseb9621712010-04-24 17:59:49 +000010788$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010789
Matthias Kloseb159a552010-04-25 21:00:44 +000010790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010791$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010792else
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10794$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010795
10796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10798
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10800$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010801if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010802 $as_echo_n "(cached) " >&6
10803else
10804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010805/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010806#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010807int
10808main ()
10809{
10810void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010811
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010812 ;
10813 return 0;
10814}
10815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010816if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010817 ac_cv_flock_decl=yes
10818else
10819 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010820
10821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010823
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010824fi
10825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10826$as_echo "$ac_cv_flock_decl" >&6; }
10827if test "x${ac_cv_flock_decl}" = xyes; then
10828 for ac_func in flock
10829do :
10830 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010831if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010832 cat >>confdefs.h <<_ACEOF
10833#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010834_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010835
Antoine Pitroua3000072010-09-07 14:52:42 +000010836else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010838$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010839if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010840 $as_echo_n "(cached) " >&6
10841else
10842 ac_check_lib_save_LIBS=$LIBS
10843LIBS="-lbsd $LIBS"
10844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10845/* end confdefs.h. */
10846
10847/* Override any GCC internal prototype to avoid an error.
10848 Use char because int might match the return type of a GCC
10849 builtin and then its argument prototype would still apply. */
10850#ifdef __cplusplus
10851extern "C"
10852#endif
10853char flock ();
10854int
10855main ()
10856{
10857return flock ();
10858 ;
10859 return 0;
10860}
10861_ACEOF
10862if ac_fn_c_try_link "$LINENO"; then :
10863 ac_cv_lib_bsd_flock=yes
10864else
10865 ac_cv_lib_bsd_flock=no
10866fi
10867rm -f core conftest.err conftest.$ac_objext \
10868 conftest$ac_exeext conftest.$ac_ext
10869LIBS=$ac_check_lib_save_LIBS
10870fi
10871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10872$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010873if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010874 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010875
10876
10877$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10878
10879
10880fi
10881
10882
10883fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010884done
10885
Antoine Pitroua3000072010-09-07 14:52:42 +000010886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010887
Matthias Kloseb9621712010-04-24 17:59:49 +000010888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10889$as_echo_n "checking for getpagesize... " >&6; }
10890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010891/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010892
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010893#include <unistd.h>
10894
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010895int
10896main ()
10897{
10898void* p = getpagesize
10899 ;
10900 return 0;
10901}
10902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010903if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010904
Matthias Kloseb9621712010-04-24 17:59:49 +000010905$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010906
Matthias Kloseb159a552010-04-25 21:00:44 +000010907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010908$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010909else
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010912
10913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010915
Victor Stinner984890f2011-11-24 13:53:38 +010010916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10917$as_echo_n "checking for broken unsetenv... " >&6; }
10918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10919/* end confdefs.h. */
10920
10921#include <stdlib.h>
10922
10923int
10924main ()
10925{
10926int res = unsetenv("DUMMY")
10927 ;
10928 return 0;
10929}
10930_ACEOF
10931if ac_fn_c_try_compile "$LINENO"; then :
10932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10933$as_echo "no" >&6; }
10934else
10935
10936$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10937
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10939$as_echo "yes" >&6; }
10940
10941fi
10942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10943
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010944for ac_prog in true
10945do
10946 # Extract the first word of "$ac_prog", so it can be a program name with args.
10947set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10949$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010950if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010952else
10953 if test -n "$TRUE"; then
10954 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10955else
10956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10957for as_dir in $PATH
10958do
10959 IFS=$as_save_IFS
10960 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010961 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010963 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 $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 +000010965 break 2
10966 fi
10967done
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010970
10971fi
10972fi
10973TRUE=$ac_cv_prog_TRUE
10974if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10976$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010977else
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10979$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010980fi
10981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010983 test -n "$TRUE" && break
10984done
10985test -n "$TRUE" || TRUE="/bin/true"
10986
10987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10989$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010990if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010992else
10993 ac_check_lib_save_LIBS=$LIBS
10994LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010996/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998/* Override any GCC internal prototype to avoid an error.
10999 Use char because int might match the return type of a GCC
11000 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011001#ifdef __cplusplus
11002extern "C"
11003#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011004char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011005int
11006main ()
11007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011009 ;
11010 return 0;
11011}
11012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011013if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011014 ac_cv_lib_c_inet_aton=yes
11015else
Matthias Kloseb9621712010-04-24 17:59:49 +000011016 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011018rm -f core conftest.err conftest.$ac_objext \
11019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011020LIBS=$ac_check_lib_save_LIBS
11021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11023$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011024if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011025 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011026else
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11028$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011029if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011031else
11032 ac_check_lib_save_LIBS=$LIBS
11033LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011035/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037/* Override any GCC internal prototype to avoid an error.
11038 Use char because int might match the return type of a GCC
11039 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011040#ifdef __cplusplus
11041extern "C"
11042#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011043char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011044int
11045main ()
11046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011047return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011048 ;
11049 return 0;
11050}
11051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011053 ac_cv_lib_resolv_inet_aton=yes
11054else
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011057rm -f core conftest.err conftest.$ac_objext \
11058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011059LIBS=$ac_check_lib_save_LIBS
11060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11062$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011063if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011064 cat >>confdefs.h <<_ACEOF
11065#define HAVE_LIBRESOLV 1
11066_ACEOF
11067
11068 LIBS="-lresolv $LIBS"
11069
11070fi
11071
11072
11073fi
11074
11075
Christian Heimesd0764e22007-12-04 15:00:33 +000011076# On Tru64, chflags seems to be present, but calling it will
11077# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11079$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011080if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011082else
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011084 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011085else
Matthias Kloseb9621712010-04-24 17:59:49 +000011086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011087/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011088
Christian Heimesd0764e22007-12-04 15:00:33 +000011089#include <sys/stat.h>
11090#include <unistd.h>
11091int main(int argc, char*argv[])
11092{
11093 if(chflags(argv[0], 0) != 0)
11094 return 1;
11095 return 0;
11096}
Ned Deily3eb67d52011-06-28 00:00:28 -070011097
Christian Heimesd0764e22007-12-04 15:00:33 +000011098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011099if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011100 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011101else
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11105 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011106fi
11107
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011108
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11111$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011112if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011114if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011115 ac_cv_have_chflags="yes"
11116else
11117 ac_cv_have_chflags="no"
11118fi
11119
11120fi
11121if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011122
Matthias Kloseb9621712010-04-24 17:59:49 +000011123$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011124
11125fi
11126
Matthias Kloseb9621712010-04-24 17:59:49 +000011127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11128$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011129if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011130 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011131else
Matthias Kloseb9621712010-04-24 17:59:49 +000011132 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011133 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011134else
Matthias Kloseb9621712010-04-24 17:59:49 +000011135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011136/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011137
Christian Heimesd0764e22007-12-04 15:00:33 +000011138#include <sys/stat.h>
11139#include <unistd.h>
11140int main(int argc, char*argv[])
11141{
11142 if(lchflags(argv[0], 0) != 0)
11143 return 1;
11144 return 0;
11145}
Ned Deily3eb67d52011-06-28 00:00:28 -070011146
Christian Heimesd0764e22007-12-04 15:00:33 +000011147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011148if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011149 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011150else
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11154 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011155fi
11156
11157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11160$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011161if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011162 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011163if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011164 ac_cv_have_lchflags="yes"
11165else
11166 ac_cv_have_lchflags="no"
11167fi
11168
11169fi
11170if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011171
Matthias Kloseb9621712010-04-24 17:59:49 +000011172$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011173
11174fi
11175
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011176case $ac_sys_system/$ac_sys_release in
11177Darwin/*)
11178 _CUR_CFLAGS="${CFLAGS}"
11179 _CUR_LDFLAGS="${LDFLAGS}"
11180 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11181 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11182 ;;
11183esac
11184
Matthias Kloseb9621712010-04-24 17:59:49 +000011185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11186$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011187if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011188 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011189else
11190 ac_check_lib_save_LIBS=$LIBS
11191LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011193/* end confdefs.h. */
11194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011195/* Override any GCC internal prototype to avoid an error.
11196 Use char because int might match the return type of a GCC
11197 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011198#ifdef __cplusplus
11199extern "C"
11200#endif
11201char inflateCopy ();
11202int
11203main ()
11204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011205return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011206 ;
11207 return 0;
11208}
11209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011210if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011211 ac_cv_lib_z_inflateCopy=yes
11212else
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011215rm -f core conftest.err conftest.$ac_objext \
11216 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011217LIBS=$ac_check_lib_save_LIBS
11218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11220$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011221if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011222
Matthias Kloseb9621712010-04-24 17:59:49 +000011223$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011224
11225fi
11226
11227
11228case $ac_sys_system/$ac_sys_release in
11229Darwin/*)
11230 CFLAGS="${_CUR_CFLAGS}"
11231 LDFLAGS="${_CUR_LDFLAGS}"
11232 ;;
11233esac
11234
Matthias Kloseb9621712010-04-24 17:59:49 +000011235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11236$as_echo_n "checking for hstrerror... " >&6; }
11237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011238/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011239
Martin v. Löwise9416172003-05-03 10:12:45 +000011240#include <netdb.h>
11241
Martin v. Löwise9416172003-05-03 10:12:45 +000011242int
11243main ()
11244{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011245void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011246 ;
11247 return 0;
11248}
11249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011250if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011253
Matthias Kloseb159a552010-04-25 21:00:44 +000011254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011255$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011256else
Matthias Kloseb9621712010-04-24 17:59:49 +000011257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11258$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011259
11260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011261rm -f core conftest.err conftest.$ac_objext \
11262 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11265$as_echo_n "checking for inet_aton... " >&6; }
11266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011267/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011268
Martin v. Löwis86d66262006-02-17 08:40:11 +000011269#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011270#include <sys/socket.h>
11271#include <netinet/in.h>
11272#include <arpa/inet.h>
11273
Martin v. Löwise9416172003-05-03 10:12:45 +000011274int
11275main ()
11276{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011277void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011278 ;
11279 return 0;
11280}
11281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011282if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011283
Matthias Kloseb9621712010-04-24 17:59:49 +000011284$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011285
Matthias Kloseb159a552010-04-25 21:00:44 +000011286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011287$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011288else
Matthias Kloseb9621712010-04-24 17:59:49 +000011289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11290$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011291
11292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011293rm -f core conftest.err conftest.$ac_objext \
11294 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295
Matthias Kloseb9621712010-04-24 17:59:49 +000011296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11297$as_echo_n "checking for inet_pton... " >&6; }
11298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011300
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011301#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011302#include <sys/socket.h>
11303#include <netinet/in.h>
11304#include <arpa/inet.h>
11305
Martin v. Löwise9416172003-05-03 10:12:45 +000011306int
11307main ()
11308{
11309void* p = inet_pton
11310 ;
11311 return 0;
11312}
11313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011315
Matthias Kloseb9621712010-04-24 17:59:49 +000011316$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011317
Matthias Kloseb159a552010-04-25 21:00:44 +000011318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011319$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011320else
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11322$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011323
11324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011326
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011327# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11329$as_echo_n "checking for setgroups... " >&6; }
11330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011331/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011332
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011333#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011334#ifdef HAVE_GRP_H
11335#include <grp.h>
11336#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011337
Martin v. Löwisd5843682002-11-21 20:41:28 +000011338int
11339main ()
11340{
11341void* p = setgroups
11342 ;
11343 return 0;
11344}
11345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011347
Matthias Kloseb9621712010-04-24 17:59:49 +000011348$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011349
Matthias Kloseb159a552010-04-25 21:00:44 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011352else
Matthias Kloseb9621712010-04-24 17:59:49 +000011353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11354$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011355
11356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011358
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011359# check for openpty and forkpty
11360
11361for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011362do :
11363 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011364if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011366#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011367_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011368
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011369else
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11371$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011372if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011373 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011374else
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011376LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011380/* Override any GCC internal prototype to avoid an error.
11381 Use char because int might match the return type of a GCC
11382 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011383#ifdef __cplusplus
11384extern "C"
11385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011386char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011387int
11388main ()
11389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011390return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 ;
11392 return 0;
11393}
11394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011395if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011397else
Matthias Kloseb9621712010-04-24 17:59:49 +000011398 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011400rm -f core conftest.err conftest.$ac_objext \
11401 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011402LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11405$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011406if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011407 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011408 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011409else
Matthias Kloseb9621712010-04-24 17:59:49 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11411$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011412if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011414else
11415 ac_check_lib_save_LIBS=$LIBS
11416LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011418/* end confdefs.h. */
11419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420/* Override any GCC internal prototype to avoid an error.
11421 Use char because int might match the return type of a GCC
11422 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011423#ifdef __cplusplus
11424extern "C"
11425#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011426char openpty ();
11427int
11428main ()
11429{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011430return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011431 ;
11432 return 0;
11433}
11434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011435if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011436 ac_cv_lib_bsd_openpty=yes
11437else
Matthias Kloseb9621712010-04-24 17:59:49 +000011438 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011440rm -f core conftest.err conftest.$ac_objext \
11441 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011442LIBS=$ac_check_lib_save_LIBS
11443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11445$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011446if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011447 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011448 LIBS="$LIBS -lbsd"
11449fi
11450
11451
11452fi
11453
Fred Drake8cef4cf2000-06-28 16:40:38 +000011454
11455fi
11456done
11457
11458for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011459do :
11460 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011461if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011463#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011464_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011465
Fred Drake8cef4cf2000-06-28 16:40:38 +000011466else
Matthias Kloseb9621712010-04-24 17:59:49 +000011467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11468$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011469if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011470 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011471else
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011473LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011477/* Override any GCC internal prototype to avoid an error.
11478 Use char because int might match the return type of a GCC
11479 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011480#ifdef __cplusplus
11481extern "C"
11482#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011483char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011484int
11485main ()
11486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 ;
11489 return 0;
11490}
11491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011492if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011494else
Matthias Kloseb9621712010-04-24 17:59:49 +000011495 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011497rm -f core conftest.err conftest.$ac_objext \
11498 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011499LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11502$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011503if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011505 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011506else
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11508$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011509if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011510 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011511else
11512 ac_check_lib_save_LIBS=$LIBS
11513LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011515/* end confdefs.h. */
11516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517/* Override any GCC internal prototype to avoid an error.
11518 Use char because int might match the return type of a GCC
11519 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011520#ifdef __cplusplus
11521extern "C"
11522#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011523char forkpty ();
11524int
11525main ()
11526{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011527return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011528 ;
11529 return 0;
11530}
11531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011532if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011533 ac_cv_lib_bsd_forkpty=yes
11534else
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011537rm -f core conftest.err conftest.$ac_objext \
11538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011539LIBS=$ac_check_lib_save_LIBS
11540fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11542$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011543if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011545 LIBS="$LIBS -lbsd"
11546fi
11547
11548
11549fi
11550
Fred Drake8cef4cf2000-06-28 16:40:38 +000011551
11552fi
11553done
11554
Jack Jansendd19cf82001-12-06 22:36:17 +000011555
Christian Heimesb186d002008-03-18 15:15:01 +000011556# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011557for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011558do :
11559 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011560if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011561 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011562#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011563_ACEOF
11564
11565fi
11566done
11567
11568
Michael W. Hudson54241132001-12-07 15:38:26 +000011569# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011570for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011571do :
11572 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11573ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011574if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011576#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011577_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011578
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011579fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011580done
11581
Michael W. Hudson54241132001-12-07 15:38:26 +000011582
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011583ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011584if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011585 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011586
Martin v. Löwis1142de32002-03-29 16:28:31 +000011587else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011589 *" dup2.$ac_objext "* ) ;;
11590 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011591 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011592esac
11593
Martin v. Löwis1142de32002-03-29 16:28:31 +000011594fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011595
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011596ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011597if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011598 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11599
11600else
11601 case " $LIBOBJS " in
11602 *" strdup.$ac_objext "* ) ;;
11603 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11604 ;;
11605esac
11606
11607fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011608
11609
11610for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011611do :
11612 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011613if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011614 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011615#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011618/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011619#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011620int
11621main ()
11622{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011623getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011624 ;
11625 return 0;
11626}
11627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011629
Matthias Kloseb9621712010-04-24 17:59:49 +000011630$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011631
Guido van Rossum627b2d71993-12-24 10:39:16 +000011632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011634
Guido van Rossum627b2d71993-12-24 10:39:16 +000011635fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011636done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011637
Jack Jansen150753c2003-03-29 22:07:47 +000011638for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011639do :
11640 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011641if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011642 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011643#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011646/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011647#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011648int
11649main ()
11650{
11651setpgrp(0,0);
11652 ;
11653 return 0;
11654}
11655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011656if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011657
Matthias Kloseb9621712010-04-24 17:59:49 +000011658$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011659
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011662
11663fi
11664done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011665
Thomas Wouters3a584202000-08-05 23:28:51 +000011666for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011667do :
11668 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011669if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011670 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011671#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011674/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011675#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011676int
11677main ()
11678{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011679gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011680 ;
11681 return 0;
11682}
11683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011684if ac_fn_c_try_compile "$LINENO"; then :
11685
Guido van Rossum627b2d71993-12-24 10:39:16 +000011686else
Skip Montanaro6dead952003-09-25 14:50:04 +000011687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011689
Martin v. Löwis11437992002-04-12 09:54:03 +000011690
Guido van Rossum627b2d71993-12-24 10:39:16 +000011691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011693
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011694fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011695done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011696
Michael W. Hudson54241132001-12-07 15:38:26 +000011697
Victor Stinnere0be4232011-10-25 13:06:09 +020011698for ac_func in clock_gettime
11699do :
11700 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11701if test "x$ac_cv_func_clock_gettime" = xyes; then :
11702 cat >>confdefs.h <<_ACEOF
11703#define HAVE_CLOCK_GETTIME 1
11704_ACEOF
11705
11706else
11707
11708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11709$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11710if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11711 $as_echo_n "(cached) " >&6
11712else
11713 ac_check_lib_save_LIBS=$LIBS
11714LIBS="-lrt $LIBS"
11715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11716/* end confdefs.h. */
11717
11718/* Override any GCC internal prototype to avoid an error.
11719 Use char because int might match the return type of a GCC
11720 builtin and then its argument prototype would still apply. */
11721#ifdef __cplusplus
11722extern "C"
11723#endif
11724char clock_gettime ();
11725int
11726main ()
11727{
11728return clock_gettime ();
11729 ;
11730 return 0;
11731}
11732_ACEOF
11733if ac_fn_c_try_link "$LINENO"; then :
11734 ac_cv_lib_rt_clock_gettime=yes
11735else
11736 ac_cv_lib_rt_clock_gettime=no
11737fi
11738rm -f core conftest.err conftest.$ac_objext \
11739 conftest$ac_exeext conftest.$ac_ext
11740LIBS=$ac_check_lib_save_LIBS
11741fi
11742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11743$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11744if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11745
11746 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11747
11748
11749$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11750
11751
11752fi
11753
11754
11755fi
11756done
11757
11758
11759for ac_func in clock_getres
11760do :
11761 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11762if test "x$ac_cv_func_clock_getres" = xyes; then :
11763 cat >>confdefs.h <<_ACEOF
11764#define HAVE_CLOCK_GETRES 1
11765_ACEOF
11766
11767else
11768
11769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11770$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11771if ${ac_cv_lib_rt_clock_getres+:} false; then :
11772 $as_echo_n "(cached) " >&6
11773else
11774 ac_check_lib_save_LIBS=$LIBS
11775LIBS="-lrt $LIBS"
11776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11777/* end confdefs.h. */
11778
11779/* Override any GCC internal prototype to avoid an error.
11780 Use char because int might match the return type of a GCC
11781 builtin and then its argument prototype would still apply. */
11782#ifdef __cplusplus
11783extern "C"
11784#endif
11785char clock_getres ();
11786int
11787main ()
11788{
11789return clock_getres ();
11790 ;
11791 return 0;
11792}
11793_ACEOF
11794if ac_fn_c_try_link "$LINENO"; then :
11795 ac_cv_lib_rt_clock_getres=yes
11796else
11797 ac_cv_lib_rt_clock_getres=no
11798fi
11799rm -f core conftest.err conftest.$ac_objext \
11800 conftest$ac_exeext conftest.$ac_ext
11801LIBS=$ac_check_lib_save_LIBS
11802fi
11803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11804$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11805if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11806
11807 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11808
11809
11810fi
11811
11812
11813fi
11814done
11815
11816
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11818$as_echo_n "checking for major... " >&6; }
11819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011820/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011821
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011822#if defined(MAJOR_IN_MKDEV)
11823#include <sys/mkdev.h>
11824#elif defined(MAJOR_IN_SYSMACROS)
11825#include <sys/sysmacros.h>
11826#else
11827#include <sys/types.h>
11828#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011829
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011830int
11831main ()
11832{
11833
11834 makedev(major(0),minor(0));
11835
11836 ;
11837 return 0;
11838}
11839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011841
11842
Matthias Kloseb9621712010-04-24 17:59:49 +000011843$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011844
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11846$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011847
11848else
Skip Montanaro6dead952003-09-25 14:50:04 +000011849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11851$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011852
11853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011854rm -f core conftest.err conftest.$ac_objext \
11855 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011856
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011857# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011858# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11860$as_echo_n "checking for getaddrinfo... " >&6; }
11861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011862/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011863
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011864#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011865#include <sys/socket.h>
11866#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011867#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011868
Martin v. Löwis11437992002-04-12 09:54:03 +000011869int
11870main ()
11871{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011872getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011873 ;
11874 return 0;
11875}
11876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011877if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011878 have_getaddrinfo=yes
11879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011882rm -f core conftest.err conftest.$ac_objext \
11883 conftest$ac_exeext conftest.$ac_ext
11884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11885$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011886if test $have_getaddrinfo = yes
11887then
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11889$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011890 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011892else
Matthias Kloseb9621712010-04-24 17:59:49 +000011893 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011894
11895if test "${enable_ipv6+set}" = set; then
11896 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11897else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011898 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011899fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011900else
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011902/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011903
Stefan Krah19c21392012-11-22 23:47:32 +010011904#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011905#include <sys/types.h>
11906#include <netdb.h>
11907#include <string.h>
11908#include <sys/socket.h>
11909#include <netinet/in.h>
11910
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011911int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011912{
11913 int passive, gaierr, inet4 = 0, inet6 = 0;
11914 struct addrinfo hints, *ai, *aitop;
11915 char straddr[INET6_ADDRSTRLEN], strport[16];
11916
11917 for (passive = 0; passive <= 1; passive++) {
11918 memset(&hints, 0, sizeof(hints));
11919 hints.ai_family = AF_UNSPEC;
11920 hints.ai_flags = passive ? AI_PASSIVE : 0;
11921 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011922 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011923 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11924 (void)gai_strerror(gaierr);
11925 goto bad;
11926 }
11927 for (ai = aitop; ai; ai = ai->ai_next) {
11928 if (ai->ai_addr == NULL ||
11929 ai->ai_addrlen == 0 ||
11930 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11931 straddr, sizeof(straddr), strport, sizeof(strport),
11932 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11933 goto bad;
11934 }
11935 switch (ai->ai_family) {
11936 case AF_INET:
11937 if (strcmp(strport, "54321") != 0) {
11938 goto bad;
11939 }
11940 if (passive) {
11941 if (strcmp(straddr, "0.0.0.0") != 0) {
11942 goto bad;
11943 }
11944 } else {
11945 if (strcmp(straddr, "127.0.0.1") != 0) {
11946 goto bad;
11947 }
11948 }
11949 inet4++;
11950 break;
11951 case AF_INET6:
11952 if (strcmp(strport, "54321") != 0) {
11953 goto bad;
11954 }
11955 if (passive) {
11956 if (strcmp(straddr, "::") != 0) {
11957 goto bad;
11958 }
11959 } else {
11960 if (strcmp(straddr, "::1") != 0) {
11961 goto bad;
11962 }
11963 }
11964 inet6++;
11965 break;
11966 case AF_UNSPEC:
11967 goto bad;
11968 break;
11969 default:
11970 /* another family support? */
11971 break;
11972 }
11973 }
11974 }
11975
11976 if (!(inet4 == 0 || inet4 == 2))
11977 goto bad;
11978 if (!(inet6 == 0 || inet6 == 2))
11979 goto bad;
11980
11981 if (aitop)
11982 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011983 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011984
11985 bad:
11986 if (aitop)
11987 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011988 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011989}
11990
Martin v. Löwis11437992002-04-12 09:54:03 +000011991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011992if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011993 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011994else
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012000
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012001fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012002
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012004
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12006$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12007
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012008if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012009then
12010 if test $ipv6 = yes
12011 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012012 echo 'Fatal: You must get working getaddrinfo() function.'
12013 echo ' or you can specify "--disable-ipv6"'.
12014 exit 1
12015 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012016else
Martin v. Löwis11437992002-04-12 09:54:03 +000012017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012019
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012020fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012021
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012022for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012023do :
12024 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012025if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012026 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012027#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012028_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012029
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012030fi
12031done
12032
Michael W. Hudson54241132001-12-07 15:38:26 +000012033
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012034# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12036$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012037if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012038 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012041/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012042#include <sys/types.h>
12043#include <sys/time.h>
12044#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012045
Martin v. Löwis11437992002-04-12 09:54:03 +000012046int
12047main ()
12048{
12049if ((struct tm *) 0)
12050return 0;
12051 ;
12052 return 0;
12053}
12054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012055if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012056 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012057else
Matthias Kloseb9621712010-04-24 17:59:49 +000012058 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12063$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012064if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012065
Matthias Kloseb9621712010-04-24 17:59:49 +000012066$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012067
12068fi
12069
Matthias Kloseb9621712010-04-24 17:59:49 +000012070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12071$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012072if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012074else
Matthias Kloseb9621712010-04-24 17:59:49 +000012075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012076/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012077#include <sys/types.h>
12078#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012079
Martin v. Löwis11437992002-04-12 09:54:03 +000012080int
12081main ()
12082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083struct tm tm;
12084 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 ;
12087 return 0;
12088}
12089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012090if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012091 ac_cv_struct_tm=time.h
12092else
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12098$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012099if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012100
Matthias Kloseb9621712010-04-24 17:59:49 +000012101$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012102
12103fi
12104
Matthias Kloseb9621712010-04-24 17:59:49 +000012105ac_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 +000012106#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012107
Matthias Kloseb9621712010-04-24 17:59:49 +000012108"
Victor Stinnere0be4232011-10-25 13:06:09 +020012109if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012110
12111cat >>confdefs.h <<_ACEOF
12112#define HAVE_STRUCT_TM_TM_ZONE 1
12113_ACEOF
12114
12115
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012116fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012117
Martin v. Löwis11437992002-04-12 09:54:03 +000012118if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12119
Matthias Kloseb9621712010-04-24 17:59:49 +000012120$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012121
12122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12124"
Victor Stinnere0be4232011-10-25 13:06:09 +020012125if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129fi
12130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012131cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012132#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133_ACEOF
12134
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12136$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012137if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012139else
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012141/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012142#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012143#if !HAVE_DECL_TZNAME
12144extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012146
Martin v. Löwis11437992002-04-12 09:54:03 +000012147int
12148main ()
12149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012150return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 ;
12152 return 0;
12153}
12154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012155if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156 ac_cv_var_tzname=yes
12157else
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012160rm -f core conftest.err conftest.$ac_objext \
12161 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12164$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012165 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012168
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012169 fi
12170fi
12171
Matthias Kloseb9621712010-04-24 17:59:49 +000012172ac_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 +020012173if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012174
12175cat >>confdefs.h <<_ACEOF
12176#define HAVE_STRUCT_STAT_ST_RDEV 1
12177_ACEOF
12178
12179
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012180fi
12181
Matthias Kloseb9621712010-04-24 17:59:49 +000012182ac_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 +020012183if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012184
Martin v. Löwis11437992002-04-12 09:54:03 +000012185cat >>confdefs.h <<_ACEOF
12186#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12187_ACEOF
12188
12189
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012190fi
12191
Matthias Kloseb9621712010-04-24 17:59:49 +000012192ac_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 +020012193if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012194
12195cat >>confdefs.h <<_ACEOF
12196#define HAVE_STRUCT_STAT_ST_FLAGS 1
12197_ACEOF
12198
12199
12200fi
12201
Matthias Kloseb9621712010-04-24 17:59:49 +000012202ac_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 +020012203if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012204
12205cat >>confdefs.h <<_ACEOF
12206#define HAVE_STRUCT_STAT_ST_GEN 1
12207_ACEOF
12208
12209
12210fi
12211
Matthias Kloseb9621712010-04-24 17:59:49 +000012212ac_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 +020012213if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012214
12215cat >>confdefs.h <<_ACEOF
12216#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12217_ACEOF
12218
12219
12220fi
12221
Matthias Kloseb9621712010-04-24 17:59:49 +000012222ac_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 +020012223if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012224
Martin v. Löwis11437992002-04-12 09:54:03 +000012225cat >>confdefs.h <<_ACEOF
12226#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12227_ACEOF
12228
12229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012231
12232else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012233 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012234 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012235 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12236 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012237esac
12238
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012239fi
12240
Michael W. Hudson54241132001-12-07 15:38:26 +000012241
Martin v. Löwis11437992002-04-12 09:54:03 +000012242
Matthias Kloseb9621712010-04-24 17:59:49 +000012243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12244$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012245if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012247else
Matthias Kloseb159a552010-04-25 21:00:44 +000012248
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012250/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012251#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012252int
12253main ()
12254{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012255return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 ;
12257 return 0;
12258}
12259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012260if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012261 ac_cv_header_time_altzone=yes
12262else
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012267fi
12268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12270$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012271if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012272
Matthias Kloseb9621712010-04-24 17:59:49 +000012273$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012274
12275fi
12276
Guido van Rossumda88dad1995-01-26 00:46:29 +000012277was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12279$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012281/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012282
12283#include <sys/types.h>
12284#include <sys/select.h>
12285#include <sys/time.h>
12286
Martin v. Löwis11437992002-04-12 09:54:03 +000012287int
12288main ()
12289{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012290;
Martin v. Löwis11437992002-04-12 09:54:03 +000012291 ;
12292 return 0;
12293}
12294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012296
12297
Matthias Kloseb9621712010-04-24 17:59:49 +000012298$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012299
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012300 was_it_defined=yes
12301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12305$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012306
Matthias Kloseb9621712010-04-24 17:59:49 +000012307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12308$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012309if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012311else
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012313/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012314#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012315int
12316main ()
12317{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012318struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 ;
12320 return 0;
12321}
12322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012323if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012324 ac_cv_struct_addrinfo=yes
12325else
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12329fi
12330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12332$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012333if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012334
Matthias Kloseb9621712010-04-24 17:59:49 +000012335$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012336
12337fi
12338
Matthias Kloseb9621712010-04-24 17:59:49 +000012339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12340$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012341if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012345/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012346
12347# include <sys/types.h>
12348# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012349int
12350main ()
12351{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012352struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012353 ;
12354 return 0;
12355}
12356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012358 ac_cv_struct_sockaddr_storage=yes
12359else
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12363fi
12364
Matthias Kloseb9621712010-04-24 17:59:49 +000012365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12366$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012367if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012368
Matthias Kloseb9621712010-04-24 17:59:49 +000012369$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012370
12371fi
12372
Guido van Rossum627b2d71993-12-24 10:39:16 +000012373# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012374
Matthias Kloseb9621712010-04-24 17:59:49 +000012375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12376$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012377if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012382$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012383int
12384main ()
12385{
12386static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012387test_array [0] = 0;
12388return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012389
12390 ;
12391 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012392}
Martin v. Löwis11437992002-04-12 09:54:03 +000012393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012394if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012395 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012396else
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12402$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012403if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012404 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012405
12406fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12409$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012410if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012412else
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012414/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012415
Martin v. Löwis11437992002-04-12 09:54:03 +000012416int
12417main ()
12418{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012419
Martin v. Löwis11437992002-04-12 09:54:03 +000012420#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012421 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012423 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425 char const *const *pcpcc;
12426 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012427 /* NEC SVR4.0.2 mips cc rejects this. */
12428 struct point {int x, y;};
12429 static struct point const zero = {0,0};
12430 /* AIX XL C 1.02.0.0 rejects this.
12431 It does not let you subtract one const X* pointer from another in
12432 an arm of an if-expression whose if-part is not a constant
12433 expression */
12434 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437 ++pcpcc;
12438 ppc = (char**) pcpcc;
12439 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012440 { /* SCO 3.2v4 cc rejects this sort of thing. */
12441 char tx;
12442 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012444
Martin v. Löwis11437992002-04-12 09:54:03 +000012445 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012447 }
12448 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12449 int x[] = {25, 17};
12450 const int *foo = &x[0];
12451 ++foo;
12452 }
12453 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12454 typedef const int *iptr;
12455 iptr p = 0;
12456 ++p;
12457 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012458 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012459 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012460 struct s { int j; const int *ap[3]; } bx;
12461 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012462 }
12463 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12464 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012466 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012468#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012469
Martin v. Löwis11437992002-04-12 09:54:03 +000012470 ;
12471 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012472}
Martin v. Löwis11437992002-04-12 09:54:03 +000012473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012474if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475 ac_cv_c_const=yes
12476else
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12482$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012483if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012486
12487fi
12488
Michael W. Hudson54241132001-12-07 15:38:26 +000012489
Guido van Rossumda88dad1995-01-26 00:46:29 +000012490works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12492$as_echo_n "checking for working volatile... " >&6; }
12493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012494/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012495
Martin v. Löwis11437992002-04-12 09:54:03 +000012496int
12497main ()
12498{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012499volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012500 ;
12501 return 0;
12502}
12503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012504if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012505 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012506else
Skip Montanaro6dead952003-09-25 14:50:04 +000012507
Matthias Kloseb9621712010-04-24 17:59:49 +000012508$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012509
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012510
Guido van Rossum627b2d71993-12-24 10:39:16 +000012511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12514$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012515
Guido van Rossumda88dad1995-01-26 00:46:29 +000012516works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12518$as_echo_n "checking for working signed char... " >&6; }
12519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012520/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012521
Martin v. Löwis11437992002-04-12 09:54:03 +000012522int
12523main ()
12524{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012525signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 ;
12527 return 0;
12528}
12529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012530if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012531 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012532else
Skip Montanaro6dead952003-09-25 14:50:04 +000012533
Matthias Kloseb9621712010-04-24 17:59:49 +000012534$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012535
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012536
Guido van Rossum7f43da71994-08-01 12:15:30 +000012537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12540$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012541
Guido van Rossumda88dad1995-01-26 00:46:29 +000012542have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12544$as_echo_n "checking for prototypes... " >&6; }
12545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012546/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012547int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012548int
12549main ()
12550{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012551return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 ;
12553 return 0;
12554}
12555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012557
Matthias Kloseb9621712010-04-24 17:59:49 +000012558$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012559
Matthias Kloseb159a552010-04-25 21:00:44 +000012560 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12564$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012565
Guido van Rossumda88dad1995-01-26 00:46:29 +000012566works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12568$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012570/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012571
12572#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012573int foo(int x, ...) {
12574 va_list va;
12575 va_start(va, x);
12576 va_arg(va, int);
12577 va_arg(va, char *);
12578 va_arg(va, double);
12579 return 0;
12580}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012581
Martin v. Löwis11437992002-04-12 09:54:03 +000012582int
12583main ()
12584{
Guido van Rossum90eea071996-08-30 20:58:57 +000012585return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 ;
12587 return 0;
12588}
12589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012590if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012591
12592
Matthias Kloseb9621712010-04-24 17:59:49 +000012593$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012594
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012595 works=yes
12596
Guido van Rossum627b2d71993-12-24 10:39:16 +000012597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12600$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012601
Martin v. Löwisd6320502004-08-12 13:45:08 +000012602# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12604$as_echo_n "checking for socketpair... " >&6; }
12605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012606/* end confdefs.h. */
12607
12608#include <sys/types.h>
12609#include <sys/socket.h>
12610
12611int
12612main ()
12613{
12614void *x=socketpair
12615 ;
12616 return 0;
12617}
12618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012619if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012620
Matthias Kloseb9621712010-04-24 17:59:49 +000012621$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012622
Matthias Kloseb159a552010-04-25 21:00:44 +000012623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012624$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012625else
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12627$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012628
12629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012631
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012632# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12634$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012636/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012637#include <sys/types.h>
12638#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012639int
12640main ()
12641{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012642struct sockaddr x;
12643x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 ;
12645 return 0;
12646}
12647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012648if ac_fn_c_try_compile "$LINENO"; then :
12649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12650$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012651
Matthias Kloseb9621712010-04-24 17:59:49 +000012652$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012653
12654else
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12656$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012657
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012660
Guido van Rossumda88dad1995-01-26 00:46:29 +000012661va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12663$as_echo_n "checking whether va_list is an array... " >&6; }
12664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012665/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666
12667#ifdef HAVE_STDARG_PROTOTYPES
12668#include <stdarg.h>
12669#else
12670#include <varargs.h>
12671#endif
12672
Martin v. Löwis11437992002-04-12 09:54:03 +000012673int
12674main ()
12675{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012676va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012677 ;
12678 return 0;
12679}
12680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012681if ac_fn_c_try_compile "$LINENO"; then :
12682
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012683else
Skip Montanaro6dead952003-09-25 14:50:04 +000012684
Martin v. Löwis11437992002-04-12 09:54:03 +000012685
Matthias Kloseb9621712010-04-24 17:59:49 +000012686$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
Guido van Rossumda88dad1995-01-26 00:46:29 +000012688 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012689
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12693$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012694
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012695# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012696
12697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012699if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012700
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12704$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012705 OLD_CFLAGS=$CFLAGS
12706 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012708/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012709
12710# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012711
Martin v. Löwis11437992002-04-12 09:54:03 +000012712int
12713main ()
12714{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012715
12716 char *name;
12717 struct hostent *he, *res;
12718 char buffer[2048];
12719 int buflen = 2048;
12720 int h_errnop;
12721
12722 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012723
12724 ;
12725 return 0;
12726}
12727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012731
Martin v. Löwis11437992002-04-12 09:54:03 +000012732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12736$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012737
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012738else
Skip Montanaro6dead952003-09-25 14:50:04 +000012739
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12741$as_echo "no" >&6; }
12742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12743$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012745/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012746
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012747# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012748
Martin v. Löwis11437992002-04-12 09:54:03 +000012749int
12750main ()
12751{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012752
12753 char *name;
12754 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012755 char buffer[2048];
12756 int buflen = 2048;
12757 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012758
Matthias Kloseb159a552010-04-25 21:00:44 +000012759 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012760
12761 ;
12762 return 0;
12763}
12764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012765if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012768
Martin v. Löwis11437992002-04-12 09:54:03 +000012769
Matthias Kloseb159a552010-04-25 21:00:44 +000012770$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012771
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12773$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012774
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012775else
Skip Montanaro6dead952003-09-25 14:50:04 +000012776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12778$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12780$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12782/* end confdefs.h. */
12783
12784# include <netdb.h>
12785
12786int
12787main ()
12788{
12789
12790 char *name;
12791 struct hostent *he;
12792 struct hostent_data data;
12793
12794 (void) gethostbyname_r(name, he, &data);
12795
12796 ;
12797 return 0;
12798}
12799_ACEOF
12800if ac_fn_c_try_compile "$LINENO"; then :
12801
12802 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12803
12804
12805$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12806
12807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12808$as_echo "yes" >&6; }
12809
12810else
12811
12812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12813$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012814
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012817
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012820
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012823 CFLAGS=$OLD_CFLAGS
12824
12825else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012826
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 for ac_func in gethostbyname
12828do :
12829 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012830if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012831 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012832#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012833_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012834
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012835fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012836done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012837
Michael W. Hudson54241132001-12-07 15:38:26 +000012838
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012839fi
12840
Michael W. Hudson54241132001-12-07 15:38:26 +000012841
12842
12843
12844
12845
12846
Guido van Rossum627b2d71993-12-24 10:39:16 +000012847# checks for system services
12848# (none yet)
12849
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012850# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012851ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012852if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012853
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012854else
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12856$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012857if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859else
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012861LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865/* Override any GCC internal prototype to avoid an error.
12866 Use char because int might match the return type of a GCC
12867 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012868#ifdef __cplusplus
12869extern "C"
12870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012871char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012872int
12873main ()
12874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012875return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012876 ;
12877 return 0;
12878}
12879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012882else
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012885rm -f core conftest.err conftest.$ac_objext \
12886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012887LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12890$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012891if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 cat >>confdefs.h <<_ACEOF
12893#define HAVE_LIBIEEE 1
12894_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012895
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012896 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012897
Guido van Rossum627b2d71993-12-24 10:39:16 +000012898fi
12899
Michael W. Hudson54241132001-12-07 15:38:26 +000012900
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012901fi
12902
Michael W. Hudson54241132001-12-07 15:38:26 +000012903
Guido van Rossum7f253911997-05-09 02:42:48 +000012904# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12906$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012909if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012911if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012912then
12913
Matthias Kloseb9621712010-04-24 17:59:49 +000012914$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012915
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12917$as_echo "yes" >&6; }
12918else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012920fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012921else
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12923$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924fi
12925
Guido van Rossum7f253911997-05-09 02:42:48 +000012926
Guido van Rossum7f43da71994-08-01 12:15:30 +000012927# check for --with-libm=...
12928
Guido van Rossum563e7081996-09-10 18:20:48 +000012929case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012930Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012931*) LIBM=-lm
12932esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12934$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012937if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012939if test "$withval" = no
12940then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12942$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012943elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012944then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12946$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012947else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012948fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012949else
Matthias Kloseb9621712010-04-24 17:59:49 +000012950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12951$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952fi
12953
Guido van Rossum7f43da71994-08-01 12:15:30 +000012954
12955# check for --with-libc=...
12956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12958$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012961if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012963if test "$withval" = no
12964then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12966$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012967elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012968then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12970$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012971else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012972fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012973else
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12975$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012976fi
12977
Guido van Rossum7f43da71994-08-01 12:15:30 +000012978
Stefan Krah1919b7e2012-03-21 18:25:23 +010012979# **************************************
12980# * Check for gcc x64 inline assembler *
12981# **************************************
12982
12983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12984$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12986/* end confdefs.h. */
12987
12988int
12989main ()
12990{
12991
12992 __asm__ __volatile__ ("movq %rcx, %rax");
12993
12994 ;
12995 return 0;
12996}
12997_ACEOF
12998if ac_fn_c_try_compile "$LINENO"; then :
12999 have_gcc_asm_for_x64=yes
13000else
13001 have_gcc_asm_for_x64=no
13002fi
13003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13005$as_echo "$have_gcc_asm_for_x64" >&6; }
13006if test "$have_gcc_asm_for_x64" = yes
13007then
13008
13009$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13010
13011fi
13012
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013013# **************************************************
13014# * Check for various properties of floating point *
13015# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013016
Matthias Kloseb9621712010-04-24 17:59:49 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13018$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013019if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013021else
13022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013024 ac_cv_little_endian_double=no
13025else
Matthias Kloseb9621712010-04-24 17:59:49 +000013026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013027/* end confdefs.h. */
13028
13029#include <string.h>
13030int main() {
13031 double x = 9006104071832581.0;
13032 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13033 return 0;
13034 else
13035 return 1;
13036}
13037
13038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013039if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013040 ac_cv_little_endian_double=yes
13041else
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013046fi
13047
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013048fi
13049
Matthias Kloseb9621712010-04-24 17:59:49 +000013050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13051$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013052if test "$ac_cv_little_endian_double" = yes
13053then
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013056
13057fi
13058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13060$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013061if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013063else
13064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013066 ac_cv_big_endian_double=no
13067else
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013069/* end confdefs.h. */
13070
13071#include <string.h>
13072int main() {
13073 double x = 9006104071832581.0;
13074 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13075 return 0;
13076 else
13077 return 1;
13078}
13079
13080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013081if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013082 ac_cv_big_endian_double=yes
13083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13087 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013088fi
13089
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013090fi
13091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13093$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013094if test "$ac_cv_big_endian_double" = yes
13095then
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013098
13099fi
13100
13101# Some ARM platforms use a mixed-endian representation for doubles.
13102# While Python doesn't currently have full support for these platforms
13103# (see e.g., issue 1762561), we can at least make sure that float <-> string
13104# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13106$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013107if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013109else
13110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013112 ac_cv_mixed_endian_double=no
13113else
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013115/* end confdefs.h. */
13116
13117#include <string.h>
13118int main() {
13119 double x = 9006104071832581.0;
13120 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13121 return 0;
13122 else
13123 return 1;
13124}
13125
13126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013127if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013128 ac_cv_mixed_endian_double=yes
13129else
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13133 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013134fi
13135
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013136fi
13137
Matthias Kloseb9621712010-04-24 17:59:49 +000013138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13139$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013140if test "$ac_cv_mixed_endian_double" = yes
13141then
13142
Matthias Kloseb9621712010-04-24 17:59:49 +000013143$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013144
13145fi
13146
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013147# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013148# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013149# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013150# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013151# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013152# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013153
13154# This inline assembler syntax may also work for suncc and icc,
13155# so we try it on all platforms.
13156
Matthias Kloseb9621712010-04-24 17:59:49 +000013157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13158$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013160/* end confdefs.h. */
13161
13162int
13163main ()
13164{
13165
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013166 unsigned short cw;
13167 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13168 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013169
13170 ;
13171 return 0;
13172}
13173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013174if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013175 have_gcc_asm_for_x87=yes
13176else
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013178fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13181$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013182if test "$have_gcc_asm_for_x87" = yes
13183then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013186
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013188
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013189# Detect whether system arithmetic is subject to x87-style double
13190# rounding issues. The result of this test has little meaning on non
13191# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13192# mode is round-to-nearest and double rounding issues are present, and
13193# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13195$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013196# $BASECFLAGS may affect the result
13197ac_save_cc="$CC"
13198CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013199if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013200 ac_cv_x87_double_rounding=no
13201else
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013203/* end confdefs.h. */
13204
13205#include <stdlib.h>
13206#include <math.h>
13207int main() {
13208 volatile double x, y, z;
13209 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13210 x = 0.99999999999999989; /* 1-2**-53 */
13211 y = 1./x;
13212 if (y != 1.)
13213 exit(0);
13214 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13215 x = 1e16;
13216 y = 2.99999;
13217 z = x + y;
13218 if (z != 1e16+4.)
13219 exit(0);
13220 /* both tests show evidence of double rounding */
13221 exit(1);
13222}
13223
13224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013225if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013226 ac_cv_x87_double_rounding=no
13227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13231 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013232fi
13233
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013234CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13236$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013237if test "$ac_cv_x87_double_rounding" = yes
13238then
13239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013241
13242fi
13243
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013244# ************************************
13245# * Check for mathematical functions *
13246# ************************************
13247
13248LIBS_SAVE=$LIBS
13249LIBS="$LIBS $LIBM"
13250
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013251for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13252do :
13253 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13254ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013255if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013256 cat >>confdefs.h <<_ACEOF
13257#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13258_ACEOF
13259
13260fi
13261done
13262
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013263for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013264do :
13265 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13266ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013267if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013268 cat >>confdefs.h <<_ACEOF
13269#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13270_ACEOF
13271
13272fi
13273done
13274
13275ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13276"
Victor Stinnere0be4232011-10-25 13:06:09 +020013277if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013278 ac_have_decl=1
13279else
13280 ac_have_decl=0
13281fi
13282
13283cat >>confdefs.h <<_ACEOF
13284#define HAVE_DECL_ISINF $ac_have_decl
13285_ACEOF
13286ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13287"
Victor Stinnere0be4232011-10-25 13:06:09 +020013288if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013289 ac_have_decl=1
13290else
13291 ac_have_decl=0
13292fi
13293
13294cat >>confdefs.h <<_ACEOF
13295#define HAVE_DECL_ISNAN $ac_have_decl
13296_ACEOF
13297ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13298"
Victor Stinnere0be4232011-10-25 13:06:09 +020013299if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013300 ac_have_decl=1
13301else
13302 ac_have_decl=0
13303fi
13304
13305cat >>confdefs.h <<_ACEOF
13306#define HAVE_DECL_ISFINITE $ac_have_decl
13307_ACEOF
13308
13309
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013310# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13311# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13313$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013314if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013316else
13317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013319 ac_cv_tanh_preserves_zero_sign=no
13320else
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013322/* end confdefs.h. */
13323
13324#include <math.h>
13325#include <stdlib.h>
13326int main() {
13327 /* return 0 if either negative zeros don't exist
13328 on this platform or if negative zeros exist
13329 and tanh(-0.) == -0. */
13330 if (atan2(0., -1.) == atan2(-0., -1.) ||
13331 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13332 else exit(1);
13333}
13334
13335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013336if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013337 ac_cv_tanh_preserves_zero_sign=yes
13338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13342 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013343fi
13344
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013345fi
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13348$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013349if test "$ac_cv_tanh_preserves_zero_sign" = yes
13350then
13351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013353
13354fi
13355
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013356if test "$ac_cv_func_log1p" = yes
13357then
13358 # On some versions of AIX, log1p(-0.) returns 0. instead of
13359 # -0. See issue #9920.
13360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13361$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013362 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013363 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013364else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013365
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013366 if test "$cross_compiling" = yes; then :
13367 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013368else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13370/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013371
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013372 #include <math.h>
13373 #include <stdlib.h>
13374 int main() {
13375 /* Fail if the signs of log1p(-0.) and -0. can be
13376 distinguished. */
13377 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13378 return 0;
13379 else
13380 return 1;
13381 }
13382
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013383_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013384if ac_fn_c_try_run "$LINENO"; then :
13385 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013386else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013387 ac_cv_log1p_drops_zero_sign=yes
13388fi
13389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13390 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013391fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013392
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013393fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013394
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13396$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13397fi
13398if test "$ac_cv_log1p_drops_zero_sign" = yes
13399then
13400
13401$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13402
13403fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013404
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013405LIBS=$LIBS_SAVE
13406
Mark Dickinsona614f042009-11-28 12:48:43 +000013407# For multiprocessing module, check that sem_open
13408# actually works. For FreeBSD versions <= 7.2,
13409# the kernel module that provides POSIX semaphores
13410# isn't loaded by default, so an attempt to call
13411# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13413$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013414if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013418 ac_cv_posix_semaphores_enabled=yes
13419else
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013421/* end confdefs.h. */
13422
13423#include <unistd.h>
13424#include <fcntl.h>
13425#include <stdio.h>
13426#include <semaphore.h>
13427#include <sys/stat.h>
13428
13429int main(void) {
13430 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13431 if (a == SEM_FAILED) {
13432 perror("sem_open");
13433 return 1;
13434 }
13435 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013436 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013437 return 0;
13438}
13439
13440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013441if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013442 ac_cv_posix_semaphores_enabled=yes
13443else
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13447 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013448fi
13449
13450
Mark Dickinsona614f042009-11-28 12:48:43 +000013451fi
13452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13454$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013455if test $ac_cv_posix_semaphores_enabled = no
13456then
13457
Matthias Kloseb9621712010-04-24 17:59:49 +000013458$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013459
13460fi
13461
Mark Dickinson10683072009-04-18 21:18:19 +000013462# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13464$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013465if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013466 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013467else
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013469 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013470else
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013472/* end confdefs.h. */
13473
13474#include <unistd.h>
13475#include <fcntl.h>
13476#include <stdio.h>
13477#include <semaphore.h>
13478#include <sys/stat.h>
13479
13480int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013481 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013482 int count;
13483 int res;
13484 if(a==SEM_FAILED){
13485 perror("sem_open");
13486 return 1;
13487
13488 }
13489 res = sem_getvalue(a, &count);
13490 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013491 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013492 return res==-1 ? 1 : 0;
13493}
13494
Mark Dickinson10683072009-04-18 21:18:19 +000013495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013496if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013497 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013498else
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13502 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013503fi
13504
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013505
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013506fi
13507
Matthias Kloseb9621712010-04-24 17:59:49 +000013508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13509$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013510if test $ac_cv_broken_sem_getvalue = yes
13511then
13512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013514
13515fi
13516
Mark Dickinsonbd792642009-03-18 20:06:12 +000013517# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13519$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013520# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013521if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013522 enableval=$enable_big_digits; case $enable_big_digits in
13523yes)
13524 enable_big_digits=30 ;;
13525no)
13526 enable_big_digits=15 ;;
1352715|30)
13528 ;;
13529*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013530 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 +000013531esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13533$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013534
13535cat >>confdefs.h <<_ACEOF
13536#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13537_ACEOF
13538
13539
13540else
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13542$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013543fi
13544
13545
Guido van Rossumef2255b2000-03-10 22:30:29 +000013546# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013547ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013548if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
13550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013552
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013553 wchar_h="yes"
13554
Guido van Rossumef2255b2000-03-10 22:30:29 +000013555else
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013557
13558fi
13559
Michael W. Hudson54241132001-12-07 15:38:26 +000013560
Martin v. Löwis11437992002-04-12 09:54:03 +000013561
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013562# determine wchar_t size
13563if test "$wchar_h" = yes
13564then
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013566# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13567# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13568# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13570$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013571if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13575"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013576
Martin v. Löwis11437992002-04-12 09:54:03 +000013577else
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 if test "$ac_cv_type_wchar_t" = yes; then
13579 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13580$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013581as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013582See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013583 else
13584 ac_cv_sizeof_wchar_t=0
13585 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013587
Martin v. Löwis11437992002-04-12 09:54:03 +000013588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13590$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013591
13592
13593
Martin v. Löwis11437992002-04-12 09:54:03 +000013594cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013595#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013596_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013597
Michael W. Hudson54241132001-12-07 15:38:26 +000013598
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013599fi
13600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13602$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013603have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013605/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013606
13607#include <tcl.h>
13608#if TCL_UTF_MAX != 6
13609# error "NOT UCS4_TCL"
13610#endif
13611int
13612main ()
13613{
13614
13615 ;
13616 return 0;
13617}
13618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013619if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013620
13621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013623
13624 have_ucs4_tcl=yes
13625
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13629$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013630
Skip Montanaro6dead952003-09-25 14:50:04 +000013631# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013632if test "$wchar_h" = yes
13633then
13634 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13636$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013637 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013639else
13640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013642 ac_cv_wchar_t_signed=yes
13643else
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013645/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013646
13647 #include <wchar.h>
13648 int main()
13649 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013650 /* Success: exit code 0 */
13651 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013652 }
13653
13654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013655if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013656 ac_cv_wchar_t_signed=yes
13657else
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013662fi
13663
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013664fi
13665
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13667$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668fi
13669
Georg Brandl52d168a2008-01-07 18:10:24 +000013670# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013671if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013672 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013673then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013674 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013677
Georg Brandl52d168a2008-01-07 18:10:24 +000013678else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013679 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013680fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13682$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013683
13684# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13686$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013687if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013689else
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 ac_cv_c_bigendian=unknown
13691 # See if we're dealing with a universal compiler.
13692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13693/* end confdefs.h. */
13694#ifndef __APPLE_CC__
13695 not a universal capable compiler
13696 #endif
13697 typedef int dummy;
13698
Skip Montanaro6dead952003-09-25 14:50:04 +000013699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013700if ac_fn_c_try_compile "$LINENO"; then :
13701
13702 # Check for potential -arch flags. It is not universal unless
13703 # there are at least two -arch flags with different values.
13704 ac_arch=
13705 ac_prev=
13706 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13707 if test -n "$ac_prev"; then
13708 case $ac_word in
13709 i?86 | x86_64 | ppc | ppc64)
13710 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13711 ac_arch=$ac_word
13712 else
13713 ac_cv_c_bigendian=universal
13714 break
13715 fi
13716 ;;
13717 esac
13718 ac_prev=
13719 elif test "x$ac_word" = "x-arch"; then
13720 ac_prev=arch
13721 fi
13722 done
13723fi
13724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13725 if test $ac_cv_c_bigendian = unknown; then
13726 # See if sys/param.h defines the BYTE_ORDER macro.
13727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013728/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013729#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013731
Martin v. Löwis11437992002-04-12 09:54:03 +000013732int
13733main ()
13734{
Matthias Kloseb9621712010-04-24 17:59:49 +000013735#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13736 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13737 && LITTLE_ENDIAN)
13738 bogus endian macros
13739 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013740
13741 ;
13742 return 0;
13743}
13744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013745if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013746 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013748/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013749#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013750 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013751
Martin v. Löwis11437992002-04-12 09:54:03 +000013752int
13753main ()
13754{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013755#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013756 not big endian
13757 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013758
13759 ;
13760 return 0;
13761}
13762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013763if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013764 ac_cv_c_bigendian=yes
13765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013769fi
13770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13771 fi
13772 if test $ac_cv_c_bigendian = unknown; then
13773 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013775/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013776#include <limits.h>
13777
Martin v. Löwis11437992002-04-12 09:54:03 +000013778int
13779main ()
13780{
Matthias Kloseb9621712010-04-24 17:59:49 +000013781#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13782 bogus endian macros
13783 #endif
13784
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 ;
13786 return 0;
13787}
13788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013789if ac_fn_c_try_compile "$LINENO"; then :
13790 # It does; now see whether it defined to _BIG_ENDIAN or not.
13791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13792/* end confdefs.h. */
13793#include <limits.h>
13794
13795int
13796main ()
13797{
13798#ifndef _BIG_ENDIAN
13799 not big endian
13800 #endif
13801
13802 ;
13803 return 0;
13804}
13805_ACEOF
13806if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013808else
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13812fi
13813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13814 fi
13815 if test $ac_cv_c_bigendian = unknown; then
13816 # Compile a test program.
13817 if test "$cross_compiling" = yes; then :
13818 # Try to guess by grepping values from an object file.
13819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13820/* end confdefs.h. */
13821short int ascii_mm[] =
13822 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13823 short int ascii_ii[] =
13824 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13825 int use_ascii (int i) {
13826 return ascii_mm[i] + ascii_ii[i];
13827 }
13828 short int ebcdic_ii[] =
13829 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13830 short int ebcdic_mm[] =
13831 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13832 int use_ebcdic (int i) {
13833 return ebcdic_mm[i] + ebcdic_ii[i];
13834 }
13835 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836
Matthias Kloseb9621712010-04-24 17:59:49 +000013837int
13838main ()
13839{
13840return use_ascii (foo) == use_ebcdic (foo);
13841 ;
13842 return 0;
13843}
13844_ACEOF
13845if ac_fn_c_try_compile "$LINENO"; then :
13846 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13847 ac_cv_c_bigendian=yes
13848 fi
13849 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13850 if test "$ac_cv_c_bigendian" = unknown; then
13851 ac_cv_c_bigendian=no
13852 else
13853 # finding both strings is unlikely to happen, but who knows?
13854 ac_cv_c_bigendian=unknown
13855 fi
13856 fi
13857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013859else
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013861/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013862$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013863int
13864main ()
13865{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013866
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 /* Are we little or big endian? From Harbison&Steele. */
13868 union
13869 {
13870 long int l;
13871 char c[sizeof (long int)];
13872 } u;
13873 u.l = 1;
13874 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875
13876 ;
13877 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013878}
Martin v. Löwis11437992002-04-12 09:54:03 +000013879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013880if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013881 ac_cv_c_bigendian=no
13882else
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13892$as_echo "$ac_cv_c_bigendian" >&6; }
13893 case $ac_cv_c_bigendian in #(
13894 yes)
13895 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13896;; #(
13897 no)
13898 ;; #(
13899 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013900
Matthias Kloseb9621712010-04-24 17:59:49 +000013901$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 ;; #(
13904 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013905 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013906 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013908
Michael W. Hudson54241132001-12-07 15:38:26 +000013909
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013910# ABI version string for Python extension modules. This appears between the
13911# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13912# from the following attributes which affect the ABI of this Python build (in
13913# this order):
13914#
13915# * The Python implementation (always 'cpython-' for us)
13916# * The major and minor version numbers
13917# * --with-pydebug (adds a 'd')
13918# * --with-pymalloc (adds a 'm')
13919# * --with-wide-unicode (adds a 'u')
13920#
13921# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013922# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13923# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013924
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13926$as_echo_n "checking ABIFLAGS... " >&6; }
13927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13928$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13930$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013931SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13933$as_echo "$SOABI" >&6; }
13934
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013935
13936case $ac_sys_system in
13937 Linux*|GNU*)
13938 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13939 *)
13940 EXT_SUFFIX=${SHLIB_SUFFIX};;
13941esac
13942
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13944$as_echo_n "checking LDVERSION... " >&6; }
13945LDVERSION='$(VERSION)$(ABIFLAGS)'
13946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13947$as_echo "$LDVERSION" >&6; }
13948
doko@python.org87421192013-01-26 11:39:31 +010013949
13950LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13951
13952
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013953# Check whether right shifting a negative integer extends the sign bit
13954# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13956$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013957if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013959else
Martin v. Löwis11437992002-04-12 09:54:03 +000013960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013962 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013963else
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013965/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013966
13967int main()
13968{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013969 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013970}
13971
Martin v. Löwis11437992002-04-12 09:54:03 +000013972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013973if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013974 ac_cv_rshift_extends_sign=yes
13975else
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013980fi
13981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982fi
13983
Matthias Kloseb9621712010-04-24 17:59:49 +000013984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13985$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013986if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013987then
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
Matthias Kloseb9621712010-04-24 17:59:49 +000013989$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013990
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013991fi
13992
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013993# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13995$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013996if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013998else
Martin v. Löwis11437992002-04-12 09:54:03 +000013999
Matthias Kloseb9621712010-04-24 17:59:49 +000014000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014001/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014002#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014003int
14004main ()
14005{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014006
14007 FILE *f = fopen("/dev/null", "r");
14008 flockfile(f);
14009 getc_unlocked(f);
14010 funlockfile(f);
14011
Martin v. Löwis11437992002-04-12 09:54:03 +000014012 ;
14013 return 0;
14014}
14015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014016if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014017 ac_cv_have_getc_unlocked=yes
14018else
Matthias Kloseb9621712010-04-24 17:59:49 +000014019 ac_cv_have_getc_unlocked=no
14020fi
14021rm -f core conftest.err conftest.$ac_objext \
14022 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14026$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014027if test "$ac_cv_have_getc_unlocked" = yes
14028then
Martin v. Löwis11437992002-04-12 09:54:03 +000014029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014031
14032fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014033
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014034# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014035# save the value of LIBS so we don't actually link Python with readline
14036LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014037
Gregory P. Smith18820942008-09-07 06:24:49 +000014038# On some systems we need to link readline to a termcap compatible
14039# library. NOTE: Keep the precedence of listed libraries synchronised
14040# with setup.py.
14041py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14043$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014044for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014045 if test -z "$py_libtermcap"; then
14046 READLINE_LIBS="-lreadline"
14047 else
14048 READLINE_LIBS="-lreadline -l$py_libtermcap"
14049 fi
14050 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014052/* end confdefs.h. */
14053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054/* Override any GCC internal prototype to avoid an error.
14055 Use char because int might match the return type of a GCC
14056 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014057#ifdef __cplusplus
14058extern "C"
14059#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014060char readline ();
14061int
14062main ()
14063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014065 ;
14066 return 0;
14067}
14068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014069if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014070 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014072rm -f core conftest.err conftest.$ac_objext \
14073 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014074 if test $py_cv_lib_readline = yes; then
14075 break
14076 fi
14077done
14078# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14079#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014080if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14082$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014083else
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14085$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014086
Matthias Kloseb9621712010-04-24 17:59:49 +000014087$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014088
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014089fi
14090
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014091# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14093$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014094if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014096else
14097 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014098LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014100/* end confdefs.h. */
14101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102/* Override any GCC internal prototype to avoid an error.
14103 Use char because int might match the return type of a GCC
14104 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014105#ifdef __cplusplus
14106extern "C"
14107#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014108char rl_callback_handler_install ();
14109int
14110main ()
14111{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014112return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014113 ;
14114 return 0;
14115}
14116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014117if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014118 ac_cv_lib_readline_rl_callback_handler_install=yes
14119else
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014122rm -f core conftest.err conftest.$ac_objext \
14123 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014124LIBS=$ac_check_lib_save_LIBS
14125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14127$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014128if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014129
Matthias Kloseb9621712010-04-24 17:59:49 +000014130$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014131
14132fi
14133
14134
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014135# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014137/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014138#include <readline/readline.h>
14139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014140if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014141 have_readline=yes
14142else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014143 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014144
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014145fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014146rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014147if test $have_readline = yes
14148then
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014150/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014151#include <readline/readline.h>
14152
14153_ACEOF
14154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014156
Matthias Kloseb9621712010-04-24 17:59:49 +000014157$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014158
14159fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014160rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014161
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014163/* end confdefs.h. */
14164#include <readline/readline.h>
14165
14166_ACEOF
14167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014169
Matthias Kloseb9621712010-04-24 17:59:49 +000014170$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014171
14172fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014173rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014174
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014175fi
14176
Martin v. Löwis0daad592001-09-30 21:09:59 +000014177# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14179$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014180if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014182else
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014184LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188/* Override any GCC internal prototype to avoid an error.
14189 Use char because int might match the return type of a GCC
14190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014191#ifdef __cplusplus
14192extern "C"
14193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014194char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014195int
14196main ()
14197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014199 ;
14200 return 0;
14201}
14202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014203if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014204 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014205else
Matthias Kloseb9621712010-04-24 17:59:49 +000014206 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014208rm -f core conftest.err conftest.$ac_objext \
14209 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014210LIBS=$ac_check_lib_save_LIBS
14211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14213$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014214if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014215
Matthias Kloseb9621712010-04-24 17:59:49 +000014216$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014217
Martin v. Löwis0daad592001-09-30 21:09:59 +000014218fi
14219
Michael W. Hudson54241132001-12-07 15:38:26 +000014220
Thomas Wouters89d996e2007-09-08 17:39:28 +000014221# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14223$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014224if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014226else
14227 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014228LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014230/* end confdefs.h. */
14231
14232/* Override any GCC internal prototype to avoid an error.
14233 Use char because int might match the return type of a GCC
14234 builtin and then its argument prototype would still apply. */
14235#ifdef __cplusplus
14236extern "C"
14237#endif
14238char rl_completion_display_matches_hook ();
14239int
14240main ()
14241{
14242return rl_completion_display_matches_hook ();
14243 ;
14244 return 0;
14245}
14246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014247if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014248 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14249else
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014252rm -f core conftest.err conftest.$ac_objext \
14253 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014254LIBS=$ac_check_lib_save_LIBS
14255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14257$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014258if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014259
Matthias Kloseb9621712010-04-24 17:59:49 +000014260$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014261
14262fi
14263
14264
Martin v. Löwis0daad592001-09-30 21:09:59 +000014265# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14267$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014268if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014270else
Martin v. Löwis11437992002-04-12 09:54:03 +000014271 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014272LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014276/* Override any GCC internal prototype to avoid an error.
14277 Use char because int might match the return type of a GCC
14278 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014279#ifdef __cplusplus
14280extern "C"
14281#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014282char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014283int
14284main ()
14285{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014286return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014287 ;
14288 return 0;
14289}
14290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014291if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014293else
Matthias Kloseb9621712010-04-24 17:59:49 +000014294 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014296rm -f core conftest.err conftest.$ac_objext \
14297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014298LIBS=$ac_check_lib_save_LIBS
14299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14301$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014302if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014305
Guido van Rossum353ae582001-07-10 16:45:32 +000014306fi
14307
Jack Jansendd19cf82001-12-06 22:36:17 +000014308
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014309# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014311/* end confdefs.h. */
14312#include <readline/readline.h>
14313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014314if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014315 have_readline=yes
14316else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014317 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014318
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014319fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014320rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014321if test $have_readline = yes
14322then
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014324/* end confdefs.h. */
14325#include <readline/readline.h>
14326
14327_ACEOF
14328if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014329 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014330
Matthias Kloseb9621712010-04-24 17:59:49 +000014331$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014332
14333fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014334rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014335
14336fi
14337
Martin v. Löwis82bca632006-02-10 20:49:30 +000014338# End of readline checks: restore LIBS
14339LIBS=$LIBS_no_readline
14340
Matthias Kloseb9621712010-04-24 17:59:49 +000014341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14342$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014343if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014345else
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
Matthias Kloseb9621712010-04-24 17:59:49 +000014347if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014348 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014349else
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014351/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014352
14353int main()
14354{
14355 int val1 = nice(1);
14356 if (val1 != -1 && val1 == nice(2))
14357 exit(0);
14358 exit(1);
14359}
14360
Martin v. Löwis11437992002-04-12 09:54:03 +000014361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014362if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014363 ac_cv_broken_nice=yes
14364else
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14368 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014369fi
14370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371fi
14372
Matthias Kloseb9621712010-04-24 17:59:49 +000014373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14374$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014375if test "$ac_cv_broken_nice" = yes
14376then
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014379
14380fi
14381
Matthias Kloseb9621712010-04-24 17:59:49 +000014382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14383$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014384if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014386else
Matthias Kloseb9621712010-04-24 17:59:49 +000014387 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014388 ac_cv_broken_poll=no
14389else
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014391/* end confdefs.h. */
14392
14393#include <poll.h>
14394
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014395int main()
14396{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014397 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014398 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014399
14400 close (42);
14401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014402 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014403 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014404 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014405 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014406 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014407 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014408 return 1;
14409}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014410
14411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014412if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014413 ac_cv_broken_poll=yes
14414else
Matthias Kloseb9621712010-04-24 17:59:49 +000014415 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14418 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014420
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014421fi
14422
Matthias Kloseb9621712010-04-24 17:59:49 +000014423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14424$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014425if test "$ac_cv_broken_poll" = yes
14426then
14427
Matthias Kloseb9621712010-04-24 17:59:49 +000014428$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014429
14430fi
14431
Brett Cannon43802422005-02-10 20:48:03 +000014432# 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 +000014433# (which is not required by ISO C or UNIX spec) and/or if we support
14434# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014435ac_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 +000014436#include <$ac_cv_struct_tm>
14437
Matthias Kloseb9621712010-04-24 17:59:49 +000014438"
Victor Stinnere0be4232011-10-25 13:06:09 +020014439if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014440
14441cat >>confdefs.h <<_ACEOF
14442#define HAVE_STRUCT_TM_TM_ZONE 1
14443_ACEOF
14444
14445
14446fi
14447
14448if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014451
14452else
Matthias Kloseb9621712010-04-24 17:59:49 +000014453 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14454"
Victor Stinnere0be4232011-10-25 13:06:09 +020014455if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457else
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459fi
14460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014461cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014462#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014463_ACEOF
14464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14466$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014467if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469else
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014471/* end confdefs.h. */
14472#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473#if !HAVE_DECL_TZNAME
14474extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014475#endif
14476
14477int
14478main ()
14479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014481 ;
14482 return 0;
14483}
14484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014485if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014486 ac_cv_var_tzname=yes
14487else
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014490rm -f core conftest.err conftest.$ac_objext \
14491 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14494$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014495 if test $ac_cv_var_tzname = yes; then
14496
Matthias Kloseb9621712010-04-24 17:59:49 +000014497$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014498
14499 fi
14500fi
14501
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014502
Martin v. Löwis1d459062005-03-14 21:23:33 +000014503# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14505$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014506if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014508else
14509
Matthias Kloseb9621712010-04-24 17:59:49 +000014510if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014511 ac_cv_working_tzset=no
14512else
Matthias Kloseb9621712010-04-24 17:59:49 +000014513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014514/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014515
14516#include <stdlib.h>
14517#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014518#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014519
14520#if HAVE_TZNAME
14521extern char *tzname[];
14522#endif
14523
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014524int main()
14525{
Brett Cannon18367812003-09-19 00:59:16 +000014526 /* Note that we need to ensure that not only does tzset(3)
14527 do 'something' with localtime, but it works as documented
14528 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014529 This includes making sure that tzname is set properly if
14530 tm->tm_zone does not exist since it is the alternative way
14531 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014532
14533 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014534 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014535 */
14536
Martin v. Löwis1d459062005-03-14 21:23:33 +000014537 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014538 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14539
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014540 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014541 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014542 if (localtime(&groundhogday)->tm_hour != 0)
14543 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014544#if HAVE_TZNAME
14545 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14546 if (strcmp(tzname[0], "UTC") ||
14547 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14548 exit(1);
14549#endif
Brett Cannon18367812003-09-19 00:59:16 +000014550
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014551 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014552 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014553 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014554 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014555#if HAVE_TZNAME
14556 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14557 exit(1);
14558#endif
Brett Cannon18367812003-09-19 00:59:16 +000014559
14560 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14561 tzset();
14562 if (localtime(&groundhogday)->tm_hour != 11)
14563 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014564#if HAVE_TZNAME
14565 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14566 exit(1);
14567#endif
14568
14569#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014570 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14571 exit(1);
14572 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14573 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014574#endif
Brett Cannon18367812003-09-19 00:59:16 +000014575
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014576 exit(0);
14577}
14578
14579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014580if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014581 ac_cv_working_tzset=yes
14582else
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14586 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014587fi
14588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589fi
14590
Matthias Kloseb9621712010-04-24 17:59:49 +000014591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14592$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014593if test "$ac_cv_working_tzset" = yes
14594then
14595
Matthias Kloseb9621712010-04-24 17:59:49 +000014596$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014597
14598fi
14599
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014600# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14602$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014603if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014605else
Matthias Kloseb9621712010-04-24 17:59:49 +000014606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014607/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014608#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014609int
14610main ()
14611{
14612
14613struct stat st;
14614st.st_mtim.tv_nsec = 1;
14615
14616 ;
14617 return 0;
14618}
14619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014621 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014622else
Matthias Kloseb9621712010-04-24 17:59:49 +000014623 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14626fi
14627
Matthias Kloseb9621712010-04-24 17:59:49 +000014628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14629$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014630if test "$ac_cv_stat_tv_nsec" = yes
14631then
14632
Matthias Kloseb9621712010-04-24 17:59:49 +000014633$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014634
14635fi
14636
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014637# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14639$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014640if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014642else
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014644/* end confdefs.h. */
14645#include <sys/stat.h>
14646int
14647main ()
14648{
14649
14650struct stat st;
14651st.st_mtimespec.tv_nsec = 1;
14652
14653 ;
14654 return 0;
14655}
14656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014658 ac_cv_stat_tv_nsec2=yes
14659else
Matthias Kloseb9621712010-04-24 17:59:49 +000014660 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14663fi
14664
Matthias Kloseb9621712010-04-24 17:59:49 +000014665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14666$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014667if test "$ac_cv_stat_tv_nsec2" = yes
14668then
14669
Matthias Kloseb9621712010-04-24 17:59:49 +000014670$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014671
14672fi
14673
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014674ac_save_cppflags="$CPPFLAGS"
14675CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014676# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14678$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014679if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014681else
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014683/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014684#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014685int
14686main ()
14687{
Jack Jansen666b1e72001-10-31 12:11:48 +000014688
14689 int rtn;
14690 rtn = mvwdelch(0,0,0);
14691
Martin v. Löwis11437992002-04-12 09:54:03 +000014692 ;
14693 return 0;
14694}
14695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014696if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014697 ac_cv_mvwdelch_is_expression=yes
14698else
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14702fi
14703
Matthias Kloseb9621712010-04-24 17:59:49 +000014704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14705$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014706
14707if test "$ac_cv_mvwdelch_is_expression" = yes
14708then
Martin v. Löwis11437992002-04-12 09:54:03 +000014709
Matthias Kloseb9621712010-04-24 17:59:49 +000014710$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014711
14712fi
14713
Matthias Kloseb9621712010-04-24 17:59:49 +000014714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14715$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014716if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014718else
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014720/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014721#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014722int
14723main ()
14724{
Jack Jansen666b1e72001-10-31 12:11:48 +000014725
14726 WINDOW *w;
14727 w->_flags = 0;
14728
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 ;
14730 return 0;
14731}
14732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014733if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014734 ac_cv_window_has_flags=yes
14735else
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14739fi
14740
Matthias Kloseb9621712010-04-24 17:59:49 +000014741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14742$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014743
Jack Jansen666b1e72001-10-31 12:11:48 +000014744
14745if test "$ac_cv_window_has_flags" = yes
14746then
Martin v. Löwis11437992002-04-12 09:54:03 +000014747
Matthias Kloseb9621712010-04-24 17:59:49 +000014748$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014749
14750fi
14751
Matthias Kloseb9621712010-04-24 17:59:49 +000014752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14753$as_echo_n "checking for is_term_resized... " >&6; }
14754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014755/* end confdefs.h. */
14756#include <curses.h>
14757int
14758main ()
14759{
14760void *x=is_term_resized
14761 ;
14762 return 0;
14763}
14764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014765if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014766
Matthias Kloseb9621712010-04-24 17:59:49 +000014767$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014768
Matthias Kloseb159a552010-04-25 21:00:44 +000014769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014770$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014771else
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14773$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014774
14775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14777
Matthias Kloseb9621712010-04-24 17:59:49 +000014778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14779$as_echo_n "checking for resize_term... " >&6; }
14780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014781/* end confdefs.h. */
14782#include <curses.h>
14783int
14784main ()
14785{
14786void *x=resize_term
14787 ;
14788 return 0;
14789}
14790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014791if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014792
Matthias Kloseb9621712010-04-24 17:59:49 +000014793$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014794
Matthias Kloseb159a552010-04-25 21:00:44 +000014795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014796$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014797else
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14799$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014800
14801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14803
Matthias Kloseb9621712010-04-24 17:59:49 +000014804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14805$as_echo_n "checking for resizeterm... " >&6; }
14806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014807/* end confdefs.h. */
14808#include <curses.h>
14809int
14810main ()
14811{
14812void *x=resizeterm
14813 ;
14814 return 0;
14815}
14816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014817if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014818
Matthias Kloseb9621712010-04-24 17:59:49 +000014819$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014820
Matthias Kloseb159a552010-04-25 21:00:44 +000014821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014822$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014823else
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14825$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014826
14827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014829# last curses configure check
14830CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014831
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14833$as_echo "$as_me: checking for device files" >&6;}
14834
14835if test "x$cross_compiling" = xyes; then
14836 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14838$as_echo_n "checking for /dev/ptmx... " >&6; }
14839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14840$as_echo "not set" >&6; }
14841 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14842 fi
14843 if test "${ac_cv_file__dev_ptc+set}" != set; then
14844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14845$as_echo_n "checking for /dev/ptc... " >&6; }
14846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14847$as_echo "not set" >&6; }
14848 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14849 fi
14850fi
14851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14853$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014854if ${ac_cv_file__dev_ptmx+:} false; then :
14855 $as_echo_n "(cached) " >&6
14856else
14857 test "$cross_compiling" = yes &&
14858 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14859if test -r "/dev/ptmx"; then
14860 ac_cv_file__dev_ptmx=yes
14861else
14862 ac_cv_file__dev_ptmx=no
14863fi
14864fi
14865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14866$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14867if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014868
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014869fi
14870
14871if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014872
Matthias Kloseb9621712010-04-24 17:59:49 +000014873$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014874
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14877$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014878if ${ac_cv_file__dev_ptc+:} false; then :
14879 $as_echo_n "(cached) " >&6
14880else
14881 test "$cross_compiling" = yes &&
14882 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14883if test -r "/dev/ptc"; then
14884 ac_cv_file__dev_ptc=yes
14885else
14886 ac_cv_file__dev_ptc=no
14887fi
14888fi
14889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14890$as_echo "$ac_cv_file__dev_ptc" >&6; }
14891if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014892
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014893fi
14894
14895if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014896
Matthias Kloseb9621712010-04-24 17:59:49 +000014897$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014898
Neal Norwitz865400f2003-03-21 01:42:58 +000014899fi
14900
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014901if test "$have_long_long" = yes
14902then
Matthias Kloseb9621712010-04-24 17:59:49 +000014903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14904$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014905 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014907else
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014909 ac_cv_have_long_long_format="cross -- assuming no"
14910 if test x$GCC = xyes; then
14911 save_CFLAGS=$CFLAGS
14912 CFLAGS="$CFLAGS -Werror -Wformat"
14913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14914/* end confdefs.h. */
14915
14916 #include <stdio.h>
14917 #include <stddef.h>
14918
14919int
14920main ()
14921{
14922
14923 char *buffer;
14924 sprintf(buffer, "%lld", (long long)123);
14925 sprintf(buffer, "%lld", (long long)-123);
14926 sprintf(buffer, "%llu", (unsigned long long)123);
14927
14928 ;
14929 return 0;
14930}
14931_ACEOF
14932if ac_fn_c_try_compile "$LINENO"; then :
14933 ac_cv_have_long_long_format=yes
14934
14935fi
14936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14937 CFLAGS=$save_CFLAGS
14938 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014939else
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014941/* end confdefs.h. */
14942
14943 #include <stdio.h>
14944 #include <stddef.h>
14945 #include <string.h>
14946
14947 #ifdef HAVE_SYS_TYPES_H
14948 #include <sys/types.h>
14949 #endif
14950
14951 int main()
14952 {
14953 char buffer[256];
14954
14955 if (sprintf(buffer, "%lld", (long long)123) < 0)
14956 return 1;
14957 if (strcmp(buffer, "123"))
14958 return 1;
14959
14960 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14961 return 1;
14962 if (strcmp(buffer, "-123"))
14963 return 1;
14964
14965 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14966 return 1;
14967 if (strcmp(buffer, "123"))
14968 return 1;
14969
14970 return 0;
14971 }
14972
14973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014974if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014975 ac_cv_have_long_long_format=yes
14976else
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14980 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014981fi
14982
14983
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014984fi
14985
Matthias Kloseb9621712010-04-24 17:59:49 +000014986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14987$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014988fi
14989
Mark Dickinson89d7d412009-12-31 20:50:59 +000014990if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014991then
14992
Matthias Kloseb9621712010-04-24 17:59:49 +000014993$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014994
14995fi
14996
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014997if test $ac_sys_system = Darwin
14998then
14999 LIBS="$LIBS -framework CoreFoundation"
15000fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015001
Matthias Kloseb9621712010-04-24 17:59:49 +000015002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15003$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015004if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015006else
Matthias Kloseb9621712010-04-24 17:59:49 +000015007 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015008 ac_cv_have_size_t_format="cross -- assuming yes"
15009
Thomas Wouters477c8d52006-05-27 19:21:47 +000015010else
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015012/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015013
Thomas Wouters477c8d52006-05-27 19:21:47 +000015014#include <stdio.h>
15015#include <stddef.h>
15016#include <string.h>
15017
Christian Heimes2c181612007-12-17 20:04:13 +000015018#ifdef HAVE_SYS_TYPES_H
15019#include <sys/types.h>
15020#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015021
15022#ifdef HAVE_SSIZE_T
15023typedef ssize_t Py_ssize_t;
15024#elif SIZEOF_VOID_P == SIZEOF_LONG
15025typedef long Py_ssize_t;
15026#else
15027typedef int Py_ssize_t;
15028#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015029
Christian Heimes2c181612007-12-17 20:04:13 +000015030int main()
15031{
15032 char buffer[256];
15033
Thomas Wouters477c8d52006-05-27 19:21:47 +000015034 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15035 return 1;
15036
Thomas Wouters89f507f2006-12-13 04:49:30 +000015037 if (strcmp(buffer, "123"))
15038 return 1;
15039
15040 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15041 return 1;
15042
15043 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015044 return 1;
15045
15046 return 0;
15047}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015048
Thomas Wouters477c8d52006-05-27 19:21:47 +000015049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015050if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015051 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015052else
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015057fi
15058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15061$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015062if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015063
Matthias Kloseb9621712010-04-24 17:59:49 +000015064$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015065
15066fi
15067
Matthias Kloseb9621712010-04-24 17:59:49 +000015068ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015069#ifdef HAVE_SYS_TYPES_H
15070#include <sys/types.h>
15071#endif
15072#ifdef HAVE_SYS_SOCKET_H
15073#include <sys/socket.h>
15074#endif
15075
Matthias Kloseb9621712010-04-24 17:59:49 +000015076"
Victor Stinnere0be4232011-10-25 13:06:09 +020015077if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015078
Martin v. Löwis11437992002-04-12 09:54:03 +000015079else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015080
Matthias Kloseb9621712010-04-24 17:59:49 +000015081$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015082
15083fi
15084
Michael W. Hudson54241132001-12-07 15:38:26 +000015085
Matthias Kloseb9621712010-04-24 17:59:49 +000015086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15087$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015088if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015089 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015090else
Matthias Kloseb9621712010-04-24 17:59:49 +000015091 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015092 ac_cv_broken_mbstowcs=no
15093else
Matthias Kloseb9621712010-04-24 17:59:49 +000015094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015095/* end confdefs.h. */
15096
Stefan Krah19c21392012-11-22 23:47:32 +010015097#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015098#include<stdlib.h>
15099int main() {
15100 size_t len = -1;
15101 const char *str = "text";
15102 len = mbstowcs(NULL, str, 0);
15103 return (len != 4);
15104}
15105
15106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015107if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015108 ac_cv_broken_mbstowcs=no
15109else
Matthias Kloseb9621712010-04-24 17:59:49 +000015110 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15113 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015114fi
15115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015116fi
15117
Matthias Kloseb9621712010-04-24 17:59:49 +000015118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15119$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015120if test "$ac_cv_broken_mbstowcs" = yes
15121then
15122
Matthias Kloseb9621712010-04-24 17:59:49 +000015123$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015124
15125fi
15126
Antoine Pitroub52ec782009-01-25 16:34:23 +000015127# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15129$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015130
15131# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015132if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015133 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015134if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015135then
15136
Matthias Kloseb9621712010-04-24 17:59:49 +000015137$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015138
Matthias Kloseb9621712010-04-24 17:59:49 +000015139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15140$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015141fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015142if test "$withval" = no
15143then
15144
15145$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15146
Matthias Kloseb9621712010-04-24 17:59:49 +000015147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15148$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015149fi
15150
Antoine Pitrou042b1282010-08-13 21:15:58 +000015151else
15152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15153$as_echo "no value specified" >&6; }
15154fi
15155
Antoine Pitroub52ec782009-01-25 16:34:23 +000015156
Matthias Kloseb17289e2012-03-15 19:51:34 +010015157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15158$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15159if ${ac_cv_computed_gotos+:} false; then :
15160 $as_echo_n "(cached) " >&6
15161else
15162 if test "$cross_compiling" = yes; then :
15163 if test "${with_computed_gotos+set}" = set; then
15164 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15165 else
15166 ac_cv_computed_gotos=no
15167 fi
15168else
15169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15170/* end confdefs.h. */
15171
15172int main(int argc, char **argv)
15173{
15174 static void *targets[1] = { &&LABEL1 };
15175 goto LABEL2;
15176LABEL1:
15177 return 0;
15178LABEL2:
15179 goto *targets[0];
15180 return 1;
15181}
15182
15183_ACEOF
15184if ac_fn_c_try_run "$LINENO"; then :
15185 ac_cv_computed_gotos=yes
15186else
15187 ac_cv_computed_gotos=no
15188fi
15189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15190 conftest.$ac_objext conftest.beam conftest.$ac_ext
15191fi
15192
15193fi
15194
15195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15196$as_echo "$ac_cv_computed_gotos" >&6; }
15197case "$ac_cv_computed_gotos" in yes*)
15198
15199$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15200
15201esac
15202
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015203case $ac_sys_system in
15204AIX*)
15205
15206$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15207 ;;
15208esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015209
Michael W. Hudson54241132001-12-07 15:38:26 +000015210
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015211
15212
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015213for h in `(cd $srcdir;echo Python/thread_*.h)`
15214do
15215 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15216done
15217
Michael W. Hudson54241132001-12-07 15:38:26 +000015218
Neal Norwitzd24499d2005-12-18 21:36:39 +000015219SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15221$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015222for dir in $SRCDIRS; do
15223 if test ! -d $dir; then
15224 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015225 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015226done
Matthias Kloseb9621712010-04-24 17:59:49 +000015227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15228$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015229
Stefan Krah1919b7e2012-03-21 18:25:23 +010015230# Availability of -O2:
15231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15232$as_echo_n "checking for -O2... " >&6; }
15233saved_cflags="$CFLAGS"
15234CFLAGS="-O2"
15235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15236/* end confdefs.h. */
15237
15238int
15239main ()
15240{
15241
15242
15243 ;
15244 return 0;
15245}
15246_ACEOF
15247if ac_fn_c_try_compile "$LINENO"; then :
15248 have_O2=yes
15249else
15250 have_O2=no
15251fi
15252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15254$as_echo "$have_O2" >&6; }
15255CFLAGS="$saved_cflags"
15256
15257# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15258# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15260$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15261saved_cflags="$CFLAGS"
15262CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15263if test "$have_O2" = no; then
15264 CFLAGS=""
15265fi
15266if test "$cross_compiling" = yes; then :
15267 have_glibc_memmove_bug=undefined
15268else
15269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15270/* end confdefs.h. */
15271
15272#include <stdio.h>
15273#include <stdlib.h>
15274#include <string.h>
15275void foo(void *p, void *q) { memmove(p, q, 19); }
15276int main() {
15277 char a[32] = "123456789000000000";
15278 foo(&a[9], a);
15279 if (strcmp(a, "123456789123456789000000000") != 0)
15280 return 1;
15281 foo(a, &a[9]);
15282 if (strcmp(a, "123456789000000000") != 0)
15283 return 1;
15284 return 0;
15285}
15286
15287_ACEOF
15288if ac_fn_c_try_run "$LINENO"; then :
15289 have_glibc_memmove_bug=no
15290else
15291 have_glibc_memmove_bug=yes
15292fi
15293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15294 conftest.$ac_objext conftest.beam conftest.$ac_ext
15295fi
15296
15297CFLAGS="$saved_cflags"
15298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15299$as_echo "$have_glibc_memmove_bug" >&6; }
15300if test "$have_glibc_memmove_bug" = yes; then
15301
15302$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15303
15304fi
15305
15306if test "$have_gcc_asm_for_x87" = yes; then
15307 # Some versions of gcc miscompile inline asm:
15308 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15309 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15310 case $CC in
15311 *gcc*)
15312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15313$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15314 saved_cflags="$CFLAGS"
15315 CFLAGS="-O2"
15316 if test "$cross_compiling" = yes; then :
15317 have_ipa_pure_const_bug=undefined
15318else
15319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15320/* end confdefs.h. */
15321
15322 __attribute__((noinline)) int
15323 foo(int *p) {
15324 int r;
15325 asm ( "movl \$6, (%1)\n\t"
15326 "xorl %0, %0\n\t"
15327 : "=r" (r) : "r" (p) : "memory"
15328 );
15329 return r;
15330 }
15331 int main() {
15332 int p = 8;
15333 if ((foo(&p) ? : p) != 6)
15334 return 1;
15335 return 0;
15336 }
15337
15338_ACEOF
15339if ac_fn_c_try_run "$LINENO"; then :
15340 have_ipa_pure_const_bug=no
15341else
15342 have_ipa_pure_const_bug=yes
15343fi
15344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15345 conftest.$ac_objext conftest.beam conftest.$ac_ext
15346fi
15347
15348 CFLAGS="$saved_cflags"
15349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15350$as_echo "$have_ipa_pure_const_bug" >&6; }
15351 if test "$have_ipa_pure_const_bug" = yes; then
15352
15353$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15354
15355 fi
15356 ;;
15357 esac
15358fi
15359
Ned Deily322f5ba2013-11-21 23:01:59 -080015360# ensurepip option
15361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15362$as_echo_n "checking for ensurepip... " >&6; }
15363
15364# Check whether --with-ensurepip was given.
15365if test "${with_ensurepip+set}" = set; then :
15366 withval=$with_ensurepip;
15367else
15368 with_ensurepip=upgrade
15369fi
15370
15371case $with_ensurepip in #(
15372 yes|upgrade) :
15373 ENSUREPIP=upgrade ;; #(
15374 install) :
15375 ENSUREPIP=install ;; #(
15376 no) :
15377 ENSUREPIP=no ;; #(
15378 *) :
15379 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15380esac
15381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15382$as_echo "$ENSUREPIP" >&6; }
15383
15384
Guido van Rossum627b2d71993-12-24 10:39:16 +000015385# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015386ac_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 +000015387
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015388ac_config_files="$ac_config_files Modules/ld_so_aix"
15389
Martin v. Löwis11437992002-04-12 09:54:03 +000015390cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015391# This file is a shell script that caches the results of configure
15392# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015393# scripts and configure runs, see configure's option --config-cache.
15394# It is not useful on other systems. If it contains results you don't
15395# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015396#
Martin v. Löwis11437992002-04-12 09:54:03 +000015397# config.status only pays attention to the cache file if you give it
15398# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015399#
Skip Montanaro6dead952003-09-25 14:50:04 +000015400# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015401# loading this file, other *unset* `ac_cv_foo' will be assigned the
15402# following values.
15403
15404_ACEOF
15405
Guido van Rossumf78abae1997-01-21 22:02:36 +000015406# The following way of writing the cache mishandles newlines in values,
15407# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015408# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015409# Ultrix sh set writes to stderr and can't be redirected directly,
15410# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015411(
15412 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15413 eval ac_val=\$$ac_var
15414 case $ac_val in #(
15415 *${as_nl}*)
15416 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15418$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015419 esac
15420 case $ac_var in #(
15421 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15423 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015424 esac ;;
15425 esac
15426 done
15427
Martin v. Löwis11437992002-04-12 09:54:03 +000015428 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015429 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15430 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015431 # `set' does not quote correctly, so add quotes: double-quote
15432 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015434 "s/'/'\\\\''/g;
15435 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015436 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 *)
15438 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015439 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015441 esac |
15442 sort
15443) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015444 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015445 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015446 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015448 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15449 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015450 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15451 :end' >>confcache
15452if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15453 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015454 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015455 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15456$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015457 if test ! -f "$cache_file" || test -h "$cache_file"; then
15458 cat confcache >"$cache_file"
15459 else
15460 case $cache_file in #(
15461 */* | ?:*)
15462 mv -f confcache "$cache_file"$$ &&
15463 mv -f "$cache_file"$$ "$cache_file" ;; #(
15464 *)
15465 mv -f confcache "$cache_file" ;;
15466 esac
15467 fi
15468 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015469 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015470 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15471$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015472 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015473fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015474rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015475
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015476test "x$prefix" = xNONE && prefix=$ac_default_prefix
15477# Let make expand exec_prefix.
15478test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015479
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015480DEFS=-DHAVE_CONFIG_H
15481
Skip Montanaro6dead952003-09-25 14:50:04 +000015482ac_libobjs=
15483ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015484U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015485for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15486 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015487 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015489 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15490 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15492 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015493done
15494LIBOBJS=$ac_libobjs
15495
15496LTLIBOBJS=$ac_ltlibobjs
15497
15498
Martin v. Löwis11437992002-04-12 09:54:03 +000015499
Matthias Kloseb9621712010-04-24 17:59:49 +000015500
Victor Stinnere0be4232011-10-25 13:06:09 +020015501: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015502ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015503ac_clean_files_save=$ac_clean_files
15504ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015505{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15506$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15507as_write_fail=0
15508cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015509#! $SHELL
15510# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015511# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015512# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015513# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015514
Martin v. Löwis11437992002-04-12 09:54:03 +000015515debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015516ac_cs_recheck=false
15517ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015518
Matthias Kloseb9621712010-04-24 17:59:49 +000015519SHELL=\${CONFIG_SHELL-$SHELL}
15520export SHELL
15521_ASEOF
15522cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15523## -------------------- ##
15524## M4sh Initialization. ##
15525## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015527# Be more Bourne compatible
15528DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015529if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015530 emulate sh
15531 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015533 # is contrary to our usage. Disable this feature.
15534 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015536else
Matthias Kloseb9621712010-04-24 17:59:49 +000015537 case `(set -o) 2>/dev/null` in #(
15538 *posix*) :
15539 set -o posix ;; #(
15540 *) :
15541 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015542esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015543fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015544
15545
Matthias Kloseb9621712010-04-24 17:59:49 +000015546as_nl='
15547'
15548export as_nl
15549# Printing a long string crashes Solaris 7 /usr/bin/printf.
15550as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15551as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15552as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15553# Prefer a ksh shell builtin over an external printf program on Solaris,
15554# but without wasting forks for bash or zsh.
15555if test -z "$BASH_VERSION$ZSH_VERSION" \
15556 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15557 as_echo='print -r --'
15558 as_echo_n='print -rn --'
15559elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15560 as_echo='printf %s\n'
15561 as_echo_n='printf %s'
15562else
15563 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15564 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15565 as_echo_n='/usr/ucb/echo -n'
15566 else
15567 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15568 as_echo_n_body='eval
15569 arg=$1;
15570 case $arg in #(
15571 *"$as_nl"*)
15572 expr "X$arg" : "X\\(.*\\)$as_nl";
15573 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15574 esac;
15575 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15576 '
15577 export as_echo_n_body
15578 as_echo_n='sh -c $as_echo_n_body as_echo'
15579 fi
15580 export as_echo_body
15581 as_echo='sh -c $as_echo_body as_echo'
15582fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015583
15584# The user is always right.
15585if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015586 PATH_SEPARATOR=:
15587 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15588 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15589 PATH_SEPARATOR=';'
15590 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015593
15594# IFS
15595# We need space, tab and new line, in precisely that order. Quoting is
15596# there to prevent editors from complaining about space-tab.
15597# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15598# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015599IFS=" "" $as_nl"
15600
15601# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015602as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015603case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015604 *[\\/]* ) as_myself=$0 ;;
15605 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015606for as_dir in $PATH
15607do
15608 IFS=$as_save_IFS
15609 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015610 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15611 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015612IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614 ;;
15615esac
15616# We did not find ourselves, most probably we were run as `sh COMMAND'
15617# in which case we are not to be found in the path.
15618if test "x$as_myself" = x; then
15619 as_myself=$0
15620fi
15621if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015622 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15623 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624fi
15625
Matthias Kloseb9621712010-04-24 17:59:49 +000015626# Unset variables that we do not need and which cause bugs (e.g. in
15627# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15628# suppresses any "Segmentation fault" message there. '((' could
15629# trigger a bug in pdksh 5.2.14.
15630for as_var in BASH_ENV ENV MAIL MAILPATH
15631do eval test x\${$as_var+set} = xset \
15632 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633done
15634PS1='$ '
15635PS2='> '
15636PS4='+ '
15637
15638# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015639LC_ALL=C
15640export LC_ALL
15641LANGUAGE=C
15642export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015643
Matthias Kloseb9621712010-04-24 17:59:49 +000015644# CDPATH.
15645(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15646
15647
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015648# as_fn_error STATUS ERROR [LINENO LOG_FD]
15649# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015650# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15651# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015652# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015653as_fn_error ()
15654{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015655 as_status=$1; test $as_status -eq 0 && as_status=1
15656 if test "$4"; then
15657 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15658 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015659 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015660 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015661 as_fn_exit $as_status
15662} # as_fn_error
15663
15664
15665# as_fn_set_status STATUS
15666# -----------------------
15667# Set $? to STATUS, without forking.
15668as_fn_set_status ()
15669{
15670 return $1
15671} # as_fn_set_status
15672
15673# as_fn_exit STATUS
15674# -----------------
15675# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15676as_fn_exit ()
15677{
15678 set +e
15679 as_fn_set_status $1
15680 exit $1
15681} # as_fn_exit
15682
15683# as_fn_unset VAR
15684# ---------------
15685# Portably unset VAR.
15686as_fn_unset ()
15687{
15688 { eval $1=; unset $1;}
15689}
15690as_unset=as_fn_unset
15691# as_fn_append VAR VALUE
15692# ----------------------
15693# Append the text in VALUE to the end of the definition contained in VAR. Take
15694# advantage of any shell optimizations that allow amortized linear growth over
15695# repeated appends, instead of the typical quadratic growth present in naive
15696# implementations.
15697if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15698 eval 'as_fn_append ()
15699 {
15700 eval $1+=\$2
15701 }'
15702else
15703 as_fn_append ()
15704 {
15705 eval $1=\$$1\$2
15706 }
15707fi # as_fn_append
15708
15709# as_fn_arith ARG...
15710# ------------------
15711# Perform arithmetic evaluation on the ARGs, and store the result in the
15712# global $as_val. Take advantage of shells that can avoid forks. The arguments
15713# must be portable across $(()) and expr.
15714if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15715 eval 'as_fn_arith ()
15716 {
15717 as_val=$(( $* ))
15718 }'
15719else
15720 as_fn_arith ()
15721 {
15722 as_val=`expr "$@" || test $? -eq 1`
15723 }
15724fi # as_fn_arith
15725
15726
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015727if expr a : '\(a\)' >/dev/null 2>&1 &&
15728 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15729 as_expr=expr
15730else
15731 as_expr=false
15732fi
15733
15734if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15735 as_basename=basename
15736else
15737 as_basename=false
15738fi
15739
Matthias Kloseb9621712010-04-24 17:59:49 +000015740if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15741 as_dirname=dirname
15742else
15743 as_dirname=false
15744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015746as_me=`$as_basename -- "$0" ||
15747$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15748 X"$0" : 'X\(//\)$' \| \
15749 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015750$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015751 sed '/^.*\/\([^/][^/]*\)\/*$/{
15752 s//\1/
15753 q
15754 }
15755 /^X\/\(\/\/\)$/{
15756 s//\1/
15757 q
15758 }
15759 /^X\/\(\/\).*/{
15760 s//\1/
15761 q
15762 }
15763 s/.*/./; q'`
15764
Matthias Kloseb9621712010-04-24 17:59:49 +000015765# Avoid depending upon Character Ranges.
15766as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15767as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15768as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15769as_cr_digits='0123456789'
15770as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015771
15772ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015773case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015775 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015776 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015777 xy) ECHO_C='\c';;
15778 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15779 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015780 esac;;
15781*)
15782 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015783esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015784
Martin v. Löwis11437992002-04-12 09:54:03 +000015785rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015786if test -d conf$$.dir; then
15787 rm -f conf$$.dir/conf$$.file
15788else
15789 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015790 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015792if (echo >conf$$.file) 2>/dev/null; then
15793 if ln -s conf$$.file conf$$ 2>/dev/null; then
15794 as_ln_s='ln -s'
15795 # ... but there are two gotchas:
15796 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15797 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015798 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015799 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015800 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015801 elif ln conf$$.file conf$$ 2>/dev/null; then
15802 as_ln_s=ln
15803 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015804 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015806else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015807 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15810rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015811
Matthias Kloseb9621712010-04-24 17:59:49 +000015812
15813# as_fn_mkdir_p
15814# -------------
15815# Create "$as_dir" as a directory, including parents if necessary.
15816as_fn_mkdir_p ()
15817{
15818
15819 case $as_dir in #(
15820 -*) as_dir=./$as_dir;;
15821 esac
15822 test -d "$as_dir" || eval $as_mkdir_p || {
15823 as_dirs=
15824 while :; do
15825 case $as_dir in #(
15826 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15827 *) as_qdir=$as_dir;;
15828 esac
15829 as_dirs="'$as_qdir' $as_dirs"
15830 as_dir=`$as_dirname -- "$as_dir" ||
15831$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15832 X"$as_dir" : 'X\(//\)[^/]' \| \
15833 X"$as_dir" : 'X\(//\)$' \| \
15834 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15835$as_echo X"$as_dir" |
15836 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15837 s//\1/
15838 q
15839 }
15840 /^X\(\/\/\)[^/].*/{
15841 s//\1/
15842 q
15843 }
15844 /^X\(\/\/\)$/{
15845 s//\1/
15846 q
15847 }
15848 /^X\(\/\).*/{
15849 s//\1/
15850 q
15851 }
15852 s/.*/./; q'`
15853 test -d "$as_dir" && break
15854 done
15855 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015856 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015857
15858
15859} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015860if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015861 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015862else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015863 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015864 as_mkdir_p=false
15865fi
15866
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015867
15868# as_fn_executable_p FILE
15869# -----------------------
15870# Test if FILE is an executable regular file.
15871as_fn_executable_p ()
15872{
15873 test -f "$1" && test -x "$1"
15874} # as_fn_executable_p
15875as_test_x='test -x'
15876as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015877
15878# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015879as_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 +000015880
15881# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015882as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015883
15884
Martin v. Löwis11437992002-04-12 09:54:03 +000015885exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015886## ----------------------------------- ##
15887## Main body of $CONFIG_STATUS script. ##
15888## ----------------------------------- ##
15889_ASEOF
15890test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015891
Matthias Kloseb9621712010-04-24 17:59:49 +000015892cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15893# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015894# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015895# values after options handling.
15896ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015897This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015898generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015899
15900 CONFIG_FILES = $CONFIG_FILES
15901 CONFIG_HEADERS = $CONFIG_HEADERS
15902 CONFIG_LINKS = $CONFIG_LINKS
15903 CONFIG_COMMANDS = $CONFIG_COMMANDS
15904 $ $0 $@
15905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015906on `(hostname || uname -n) 2>/dev/null | sed 1q`
15907"
15908
Martin v. Löwis11437992002-04-12 09:54:03 +000015909_ACEOF
15910
Matthias Kloseb9621712010-04-24 17:59:49 +000015911case $ac_config_files in *"
15912"*) set x $ac_config_files; shift; ac_config_files=$*;;
15913esac
15914
15915case $ac_config_headers in *"
15916"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15917esac
15918
15919
15920cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015921# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015922config_files="$ac_config_files"
15923config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015925_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015926
Matthias Kloseb9621712010-04-24 17:59:49 +000015927cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015928ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015929\`$as_me' instantiates files and other configuration actions
15930from templates according to the current configuration. Unless the files
15931and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015932
Matthias Kloseb9621712010-04-24 17:59:49 +000015933Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015934
15935 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015936 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015937 --config print configuration, then exit
15938 -q, --quiet, --silent
15939 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 -d, --debug don't remove temporary files
15941 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015942 --file=FILE[:TEMPLATE]
15943 instantiate the configuration file FILE
15944 --header=FILE[:TEMPLATE]
15945 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015946
15947Configuration files:
15948$config_files
15949
15950Configuration headers:
15951$config_headers
15952
Matthias Kloseb9621712010-04-24 17:59:49 +000015953Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015956cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15957ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015958ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015959python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015960configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015961 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015962
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015963Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015964This config.status script is free software; the Free Software Foundation
15965gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966
15967ac_pwd='$ac_pwd'
15968srcdir='$srcdir'
15969INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015970MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015971test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015972_ACEOF
15973
Matthias Kloseb9621712010-04-24 17:59:49 +000015974cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15975# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015976ac_need_defaults=:
15977while test $# != 0
15978do
15979 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015980 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015981 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15982 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015983 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015984 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015985 --*=)
15986 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15987 ac_optarg=
15988 ac_shift=:
15989 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015990 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015991 ac_option=$1
15992 ac_optarg=$2
15993 ac_shift=shift
15994 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015995 esac
15996
Skip Montanaro6dead952003-09-25 14:50:04 +000015997 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015998 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015999 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16000 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016001 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016002 $as_echo "$ac_cs_version"; exit ;;
16003 --config | --confi | --conf | --con | --co | --c )
16004 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016005 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016006 debug=: ;;
16007 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016008 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016009 case $ac_optarg in
16010 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016011 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016012 esac
16013 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016014 ac_need_defaults=false;;
16015 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016016 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016017 case $ac_optarg in
16018 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16019 esac
16020 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016022 --he | --h)
16023 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016024 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016025Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016027 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016028 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16029 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16030 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016031
16032 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016033 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016034Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016035
Matthias Kloseb9621712010-04-24 17:59:49 +000016036 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016037 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016038
16039 esac
16040 shift
16041done
16042
Skip Montanaro6dead952003-09-25 14:50:04 +000016043ac_configure_extra_args=
16044
16045if $ac_cs_silent; then
16046 exec 6>/dev/null
16047 ac_configure_extra_args="$ac_configure_extra_args --silent"
16048fi
16049
16050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016051cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016052if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016053 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016054 shift
16055 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16056 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016058 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016059fi
16060
Martin v. Löwis11437992002-04-12 09:54:03 +000016061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016062cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016063exec 5>>config.log
16064{
16065 echo
16066 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16067## Running $as_me. ##
16068_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016069 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016070} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016073cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016074_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016075
Matthias Kloseb9621712010-04-24 17:59:49 +000016076cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016077
16078# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016079for ac_config_target in $ac_config_targets
16080do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016081 case $ac_config_target in
16082 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16083 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16084 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016085 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16086 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016087 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16088 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016089 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016090 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016091 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016092
Victor Stinnere0be4232011-10-25 13:06:09 +020016093 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 esac
16095done
16096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097
Martin v. Löwis11437992002-04-12 09:54:03 +000016098# If the user did not use the arguments to specify the items to instantiate,
16099# then the envvar interface is used. Set only those that are not.
16100# We use the long form for the default assignment because of an extremely
16101# bizarre bug on SunOS 4.1.3.
16102if $ac_need_defaults; then
16103 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16104 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16105fi
16106
Skip Montanaro6dead952003-09-25 14:50:04 +000016107# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016108# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016109# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016110# Hook for its removal unless debugging.
16111# Note that there is a small window in which the directory will not be cleaned:
16112# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016113$debug ||
16114{
Victor Stinnere0be4232011-10-25 13:06:09 +020016115 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016116 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016117 : "${ac_tmp:=$tmp}"
16118 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016120 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016121}
Martin v. Löwis11437992002-04-12 09:54:03 +000016122# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016123
Martin v. Löwis11437992002-04-12 09:54:03 +000016124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016125 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016126 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016127} ||
16128{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129 tmp=./conf$$-$RANDOM
16130 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016131} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016132ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016133
Matthias Kloseb9621712010-04-24 17:59:49 +000016134# Set up the scripts for CONFIG_FILES section.
16135# No need to generate them if there are no CONFIG_FILES.
16136# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016137if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016138
Matthias Kloseb9621712010-04-24 17:59:49 +000016139
16140ac_cr=`echo X | tr X '\015'`
16141# On cygwin, bash can eat \r inside `` if the user requested igncr.
16142# But we know of no other shell where ac_cr would be empty at this
16143# point, so we can use a bashism as a fallback.
16144if test "x$ac_cr" = x; then
16145 eval ac_cr=\$\'\\r\'
16146fi
16147ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16148if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016149 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016150else
16151 ac_cs_awk_cr=$ac_cr
16152fi
16153
Victor Stinnere0be4232011-10-25 13:06:09 +020016154echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016155_ACEOF
16156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157
Matthias Kloseb9621712010-04-24 17:59:49 +000016158{
16159 echo "cat >conf$$subs.awk <<_ACEOF" &&
16160 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16161 echo "_ACEOF"
16162} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016163 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16164ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165ac_delim='%!_!# '
16166for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016167 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016168 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016169
Matthias Kloseb9621712010-04-24 17:59:49 +000016170 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16171 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016172 break
16173 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016174 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016175 else
16176 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016177 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178done
Matthias Kloseb9621712010-04-24 17:59:49 +000016179rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180
Matthias Kloseb9621712010-04-24 17:59:49 +000016181cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016182cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016184sed -n '
16185h
16186s/^/S["/; s/!.*/"]=/
16187p
16188g
16189s/^[^!]*!//
16190:repl
16191t repl
16192s/'"$ac_delim"'$//
16193t delim
16194:nl
16195h
16196s/\(.\{148\}\)..*/\1/
16197t more1
16198s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16199p
16200n
16201b repl
16202:more1
16203s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16204p
16205g
16206s/.\{148\}//
16207t nl
16208:delim
16209h
16210s/\(.\{148\}\)..*/\1/
16211t more2
16212s/["\\]/\\&/g; s/^/"/; s/$/"/
16213p
16214b
16215:more2
16216s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16217p
16218g
16219s/.\{148\}//
16220t delim
16221' <conf$$subs.awk | sed '
16222/^[^""]/{
16223 N
16224 s/\n//
16225}
16226' >>$CONFIG_STATUS || ac_write_fail=1
16227rm -f conf$$subs.awk
16228cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16229_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016230cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016231 for (key in S) S_is_set[key] = 1
16232 FS = ""
16233
16234}
16235{
16236 line = $ 0
16237 nfields = split(line, field, "@")
16238 substed = 0
16239 len = length(field[1])
16240 for (i = 2; i < nfields; i++) {
16241 key = field[i]
16242 keylen = length(key)
16243 if (S_is_set[key]) {
16244 value = S[key]
16245 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16246 len += length(value) + length(field[++i])
16247 substed = 1
16248 } else
16249 len += 1 + keylen
16250 }
16251
16252 print line
16253}
16254
16255_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016257cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16258if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16259 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16260else
16261 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016262fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016263 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016264_ACEOF
16265
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016266# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16267# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016268# trailing colons and then remove the whole line if VPATH becomes empty
16269# (actually we leave an empty line to preserve line numbers).
16270if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016271 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16272h
16273s///
16274s/^/:/
16275s/[ ]*$/:/
16276s/:\$(srcdir):/:/g
16277s/:\${srcdir}:/:/g
16278s/:@srcdir@:/:/g
16279s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016281x
16282s/\(=[ ]*\).*/\1/
16283G
16284s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285s/^[^=]*=[ ]*$//
16286}'
16287fi
16288
Matthias Kloseb9621712010-04-24 17:59:49 +000016289cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016290fi # test -n "$CONFIG_FILES"
16291
Matthias Kloseb9621712010-04-24 17:59:49 +000016292# Set up the scripts for CONFIG_HEADERS section.
16293# No need to generate them if there are no CONFIG_HEADERS.
16294# This happens for instance with `./config.status Makefile'.
16295if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016296cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016297BEGIN {
16298_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299
Matthias Kloseb9621712010-04-24 17:59:49 +000016300# Transform confdefs.h into an awk script `defines.awk', embedded as
16301# here-document in config.status, that substitutes the proper values into
16302# config.h.in to produce config.h.
16303
16304# Create a delimiter string that does not exist in confdefs.h, to ease
16305# handling of long lines.
16306ac_delim='%!_!# '
16307for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016308 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16309 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016310 break
16311 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016312 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016313 else
16314 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16315 fi
16316done
16317
16318# For the awk script, D is an array of macro values keyed by name,
16319# likewise P contains macro parameters if any. Preserve backslash
16320# newline sequences.
16321
16322ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16323sed -n '
16324s/.\{148\}/&'"$ac_delim"'/g
16325t rset
16326:rset
16327s/^[ ]*#[ ]*define[ ][ ]*/ /
16328t def
16329d
16330:def
16331s/\\$//
16332t bsnl
16333s/["\\]/\\&/g
16334s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16335D["\1"]=" \3"/p
16336s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16337d
16338:bsnl
16339s/["\\]/\\&/g
16340s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16341D["\1"]=" \3\\\\\\n"\\/p
16342t cont
16343s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16344t cont
16345d
16346:cont
16347n
16348s/.\{148\}/&'"$ac_delim"'/g
16349t clear
16350:clear
16351s/\\$//
16352t bsnlc
16353s/["\\]/\\&/g; s/^/"/; s/$/"/p
16354d
16355:bsnlc
16356s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16357b cont
16358' <confdefs.h | sed '
16359s/'"$ac_delim"'/"\\\
16360"/g' >>$CONFIG_STATUS || ac_write_fail=1
16361
16362cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16363 for (key in D) D_is_set[key] = 1
16364 FS = ""
16365}
16366/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16367 line = \$ 0
16368 split(line, arg, " ")
16369 if (arg[1] == "#") {
16370 defundef = arg[2]
16371 mac1 = arg[3]
16372 } else {
16373 defundef = substr(arg[1], 2)
16374 mac1 = arg[2]
16375 }
16376 split(mac1, mac2, "(") #)
16377 macro = mac2[1]
16378 prefix = substr(line, 1, index(line, defundef) - 1)
16379 if (D_is_set[macro]) {
16380 # Preserve the white space surrounding the "#".
16381 print prefix "define", macro P[macro] D[macro]
16382 next
16383 } else {
16384 # Replace #undef with comments. This is necessary, for example,
16385 # in the case of _POSIX_SOURCE, which is predefined and required
16386 # on some systems where configure will not decide to define it.
16387 if (defundef == "undef") {
16388 print "/*", prefix defundef, macro, "*/"
16389 next
16390 }
16391 }
16392}
16393{ print }
16394_ACAWK
16395_ACEOF
16396cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016397 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016398fi # test -n "$CONFIG_HEADERS"
16399
16400
16401eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16402shift
16403for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404do
16405 case $ac_tag in
16406 :[FHLC]) ac_mode=$ac_tag; continue;;
16407 esac
16408 case $ac_mode$ac_tag in
16409 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016410 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016411 :[FH]-) ac_tag=-:-;;
16412 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16413 esac
16414 ac_save_IFS=$IFS
16415 IFS=:
16416 set x $ac_tag
16417 IFS=$ac_save_IFS
16418 shift
16419 ac_file=$1
16420 shift
16421
16422 case $ac_mode in
16423 :L) ac_source=$1;;
16424 :[FH])
16425 ac_file_inputs=
16426 for ac_f
16427 do
16428 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016429 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016430 *) # Look for the file first in the build tree, then in the source tree
16431 # (if the path is not absolute). The absolute path cannot be DOS-style,
16432 # because $ac_f cannot contain `:'.
16433 test -f "$ac_f" ||
16434 case $ac_f in
16435 [\\/$]*) false;;
16436 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16437 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016438 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016439 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016440 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16441 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016442 done
16443
16444 # Let's still pretend it is `configure' which instantiates (i.e., don't
16445 # use $as_me), people would be surprised to read:
16446 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016447 configure_input='Generated from '`
16448 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16449 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016450 if test x"$ac_file" != x-; then
16451 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016452 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16453$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016454 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016455 # Neutralize special characters interpreted by sed in replacement strings.
16456 case $configure_input in #(
16457 *\&* | *\|* | *\\* )
16458 ac_sed_conf_input=`$as_echo "$configure_input" |
16459 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16460 *) ac_sed_conf_input=$configure_input;;
16461 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016462
16463 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016464 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16465 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016466 esac
16467 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016468 esac
16469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016470 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016471$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016472 X"$ac_file" : 'X\(//\)[^/]' \| \
16473 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016474 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016475$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016476 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16477 s//\1/
16478 q
16479 }
16480 /^X\(\/\/\)[^/].*/{
16481 s//\1/
16482 q
16483 }
16484 /^X\(\/\/\)$/{
16485 s//\1/
16486 q
16487 }
16488 /^X\(\/\).*/{
16489 s//\1/
16490 q
16491 }
16492 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016493 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016494 ac_builddir=.
16495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016496case "$ac_dir" in
16497.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16498*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016499 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016500 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016501 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016502 case $ac_top_builddir_sub in
16503 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16504 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16505 esac ;;
16506esac
16507ac_abs_top_builddir=$ac_pwd
16508ac_abs_builddir=$ac_pwd$ac_dir_suffix
16509# for backward compatibility:
16510ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016511
16512case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016514 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016515 ac_top_srcdir=$ac_top_builddir_sub
16516 ac_abs_top_srcdir=$ac_pwd ;;
16517 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016518 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016519 ac_top_srcdir=$srcdir
16520 ac_abs_top_srcdir=$srcdir ;;
16521 *) # Relative name.
16522 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16523 ac_top_srcdir=$ac_top_build_prefix$srcdir
16524 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016525esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016526ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016527
Martin v. Löwis11437992002-04-12 09:54:03 +000016528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529 case $ac_mode in
16530 :F)
16531 #
16532 # CONFIG_FILE
16533 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016534
16535 case $INSTALL in
16536 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016537 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016538 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016539 ac_MKDIR_P=$MKDIR_P
16540 case $MKDIR_P in
16541 [\\/$]* | ?:[\\/]* ) ;;
16542 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16543 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016544_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016545
Matthias Kloseb9621712010-04-24 17:59:49 +000016546cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016547# If the template does not know about datarootdir, expand it.
16548# FIXME: This hack should be removed a few years after 2.60.
16549ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016550ac_sed_dataroot='
16551/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552 p
16553 q
16554}
16555/@datadir@/p
16556/@docdir@/p
16557/@infodir@/p
16558/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016559/@mandir@/p'
16560case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561*datarootdir*) ac_datarootdir_seen=yes;;
16562*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016563 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16564$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016566cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016567 ac_datarootdir_hack='
16568 s&@datadir@&$datadir&g
16569 s&@docdir@&$docdir&g
16570 s&@infodir@&$infodir&g
16571 s&@localedir@&$localedir&g
16572 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016573 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016574esac
16575_ACEOF
16576
16577# Neutralize VPATH when `$srcdir' = `.'.
16578# Shell code in configure.ac might set extrasub.
16579# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016580cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16581ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016582$extrasub
16583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016584cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016585:t
16586/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016587s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016589s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590s&@srcdir@&$ac_srcdir&;t t
16591s&@abs_srcdir@&$ac_abs_srcdir&;t t
16592s&@top_srcdir@&$ac_top_srcdir&;t t
16593s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16594s&@builddir@&$ac_builddir&;t t
16595s&@abs_builddir@&$ac_abs_builddir&;t t
16596s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16597s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016598s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016600"
Victor Stinnere0be4232011-10-25 13:06:09 +020016601eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16602 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016604test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016605 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16606 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16607 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016608 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016609which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016610$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016611which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016612
Victor Stinnere0be4232011-10-25 13:06:09 +020016613 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016614 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016615 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16616 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016617 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016618 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016619 ;;
16620 :H)
16621 #
16622 # CONFIG_HEADER
16623 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016624 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016625 {
16626 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016627 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16628 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016629 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016630 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016631 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16632$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016634 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016635 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016636 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016637 fi
16638 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016639 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016640 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016641 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016642 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016643 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645
16646 esac
16647
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016648
16649 case $ac_file$ac_mode in
16650 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16651
16652 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016653done # for ac_tag
16654
Guido van Rossum627b2d71993-12-24 10:39:16 +000016655
Matthias Kloseb9621712010-04-24 17:59:49 +000016656as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016657_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016658ac_clean_files=$ac_clean_files_save
16659
Matthias Kloseb9621712010-04-24 17:59:49 +000016660test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016661 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016662
Martin v. Löwis11437992002-04-12 09:54:03 +000016663
16664# configure is writing to config.log, and then calls config.status.
16665# config.status does its own redirection, appending to config.log.
16666# Unfortunately, on DOS this fails, as config.log is still kept open
16667# by configure, so config.status won't be able to write to it; its
16668# output is simply discarded. So we exec the FD to /dev/null,
16669# effectively closing config.log, so it can be properly (re)opened and
16670# appended to by config.status. When coming back to configure, we
16671# need to make the FD available again.
16672if test "$no_create" != yes; then
16673 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016674 ac_config_status_args=
16675 test "$silent" = yes &&
16676 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016677 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016678 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016679 exec 5>>config.log
16680 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16681 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016682 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016683fi
16684if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16685 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16686$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016687fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016688
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016689
Christian Heimes75ed8902013-11-20 01:11:18 +010016690echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016691if test ! -f Modules/Setup
16692then
16693 cp $srcdir/Modules/Setup.dist Modules/Setup
16694fi
16695
Christian Heimes75ed8902013-11-20 01:11:18 +010016696echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016697if test ! -f Modules/Setup.local
16698then
16699 echo "# Edit this file for local setup changes" >Modules/Setup.local
16700fi
16701
Christian Heimes75ed8902013-11-20 01:11:18 +010016702echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016703$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16704 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016705 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016706mv config.c Modules