blob: c46fc267bebf942418182d5f05b461f15dfc168f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003# Generated by GNU Autoconf 2.69 for python 3.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Larry Hastingsf5002bd2014-03-16 23:05:59 -0700583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700661SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
665BASECFLAGS
666OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000667ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100669MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000670INSTALL_DATA
671INSTALL_SCRIPT
672INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530673OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200674PYTHON
675ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200676ac_ct_READELF
677READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000678ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200679ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000680AR
681RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000682USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000683GNULD
684LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000685LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000686RUNSHARED
687INSTSONAME
688LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000689PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000690BLDLIBRARY
691DLLLIBRARY
692LDLIBRARY
693LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100694MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000695BUILDEXEEXT
696EGREP
697GREP
698CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200699NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000701MAINCC
702CXX
703OBJEXT
704EXEEXT
705ac_ct_CC
706CPPFLAGS
707LDFLAGS
708CFLAGS
709CC
710EXPORT_MACOSX_DEPLOYMENT_TARGET
711CONFIGURE_MACOSX_DEPLOYMENT_TARGET
712SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200713_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000715FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800717FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000718FRAMEWORKALTINSTALLLAST
719FRAMEWORKALTINSTALLFIRST
720FRAMEWORKINSTALLLAST
721FRAMEWORKINSTALLFIRST
722PYTHONFRAMEWORKINSTALLDIR
723PYTHONFRAMEWORKPREFIX
724PYTHONFRAMEWORKDIR
725PYTHONFRAMEWORKIDENTIFIER
726PYTHONFRAMEWORK
727LIPO_32BIT_FLAGS
728ARCH_RUN_32BIT
729UNIVERSALSDK
730CONFIG_ARGS
731SOVERSION
732VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100734host_os
735host_vendor
736host_cpu
737host
738build_os
739build_vendor
740build_cpu
741build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500742HAS_HG
743HGBRANCH
744HGTAG
745HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400746BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000747target_alias
748host_alias
749build_alias
750LIBS
751ECHO_T
752ECHO_N
753ECHO_C
754DEFS
755mandir
756localedir
757libdir
758psdir
759pdfdir
760dvidir
761htmldir
762infodir
763docdir
764oldincludedir
765includedir
766localstatedir
767sharedstatedir
768sysconfdir
769datadir
770datarootdir
771libexecdir
772sbindir
773bindir
774program_transform_name
775prefix
776exec_prefix
777PACKAGE_URL
778PACKAGE_BUGREPORT
779PACKAGE_STRING
780PACKAGE_VERSION
781PACKAGE_TARNAME
782PACKAGE_NAME
783PATH_SEPARATOR
784SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000785ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000786ac_user_opts='
787enable_option_checking
788enable_universalsdk
789with_universal_archs
790with_framework_name
791enable_framework
792with_gcc
793with_cxx_main
794with_suffix
795enable_shared
796enable_profiling
797with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100798with_hash_algorithm
Matthias Kloseb9621712010-04-24 17:59:49 +0000799with_libs
800with_system_expat
801with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100802with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000803enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700804with_tcltk_includes
805with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000806with_dbmliborder
807with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_threads
809with_thread
810enable_ipv6
811with_doc_strings
812with_tsc
813with_pymalloc
814with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_fpectl
816with_libm
817with_libc
818enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000819with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800820with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000821'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822 ac_precious_vars='build_alias
823host_alias
824target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100825MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826CC
827CFLAGS
828LDFLAGS
829LIBS
830CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200831CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832
Guido van Rossum627b2d71993-12-24 10:39:16 +0000833
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000835ac_init_help=
836ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000837ac_unrecognized_opts=
838ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839# The variables have the same names as the options, with
840# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000841cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000842exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844no_recursion=
845prefix=NONE
846program_prefix=NONE
847program_suffix=NONE
848program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853x_includes=NONE
854x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000855
856# Installation directory options.
857# These are left unexpanded so users can "make install exec_prefix=/foo"
858# and all the variables that are supposed to be based on exec_prefix
859# by default will actually change.
860# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862bindir='${exec_prefix}/bin'
863sbindir='${exec_prefix}/sbin'
864libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865datarootdir='${prefix}/share'
866datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867sysconfdir='${prefix}/etc'
868sharedstatedir='${prefix}/com'
869localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870includedir='${prefix}/include'
871oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
873infodir='${datarootdir}/info'
874htmldir='${docdir}'
875dvidir='${docdir}'
876pdfdir='${docdir}'
877psdir='${docdir}'
878libdir='${exec_prefix}/lib'
879localedir='${datarootdir}/locale'
880mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000885do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886 # If the previous option needs an argument, assign it.
887 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889 ac_prev=
890 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000891 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200894 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
895 *=) ac_optarg= ;;
896 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899 # Accept the important Cygnus configure options, so we can diagnose typos.
900
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901 case $ac_dashdash$ac_option in
902 --)
903 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905 -bindir | --bindir | --bindi | --bind | --bin | --bi)
906 ac_prev=bindir ;;
907 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909
910 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 -cache-file | --cache-file | --cache-fil | --cache-fi \
916 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
917 ac_prev=cache_file ;;
918 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
919 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 cache_file=$ac_optarg ;;
921
922 --config-cache | -C)
923 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
931 | --dataroo | --dataro | --datar)
932 ac_prev=datarootdir ;;
933 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
934 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
935 datarootdir=$ac_optarg ;;
936
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000938 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000940 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200941 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000942 ac_useropt_orig=$ac_useropt
943 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
944 case $ac_user_opts in
945 *"
946"enable_$ac_useropt"
947"*) ;;
948 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
949 ac_unrecognized_sep=', ';;
950 esac
951 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952
953 -docdir | --docdir | --docdi | --doc | --do)
954 ac_prev=docdir ;;
955 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
956 docdir=$ac_optarg ;;
957
958 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
959 ac_prev=dvidir ;;
960 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
961 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
963 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000965 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200967 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt_orig=$ac_useropt
969 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
970 case $ac_user_opts in
971 *"
972"enable_$ac_useropt"
973"*) ;;
974 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
975 ac_unrecognized_sep=', ';;
976 esac
977 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
980 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
981 | --exec | --exe | --ex)
982 ac_prev=exec_prefix ;;
983 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
984 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
985 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Obsolete; use --with-gas.
990 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 -help | --help | --hel | --he | -h)
993 ac_init_help=long ;;
994 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
995 ac_init_help=recursive ;;
996 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
997 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
999 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001000 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001004 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1005 ac_prev=htmldir ;;
1006 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1007 | --ht=*)
1008 htmldir=$ac_optarg ;;
1009
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010 -includedir | --includedir | --includedi | --included | --include \
1011 | --includ | --inclu | --incl | --inc)
1012 ac_prev=includedir ;;
1013 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1014 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -infodir | --infodir | --infodi | --infod | --info | --inf)
1018 ac_prev=infodir ;;
1019 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -libdir | --libdir | --libdi | --libd)
1023 ac_prev=libdir ;;
1024 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1028 | --libexe | --libex | --libe)
1029 ac_prev=libexecdir ;;
1030 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1031 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -localedir | --localedir | --localedi | --localed | --locale)
1035 ac_prev=localedir ;;
1036 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1037 localedir=$ac_optarg ;;
1038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001040 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 ac_prev=localstatedir ;;
1042 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001043 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1047 ac_prev=mandir ;;
1048 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052 # Obsolete; use --without-fp.
1053 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054
1055 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 no_create=yes ;;
1058
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001059 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1060 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1061 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1064 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1065 | --oldin | --oldi | --old | --ol | --o)
1066 ac_prev=oldincludedir ;;
1067 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1068 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1069 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1073 ac_prev=prefix ;;
1074 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1078 | --program-pre | --program-pr | --program-p)
1079 ac_prev=program_prefix ;;
1080 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1081 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1085 | --program-suf | --program-su | --program-s)
1086 ac_prev=program_suffix ;;
1087 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1088 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -program-transform-name | --program-transform-name \
1092 | --program-transform-nam | --program-transform-na \
1093 | --program-transform-n | --program-transform- \
1094 | --program-transform | --program-transfor \
1095 | --program-transfo | --program-transf \
1096 | --program-trans | --program-tran \
1097 | --progr-tra | --program-tr | --program-t)
1098 ac_prev=program_transform_name ;;
1099 -program-transform-name=* | --program-transform-name=* \
1100 | --program-transform-nam=* | --program-transform-na=* \
1101 | --program-transform-n=* | --program-transform-=* \
1102 | --program-transform=* | --program-transfor=* \
1103 | --program-transfo=* | --program-transf=* \
1104 | --program-trans=* | --program-tran=* \
1105 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001108 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1109 ac_prev=pdfdir ;;
1110 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1111 pdfdir=$ac_optarg ;;
1112
1113 -psdir | --psdir | --psdi | --psd | --ps)
1114 ac_prev=psdir ;;
1115 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1116 psdir=$ac_optarg ;;
1117
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1119 | -silent | --silent | --silen | --sile | --sil)
1120 silent=yes ;;
1121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1123 ac_prev=sbindir ;;
1124 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1125 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001127
1128 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1129 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1130 | --sharedst | --shareds | --shared | --share | --shar \
1131 | --sha | --sh)
1132 ac_prev=sharedstatedir ;;
1133 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1134 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1135 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1136 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001138
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139 -site | --site | --sit)
1140 ac_prev=site ;;
1141 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001143
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1145 ac_prev=srcdir ;;
1146 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1150 | --syscon | --sysco | --sysc | --sys | --sy)
1151 ac_prev=sysconfdir ;;
1152 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1153 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160
1161 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1162 verbose=yes ;;
1163
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 -version | --version | --versio | --versi | --vers | -V)
1165 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
1167 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001171 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 ac_useropt_orig=$ac_useropt
1173 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1174 case $ac_user_opts in
1175 *"
1176"with_$ac_useropt"
1177"*) ;;
1178 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1179 ac_unrecognized_sep=', ';;
1180 esac
1181 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
1183 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001187 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 ac_useropt_orig=$ac_useropt
1189 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1190 case $ac_user_opts in
1191 *"
1192"with_$ac_useropt"
1193"*) ;;
1194 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1195 ac_unrecognized_sep=', ';;
1196 esac
1197 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 --x)
1200 # Obsolete; use --with-x.
1201 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
1203 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1204 | --x-incl | --x-inc | --x-in | --x-i)
1205 ac_prev=x_includes ;;
1206 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1207 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1211 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1212 ac_prev=x_libraries ;;
1213 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1214 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1218Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219 ;;
1220
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 *=*)
1222 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1223 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 case $ac_envvar in #(
1225 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001228 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 export $ac_envvar ;;
1230
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001231 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001233 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001236 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237 ;;
1238
1239 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240done
1241
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245fi
1246
Matthias Kloseb9621712010-04-24 17:59:49 +00001247if test -n "$ac_unrecognized_opts"; then
1248 case $enable_option_checking in
1249 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001250 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1252 esac
1253fi
1254
1255# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1257 datadir sysconfdir sharedstatedir localstatedir includedir \
1258 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1259 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001260do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 # Remove trailing slashes.
1263 case $ac_val in
1264 */ )
1265 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1266 eval $ac_var=\$ac_val;;
1267 esac
1268 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270 [\\/$]* | ?:[\\/]* ) continue;;
1271 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001274done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276# There might be people who depend on the old broken behavior: `$host'
1277# used to hold the argument of --host etc.
1278# FIXME: To remove some day.
1279build=$build_alias
1280host=$host_alias
1281target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282
Martin v. Löwis11437992002-04-12 09:54:03 +00001283# FIXME: To remove some day.
1284if test "x$host_alias" != x; then
1285 if test "x$build_alias" = x; then
1286 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 elif test "x$build_alias" != "x$host_alias"; then
1288 cross_compiling=yes
1289 fi
1290fi
1291
1292ac_tool_prefix=
1293test -n "$host_alias" && ac_tool_prefix=$host_alias-
1294
1295test "$silent" = yes && exec 6>/dev/null
1296
Guido van Rossum627b2d71993-12-24 10:39:16 +00001297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298ac_pwd=`pwd` && test -n "$ac_pwd" &&
1299ac_ls_di=`ls -di .` &&
1300ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304
1305
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306# Find the source files, if location was not specified.
1307if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001308 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001310 ac_confdir=`$as_dirname -- "$as_myself" ||
1311$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1312 X"$as_myself" : 'X\(//\)[^/]' \| \
1313 X"$as_myself" : 'X\(//\)$' \| \
1314 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1315$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1317 s//\1/
1318 q
1319 }
1320 /^X\(\/\/\)[^/].*/{
1321 s//\1/
1322 q
1323 }
1324 /^X\(\/\/\)$/{
1325 s//\1/
1326 q
1327 }
1328 /^X\(\/\).*/{
1329 s//\1/
1330 q
1331 }
1332 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335 srcdir=..
1336 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001337else
1338 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340if test ! -r "$srcdir/$ac_unique_file"; then
1341 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1345ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001346 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 pwd)`
1348# When building in place, set srcdir=.
1349if test "$ac_abs_confdir" = "$ac_pwd"; then
1350 srcdir=.
1351fi
1352# Remove unnecessary trailing slashes from srcdir.
1353# Double slashes in file names in object file debugging info
1354# mess up M-x gdb in Emacs.
1355case $srcdir in
1356*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1357esac
1358for ac_var in $ac_precious_vars; do
1359 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1360 eval ac_env_${ac_var}_value=\$${ac_var}
1361 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1362 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1363done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364
Martin v. Löwis11437992002-04-12 09:54:03 +00001365#
1366# Report the --help message.
1367#
1368if test "$ac_init_help" = "long"; then
1369 # Omit some internal or obsolete options to make the list less imposing.
1370 # This message is too long to be a string in the A/UX 3.1 sh.
1371 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001372\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001373
1374Usage: $0 [OPTION]... [VAR=VALUE]...
1375
1376To assign environment variables (e.g., CC, CFLAGS...), specify them as
1377VAR=VALUE. See below for descriptions of some of the useful variables.
1378
1379Defaults for the options are specified in brackets.
1380
1381Configuration:
1382 -h, --help display this help and exit
1383 --help=short display options specific to this package
1384 --help=recursive display the short help of all the included packages
1385 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001386 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 --cache-file=FILE cache test results in FILE [disabled]
1388 -C, --config-cache alias for \`--cache-file=config.cache'
1389 -n, --no-create do not create output files
1390 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1391
Martin v. Löwis11437992002-04-12 09:54:03 +00001392Installation directories:
1393 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001394 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398By default, \`make install' will install all the files in
1399\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1400an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1401for instance \`--prefix=\$HOME'.
1402
1403For better control, use the options below.
1404
1405Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001406 --bindir=DIR user executables [EPREFIX/bin]
1407 --sbindir=DIR system admin executables [EPREFIX/sbin]
1408 --libexecdir=DIR program executables [EPREFIX/libexec]
1409 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1410 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1411 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1412 --libdir=DIR object code libraries [EPREFIX/lib]
1413 --includedir=DIR C header files [PREFIX/include]
1414 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1415 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1416 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1417 --infodir=DIR info documentation [DATAROOTDIR/info]
1418 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1419 --mandir=DIR man documentation [DATAROOTDIR/man]
1420 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1421 --htmldir=DIR html documentation [DOCDIR]
1422 --dvidir=DIR dvi documentation [DOCDIR]
1423 --pdfdir=DIR pdf documentation [DOCDIR]
1424 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425_ACEOF
1426
1427 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001428
1429System types:
1430 --build=BUILD configure for building on BUILD [guessed]
1431 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432_ACEOF
1433fi
1434
1435if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001436 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001437 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001438 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001439 cat <<\_ACEOF
1440
1441Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1444 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001445 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001446 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001447 --enable-framework[=INSTALLDIR]
1448 Build (MacOSX|Darwin) framework
1449 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001450 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001451 --enable-loadable-sqlite-extensions
1452 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --enable-ipv6 Enable ipv6 (with ipv4) support
1454 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001455 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458Optional Packages:
1459 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1460 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001461 --with-universal-archs=ARCH
1462 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001463 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001464 --with-framework-name=FRAMEWORK
1465 specify an alternate name of the framework built
1466 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001468 --with-cxx-main=<compiler>
1469 compile main() and link python executable with C++
1470 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --with-suffix=.exe set executable suffix
1472 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001473 --with-hash-algorithm=[fnv|siphash24]
1474 select hash algorithm
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001476 --with-system-expat build pyexpat module using an installed expat
1477 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001478 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001479 --with-system-libmpdec build _decimal module using an installed libmpdec
1480 library
Ned Deilyd819b932013-09-06 01:07:05 -07001481 --with-tcltk-includes='-I...'
1482 override search for Tcl and Tk include files
1483 --with-tcltk-libs='-L...'
1484 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001485 --with-dbmliborder=db1:db2:...
1486 order to check db backends for dbm. Valid value is a
1487 colon separated string with the backend names
1488 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with(out)-threads[=DIRECTORY]
1491 disable/enable thread support
1492 --with(out)-thread[=DIRECTORY]
1493 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001495 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001497 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with-fpectl enable SIGFPE catching
1499 --with-libm=STRING math library
1500 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001501 --with(out)-computed-gotos
1502 Use computed gotos in evaluation loop (enabled by
1503 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001504 --with(out)-ensurepip=[=upgrade]
1505 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
1507Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001508 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 CC C compiler command
1510 CFLAGS C compiler flags
1511 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1512 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001514 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 CPP C preprocessor
1517
1518Use these variables to override the choices made by `configure' or to help
1519it to find libraries and programs with nonstandard names/locations.
1520
Georg Brandle2e15612009-05-20 18:25:10 +00001521Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001522_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001524fi
1525
1526if test "$ac_init_help" = "recursive"; then
1527 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001528 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001529 test -d "$ac_dir" ||
1530 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1531 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 ac_builddir=.
1533
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534case "$ac_dir" in
1535.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1536*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001537 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001539 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540 case $ac_top_builddir_sub in
1541 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1542 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1543 esac ;;
1544esac
1545ac_abs_top_builddir=$ac_pwd
1546ac_abs_builddir=$ac_pwd$ac_dir_suffix
1547# for backward compatibility:
1548ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001549
1550case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 ac_top_srcdir=$ac_top_builddir_sub
1554 ac_abs_top_srcdir=$ac_pwd ;;
1555 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 ac_top_srcdir=$srcdir
1558 ac_abs_top_srcdir=$srcdir ;;
1559 *) # Relative name.
1560 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1561 ac_top_srcdir=$ac_top_build_prefix$srcdir
1562 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001563esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566 cd "$ac_dir" || { ac_status=$?; continue; }
1567 # Check for guested configure.
1568 if test -f "$ac_srcdir/configure.gnu"; then
1569 echo &&
1570 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1571 elif test -f "$ac_srcdir/configure"; then
1572 echo &&
1573 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001575 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001576 fi || ac_status=$?
1577 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 done
1579fi
1580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001582if $ac_init_version; then
1583 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001584python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001585generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001586
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001587Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001588This configure script is free software; the Free Software Foundation
1589gives unlimited permission to copy, distribute and modify it.
1590_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001593
1594## ------------------------ ##
1595## Autoconf initialization. ##
1596## ------------------------ ##
1597
1598# ac_fn_c_try_compile LINENO
1599# --------------------------
1600# Try to compile conftest.$ac_ext, and return whether this succeeded.
1601ac_fn_c_try_compile ()
1602{
1603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1604 rm -f conftest.$ac_objext
1605 if { { ac_try="$ac_compile"
1606case "(($ac_try" in
1607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1608 *) ac_try_echo=$ac_try;;
1609esac
1610eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1611$as_echo "$ac_try_echo"; } >&5
1612 (eval "$ac_compile") 2>conftest.err
1613 ac_status=$?
1614 if test -s conftest.err; then
1615 grep -v '^ *+' conftest.err >conftest.er1
1616 cat conftest.er1 >&5
1617 mv -f conftest.er1 conftest.err
1618 fi
1619 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1620 test $ac_status = 0; } && {
1621 test -z "$ac_c_werror_flag" ||
1622 test ! -s conftest.err
1623 } && test -s conftest.$ac_objext; then :
1624 ac_retval=0
1625else
1626 $as_echo "$as_me: failed program was:" >&5
1627sed 's/^/| /' conftest.$ac_ext >&5
1628
1629 ac_retval=1
1630fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001631 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 as_fn_set_status $ac_retval
1633
1634} # ac_fn_c_try_compile
1635
Matthias Kloseb9621712010-04-24 17:59:49 +00001636# ac_fn_c_try_link LINENO
1637# -----------------------
1638# Try to link conftest.$ac_ext, and return whether this succeeded.
1639ac_fn_c_try_link ()
1640{
1641 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1642 rm -f conftest.$ac_objext conftest$ac_exeext
1643 if { { ac_try="$ac_link"
1644case "(($ac_try" in
1645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1646 *) ac_try_echo=$ac_try;;
1647esac
1648eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1649$as_echo "$ac_try_echo"; } >&5
1650 (eval "$ac_link") 2>conftest.err
1651 ac_status=$?
1652 if test -s conftest.err; then
1653 grep -v '^ *+' conftest.err >conftest.er1
1654 cat conftest.er1 >&5
1655 mv -f conftest.er1 conftest.err
1656 fi
1657 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1658 test $ac_status = 0; } && {
1659 test -z "$ac_c_werror_flag" ||
1660 test ! -s conftest.err
1661 } && test -s conftest$ac_exeext && {
1662 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001663 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001664 }; then :
1665 ac_retval=0
1666else
1667 $as_echo "$as_me: failed program was:" >&5
1668sed 's/^/| /' conftest.$ac_ext >&5
1669
1670 ac_retval=1
1671fi
1672 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1673 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1674 # interfere with the next link command; also delete a directory that is
1675 # left behind by Apple's compiler. We do this before executing the actions.
1676 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001677 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 as_fn_set_status $ac_retval
1679
1680} # ac_fn_c_try_link
1681
Matthias Kloseb9621712010-04-24 17:59:49 +00001682# ac_fn_c_try_cpp LINENO
1683# ----------------------
1684# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1685ac_fn_c_try_cpp ()
1686{
1687 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1688 if { { ac_try="$ac_cpp conftest.$ac_ext"
1689case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694$as_echo "$ac_try_echo"; } >&5
1695 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1696 ac_status=$?
1697 if test -s conftest.err; then
1698 grep -v '^ *+' conftest.err >conftest.er1
1699 cat conftest.er1 >&5
1700 mv -f conftest.er1 conftest.err
1701 fi
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001703 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001704 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1705 test ! -s conftest.err
1706 }; then :
1707 ac_retval=0
1708else
1709 $as_echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=1
1713fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001715 as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_cpp
1718
1719# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1720# -------------------------------------------------------
1721# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1722# the include files in INCLUDES and setting the cache variable VAR
1723# accordingly.
1724ac_fn_c_check_header_mongrel ()
1725{
1726 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001727 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1729$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001730if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 $as_echo_n "(cached) " >&6
1732fi
1733eval ac_res=\$$3
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1735$as_echo "$ac_res" >&6; }
1736else
1737 # Is the header compilable?
1738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1739$as_echo_n "checking $2 usability... " >&6; }
1740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741/* end confdefs.h. */
1742$4
1743#include <$2>
1744_ACEOF
1745if ac_fn_c_try_compile "$LINENO"; then :
1746 ac_header_compiler=yes
1747else
1748 ac_header_compiler=no
1749fi
1750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1752$as_echo "$ac_header_compiler" >&6; }
1753
1754# Is the header present?
1755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1756$as_echo_n "checking $2 presence... " >&6; }
1757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758/* end confdefs.h. */
1759#include <$2>
1760_ACEOF
1761if ac_fn_c_try_cpp "$LINENO"; then :
1762 ac_header_preproc=yes
1763else
1764 ac_header_preproc=no
1765fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001766rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1768$as_echo "$ac_header_preproc" >&6; }
1769
1770# So? What about this header?
1771case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1772 yes:no: )
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1774$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1776$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1777 ;;
1778 no:yes:* )
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1780$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1782$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1784$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1786$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1788$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001789( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001790## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001791## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 ) | sed "s/^/$as_me: WARNING: /" >&2
1793 ;;
1794esac
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1796$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001797if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001798 $as_echo_n "(cached) " >&6
1799else
1800 eval "$3=\$ac_header_compiler"
1801fi
1802eval ac_res=\$$3
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1804$as_echo "$ac_res" >&6; }
1805fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001806 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001807
1808} # ac_fn_c_check_header_mongrel
1809
1810# ac_fn_c_try_run LINENO
1811# ----------------------
1812# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1813# that executables *can* be run.
1814ac_fn_c_try_run ()
1815{
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 if { { ac_try="$ac_link"
1818case "(($ac_try" in
1819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1820 *) ac_try_echo=$ac_try;;
1821esac
1822eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1823$as_echo "$ac_try_echo"; } >&5
1824 (eval "$ac_link") 2>&5
1825 ac_status=$?
1826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1827 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1828 { { case "(($ac_try" in
1829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1830 *) ac_try_echo=$ac_try;;
1831esac
1832eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1833$as_echo "$ac_try_echo"; } >&5
1834 (eval "$ac_try") 2>&5
1835 ac_status=$?
1836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1837 test $ac_status = 0; }; }; then :
1838 ac_retval=0
1839else
1840 $as_echo "$as_me: program exited with status $ac_status" >&5
1841 $as_echo "$as_me: failed program was:" >&5
1842sed 's/^/| /' conftest.$ac_ext >&5
1843
1844 ac_retval=$ac_status
1845fi
1846 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001847 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 as_fn_set_status $ac_retval
1849
1850} # ac_fn_c_try_run
1851
1852# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1853# -------------------------------------------------------
1854# Tests whether HEADER exists and can be compiled using the include files in
1855# INCLUDES, setting the cache variable VAR accordingly.
1856ac_fn_c_check_header_compile ()
1857{
1858 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1860$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001861if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001862 $as_echo_n "(cached) " >&6
1863else
1864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1865/* end confdefs.h. */
1866$4
1867#include <$2>
1868_ACEOF
1869if ac_fn_c_try_compile "$LINENO"; then :
1870 eval "$3=yes"
1871else
1872 eval "$3=no"
1873fi
1874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1875fi
1876eval ac_res=\$$3
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001879 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001880
1881} # ac_fn_c_check_header_compile
1882
Matthias Kloseb9621712010-04-24 17:59:49 +00001883# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1884# -------------------------------------------
1885# Tests whether TYPE exists after having included INCLUDES, setting cache
1886# variable VAR accordingly.
1887ac_fn_c_check_type ()
1888{
1889 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001892if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001893 $as_echo_n "(cached) " >&6
1894else
1895 eval "$3=no"
1896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897/* end confdefs.h. */
1898$4
1899int
1900main ()
1901{
1902if (sizeof ($2))
1903 return 0;
1904 ;
1905 return 0;
1906}
1907_ACEOF
1908if ac_fn_c_try_compile "$LINENO"; then :
1909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1910/* end confdefs.h. */
1911$4
1912int
1913main ()
1914{
1915if (sizeof (($2)))
1916 return 0;
1917 ;
1918 return 0;
1919}
1920_ACEOF
1921if ac_fn_c_try_compile "$LINENO"; then :
1922
1923else
1924 eval "$3=yes"
1925fi
1926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1927fi
1928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1929fi
1930eval ac_res=\$$3
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1932$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001933 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001934
1935} # ac_fn_c_check_type
1936
1937# ac_fn_c_find_uintX_t LINENO BITS VAR
1938# ------------------------------------
1939# Finds an unsigned integer type with width BITS, setting cache variable VAR
1940# accordingly.
1941ac_fn_c_find_uintX_t ()
1942{
1943 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1945$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001946if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001947 $as_echo_n "(cached) " >&6
1948else
1949 eval "$3=no"
1950 # Order is important - never check a type that is potentially smaller
1951 # than half of the expected target width.
1952 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1953 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$ac_includes_default
1957int
1958main ()
1959{
1960static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001961test_array [0] = 0;
1962return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001963
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968if ac_fn_c_try_compile "$LINENO"; then :
1969 case $ac_type in #(
1970 uint$2_t) :
1971 eval "$3=yes" ;; #(
1972 *) :
1973 eval "$3=\$ac_type" ;;
1974esac
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001977 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001978
1979else
1980 break
1981fi
1982 done
1983fi
1984eval ac_res=\$$3
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1986$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001987 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989} # ac_fn_c_find_uintX_t
1990
1991# ac_fn_c_find_intX_t LINENO BITS VAR
1992# -----------------------------------
1993# Finds a signed integer type with width BITS, setting cache variable VAR
1994# accordingly.
1995ac_fn_c_find_intX_t ()
1996{
1997 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1999$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002000if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002001 $as_echo_n "(cached) " >&6
2002else
2003 eval "$3=no"
2004 # Order is important - never check a type that is potentially smaller
2005 # than half of the expected target width.
2006 for ac_type in int$2_t 'int' 'long int' \
2007 'long long int' 'short int' 'signed char'; do
2008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002011 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002012int
2013main ()
2014{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002015static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002016test_array [0] = 0;
2017return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002027 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002028int
2029main ()
2030{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002031static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002032 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002033test_array [0] = 0;
2034return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041
2042else
2043 case $ac_type in #(
2044 int$2_t) :
2045 eval "$3=yes" ;; #(
2046 *) :
2047 eval "$3=\$ac_type" ;;
2048esac
2049fi
2050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051fi
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002053 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002054
2055else
2056 break
2057fi
2058 done
2059fi
2060eval ac_res=\$$3
2061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2062$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002063 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065} # ac_fn_c_find_intX_t
2066
2067# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2068# --------------------------------------------
2069# Tries to find the compile-time value of EXPR in a program that includes
2070# INCLUDES, setting VAR accordingly. Returns whether the value could be
2071# computed
2072ac_fn_c_compute_int ()
2073{
2074 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2075 if test "$cross_compiling" = yes; then
2076 # Depending upon the size, compute the lo and hi bounds.
2077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079$4
2080int
2081main ()
2082{
2083static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002084test_array [0] = 0;
2085return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002086
2087 ;
2088 return 0;
2089}
2090_ACEOF
2091if ac_fn_c_try_compile "$LINENO"; then :
2092 ac_lo=0 ac_mid=0
2093 while :; do
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002101test_array [0] = 0;
2102return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid; break
2110else
2111 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2112 if test $ac_lo -le $ac_mid; then
2113 ac_lo= ac_hi=
2114 break
2115 fi
2116 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119 done
2120else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002128test_array [0] = 0;
2129return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002130
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_hi=-1 ac_mid=-1
2137 while :; do
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h. */
2140$4
2141int
2142main ()
2143{
2144static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002145test_array [0] = 0;
2146return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002147
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_lo=$ac_mid; break
2154else
2155 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2156 if test $ac_mid -le $ac_hi; then
2157 ac_lo= ac_hi=
2158 break
2159 fi
2160 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2161fi
2162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163 done
2164else
2165 ac_lo= ac_hi=
2166fi
2167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170# Binary search between lo and hi bounds.
2171while test "x$ac_lo" != "x$ac_hi"; do
2172 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174/* end confdefs.h. */
2175$4
2176int
2177main ()
2178{
2179static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002180test_array [0] = 0;
2181return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002182
2183 ;
2184 return 0;
2185}
2186_ACEOF
2187if ac_fn_c_try_compile "$LINENO"; then :
2188 ac_hi=$ac_mid
2189else
2190 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2191fi
2192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193done
2194case $ac_lo in #((
2195?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2196'') ac_retval=1 ;;
2197esac
2198 else
2199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200/* end confdefs.h. */
2201$4
2202static long int longval () { return $2; }
2203static unsigned long int ulongval () { return $2; }
2204#include <stdio.h>
2205#include <stdlib.h>
2206int
2207main ()
2208{
2209
2210 FILE *f = fopen ("conftest.val", "w");
2211 if (! f)
2212 return 1;
2213 if (($2) < 0)
2214 {
2215 long int i = longval ();
2216 if (i != ($2))
2217 return 1;
2218 fprintf (f, "%ld", i);
2219 }
2220 else
2221 {
2222 unsigned long int i = ulongval ();
2223 if (i != ($2))
2224 return 1;
2225 fprintf (f, "%lu", i);
2226 }
2227 /* Do not output a trailing newline, as this causes \r\n confusion
2228 on some platforms. */
2229 return ferror (f) || fclose (f) != 0;
2230
2231 ;
2232 return 0;
2233}
2234_ACEOF
2235if ac_fn_c_try_run "$LINENO"; then :
2236 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2237else
2238 ac_retval=1
2239fi
2240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2241 conftest.$ac_objext conftest.beam conftest.$ac_ext
2242rm -f conftest.val
2243
2244 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002245 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002246 as_fn_set_status $ac_retval
2247
2248} # ac_fn_c_compute_int
2249
2250# ac_fn_c_check_func LINENO FUNC VAR
2251# ----------------------------------
2252# Tests whether FUNC exists, setting the cache variable VAR accordingly
2253ac_fn_c_check_func ()
2254{
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2257$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002258if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002259 $as_echo_n "(cached) " >&6
2260else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2264 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2265#define $2 innocuous_$2
2266
2267/* System header to define __stub macros and hopefully few prototypes,
2268 which can conflict with char $2 (); below.
2269 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2270 <limits.h> exists even on freestanding compilers. */
2271
2272#ifdef __STDC__
2273# include <limits.h>
2274#else
2275# include <assert.h>
2276#endif
2277
2278#undef $2
2279
2280/* Override any GCC internal prototype to avoid an error.
2281 Use char because int might match the return type of a GCC
2282 builtin and then its argument prototype would still apply. */
2283#ifdef __cplusplus
2284extern "C"
2285#endif
2286char $2 ();
2287/* The GNU C library defines this for functions which it implements
2288 to always fail with ENOSYS. Some functions are actually named
2289 something starting with __ and the normal name is an alias. */
2290#if defined __stub_$2 || defined __stub___$2
2291choke me
2292#endif
2293
2294int
2295main ()
2296{
2297return $2 ();
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302if ac_fn_c_try_link "$LINENO"; then :
2303 eval "$3=yes"
2304else
2305 eval "$3=no"
2306fi
2307rm -f core conftest.err conftest.$ac_objext \
2308 conftest$ac_exeext conftest.$ac_ext
2309fi
2310eval ac_res=\$$3
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2312$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002313 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002314
2315} # ac_fn_c_check_func
2316
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002317# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2318# ---------------------------------------------
2319# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2320# accordingly.
2321ac_fn_c_check_decl ()
2322{
2323 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2324 as_decl_name=`echo $2|sed 's/ *(.*//'`
2325 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2327$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2328if eval \${$3+:} false; then :
2329 $as_echo_n "(cached) " >&6
2330else
2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332/* end confdefs.h. */
2333$4
2334int
2335main ()
2336{
2337#ifndef $as_decl_name
2338#ifdef __cplusplus
2339 (void) $as_decl_use;
2340#else
2341 (void) $as_decl_name;
2342#endif
2343#endif
2344
2345 ;
2346 return 0;
2347}
2348_ACEOF
2349if ac_fn_c_try_compile "$LINENO"; then :
2350 eval "$3=yes"
2351else
2352 eval "$3=no"
2353fi
2354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2355fi
2356eval ac_res=\$$3
2357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2358$as_echo "$ac_res" >&6; }
2359 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2360
2361} # ac_fn_c_check_decl
2362
Matthias Kloseb9621712010-04-24 17:59:49 +00002363# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2364# ----------------------------------------------------
2365# Tries to find if the field MEMBER exists in type AGGR, after including
2366# INCLUDES, setting cache variable VAR accordingly.
2367ac_fn_c_check_member ()
2368{
2369 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2371$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002372if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002373 $as_echo_n "(cached) " >&6
2374else
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h. */
2377$5
2378int
2379main ()
2380{
2381static $2 ac_aggr;
2382if (ac_aggr.$3)
2383return 0;
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388if ac_fn_c_try_compile "$LINENO"; then :
2389 eval "$4=yes"
2390else
2391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h. */
2393$5
2394int
2395main ()
2396{
2397static $2 ac_aggr;
2398if (sizeof ac_aggr.$3)
2399return 0;
2400 ;
2401 return 0;
2402}
2403_ACEOF
2404if ac_fn_c_try_compile "$LINENO"; then :
2405 eval "$4=yes"
2406else
2407 eval "$4=no"
2408fi
2409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410fi
2411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2412fi
2413eval ac_res=\$$4
2414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2415$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002416 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002417
2418} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002419cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002420This file contains any messages produced by compilers while
2421running configure, to aid debugging if configure makes a mistake.
2422
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002423It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002424generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002425
2426 $ $0 $@
2427
2428_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002429exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002430{
2431cat <<_ASUNAME
2432## --------- ##
2433## Platform. ##
2434## --------- ##
2435
2436hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2437uname -m = `(uname -m) 2>/dev/null || echo unknown`
2438uname -r = `(uname -r) 2>/dev/null || echo unknown`
2439uname -s = `(uname -s) 2>/dev/null || echo unknown`
2440uname -v = `(uname -v) 2>/dev/null || echo unknown`
2441
2442/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2443/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2444
2445/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2446/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2447/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002449/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2450/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2451/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2452
2453_ASUNAME
2454
2455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2456for as_dir in $PATH
2457do
2458 IFS=$as_save_IFS
2459 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 $as_echo "PATH: $as_dir"
2461 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002463
2464} >&5
2465
2466cat >&5 <<_ACEOF
2467
2468
2469## ----------- ##
2470## Core tests. ##
2471## ----------- ##
2472
2473_ACEOF
2474
2475
2476# Keep a trace of the command line.
2477# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002478# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002479# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002480# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002481ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002482ac_configure_args0=
2483ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002484ac_must_keep_next=false
2485for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002486do
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 for ac_arg
2488 do
2489 case $ac_arg in
2490 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2491 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2492 | -silent | --silent | --silen | --sile | --sil)
2493 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 esac
2497 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002502 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002504 case $ac_arg in
2505 *=* | --config-cache | -C | -disable-* | --disable-* \
2506 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2507 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2508 | -with-* | --with-* | -without-* | --without-* | --x)
2509 case "$ac_configure_args0 " in
2510 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2511 esac
2512 ;;
2513 -* ) ac_must_keep_next=true ;;
2514 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 ;;
2518 esac
2519 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002520done
Matthias Kloseb9621712010-04-24 17:59:49 +00002521{ ac_configure_args0=; unset ac_configure_args0;}
2522{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002523
2524# When interrupted or exit'd, cleanup temporary files, and complete
2525# config.log. We remove comments because anyway the quotes in there
2526# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527# WARNING: Use '\'' to represent an apostrophe within the trap.
2528# 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 +00002529trap 'exit_status=$?
2530 # Save into config.log some information that might help in debugging.
2531 {
2532 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002533
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002534 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002535## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002536## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 echo
2538 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539(
2540 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2541 eval ac_val=\$$ac_var
2542 case $ac_val in #(
2543 *${as_nl}*)
2544 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2546$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 esac
2548 case $ac_var in #(
2549 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002550 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2551 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 esac ;;
2553 esac
2554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2557 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 "s/'\''/'\''\\\\'\'''\''/g;
2560 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2561 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002562 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002564 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 esac |
2566 sort
2567)
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002569
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002570 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002571## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002572## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002573 echo
2574 for ac_var in $ac_subst_vars
2575 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576 eval ac_val=\$$ac_var
2577 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002581 done | sort
2582 echo
2583
2584 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002585 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002588 echo
2589 for ac_var in $ac_subst_files
2590 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 eval ac_val=\$$ac_var
2592 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002596 done | sort
2597 echo
2598 fi
2599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002602## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002603## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 echo
2607 fi
2608 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 $as_echo "$as_me: caught signal $ac_signal"
2610 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 rm -f core *.core core.conftest.* &&
2613 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002616for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002618done
2619ac_signal=0
2620
2621# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002623
Matthias Kloseb9621712010-04-24 17:59:49 +00002624$as_echo "/* confdefs.h */" > confdefs.h
2625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626# Predefined preprocessor variables.
2627
2628cat >>confdefs.h <<_ACEOF
2629#define PACKAGE_NAME "$PACKAGE_NAME"
2630_ACEOF
2631
Martin v. Löwis11437992002-04-12 09:54:03 +00002632cat >>confdefs.h <<_ACEOF
2633#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2634_ACEOF
2635
Martin v. Löwis11437992002-04-12 09:54:03 +00002636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_VERSION "$PACKAGE_VERSION"
2638_ACEOF
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_STRING "$PACKAGE_STRING"
2642_ACEOF
2643
Martin v. Löwis11437992002-04-12 09:54:03 +00002644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2646_ACEOF
2647
Matthias Kloseb9621712010-04-24 17:59:49 +00002648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_URL "$PACKAGE_URL"
2650_ACEOF
2651
Martin v. Löwis11437992002-04-12 09:54:03 +00002652
2653# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002654# Prefer an explicitly selected file to automatically selected ones.
2655ac_site_file1=NONE
2656ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002658 # We do not want a PATH search for config.site.
2659 case $CONFIG_SITE in #((
2660 -*) ac_site_file1=./$CONFIG_SITE;;
2661 */*) ac_site_file1=$CONFIG_SITE;;
2662 *) ac_site_file1=./$CONFIG_SITE;;
2663 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002664elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 ac_site_file1=$prefix/share/config.site
2666 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667else
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 ac_site_file1=$ac_default_prefix/share/config.site
2669 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002671for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672do
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 test "x$ac_site_file" = xNONE && continue
2674 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2676$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 . "$ac_site_file" \
2679 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2681as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002682See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683 fi
2684done
2685
2686if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002687 # Some versions of bash will fail to source /dev/null (special files
2688 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2689 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2691$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2694 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 esac
2696 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697else
Matthias Kloseb9621712010-04-24 17:59:49 +00002698 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2699$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 >$cache_file
2701fi
2702
2703# Check that the precious variables saved in the cache have kept the same
2704# value.
2705ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2708 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2710 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 case $ac_old_set,$ac_new_set in
2712 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002713 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2714$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 +00002715 ac_cache_corrupted=: ;;
2716 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002717 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2718$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 ac_cache_corrupted=: ;;
2720 ,);;
2721 *)
2722 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002723 # differences in whitespace do not lead to failure.
2724 ac_old_val_w=`echo x $ac_old_val`
2725 ac_new_val_w=`echo x $ac_new_val`
2726 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2728$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2729 ac_cache_corrupted=:
2730 else
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2732$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2733 eval $ac_var=\$ac_old_val
2734 fi
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2736$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2738$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 fi;;
2740 esac
2741 # Pass precious variables to config.status.
2742 if test "$ac_new_set" = set; then
2743 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002744 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 *) ac_arg=$ac_var=$ac_new_val ;;
2746 esac
2747 case " $ac_configure_args " in
2748 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002749 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002750 esac
2751 fi
2752done
2753if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2757$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002758 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002760## -------------------- ##
2761## Main body of script. ##
2762## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002763
Guido van Rossum7f43da71994-08-01 12:15:30 +00002764ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002765ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002766ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2767ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2768ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769
Guido van Rossum627b2d71993-12-24 10:39:16 +00002770
Michael W. Hudson54241132001-12-07 15:38:26 +00002771
Trent Nelson4d4ec652012-10-16 08:51:24 -04002772
Trent Nelson5595ab52012-10-17 04:47:31 -04002773if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002774 # If we're building out-of-tree, we need to make sure the following
2775 # resources get picked up before their $srcdir counterparts.
2776 # Objects/ -> typeslots.inc
2777 # Include/ -> Python-ast.h, graminit.h
2778 # Python/ -> importlib.h
2779 # (A side effect of this is that these resources will automatically be
2780 # regenerated when building out-of-tree, regardless of whether or not
2781 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2782 # off.)
2783 BASECPPFLAGS="-IObjects -IInclude -IPython"
2784else
2785 BASECPPFLAGS=""
2786fi
2787
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002788
2789
2790
2791
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002792if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002793then
2794# Extract the first word of "hg", so it can be a program name with args.
2795set dummy hg; ac_word=$2
2796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2797$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002798if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002799 $as_echo_n "(cached) " >&6
2800else
2801 if test -n "$HAS_HG"; then
2802 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2803else
2804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2805for as_dir in $PATH
2806do
2807 IFS=$as_save_IFS
2808 test -z "$as_dir" && as_dir=.
2809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002811 ac_cv_prog_HAS_HG="found"
2812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2813 break 2
2814 fi
2815done
2816 done
2817IFS=$as_save_IFS
2818
2819 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2820fi
2821fi
2822HAS_HG=$ac_cv_prog_HAS_HG
2823if test -n "$HAS_HG"; then
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2825$as_echo "$HAS_HG" >&6; }
2826else
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2828$as_echo "no" >&6; }
2829fi
2830
2831
2832else
2833HAS_HG=no-repository
2834fi
2835if test $HAS_HG = found
2836then
2837 HGVERSION="hg id -i \$(srcdir)"
2838 HGTAG="hg id -t \$(srcdir)"
2839 HGBRANCH="hg id -b \$(srcdir)"
2840else
2841 HGVERSION=""
2842 HGTAG=""
2843 HGBRANCH=""
2844fi
2845
2846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002847ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002848
2849
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002850ac_aux_dir=
2851for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2852 if test -f "$ac_dir/install-sh"; then
2853 ac_aux_dir=$ac_dir
2854 ac_install_sh="$ac_aux_dir/install-sh -c"
2855 break
2856 elif test -f "$ac_dir/install.sh"; then
2857 ac_aux_dir=$ac_dir
2858 ac_install_sh="$ac_aux_dir/install.sh -c"
2859 break
2860 elif test -f "$ac_dir/shtool"; then
2861 ac_aux_dir=$ac_dir
2862 ac_install_sh="$ac_aux_dir/shtool install -c"
2863 break
2864 fi
2865done
2866if test -z "$ac_aux_dir"; then
2867 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2868fi
2869
2870# These three variables are undocumented and unsupported,
2871# and are intended to be withdrawn in a future Autoconf release.
2872# They can cause serious problems if a builder's source tree is in a directory
2873# whose full name contains unusual characters.
2874ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2875ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2876ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2877
2878
2879# Make sure we can run config.sub.
2880$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2881 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2882
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2884$as_echo_n "checking build system type... " >&6; }
2885if ${ac_cv_build+:} false; then :
2886 $as_echo_n "(cached) " >&6
2887else
2888 ac_build_alias=$build_alias
2889test "x$ac_build_alias" = x &&
2890 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2891test "x$ac_build_alias" = x &&
2892 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2893ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2894 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2895
2896fi
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2898$as_echo "$ac_cv_build" >&6; }
2899case $ac_cv_build in
2900*-*-*) ;;
2901*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2902esac
2903build=$ac_cv_build
2904ac_save_IFS=$IFS; IFS='-'
2905set x $ac_cv_build
2906shift
2907build_cpu=$1
2908build_vendor=$2
2909shift; shift
2910# Remember, the first character of IFS is used to create $*,
2911# except with old shells:
2912build_os=$*
2913IFS=$ac_save_IFS
2914case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2915
2916
2917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2918$as_echo_n "checking host system type... " >&6; }
2919if ${ac_cv_host+:} false; then :
2920 $as_echo_n "(cached) " >&6
2921else
2922 if test "x$host_alias" = x; then
2923 ac_cv_host=$ac_cv_build
2924else
2925 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2926 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2927fi
2928
2929fi
2930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2931$as_echo "$ac_cv_host" >&6; }
2932case $ac_cv_host in
2933*-*-*) ;;
2934*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2935esac
2936host=$ac_cv_host
2937ac_save_IFS=$IFS; IFS='-'
2938set x $ac_cv_host
2939shift
2940host_cpu=$1
2941host_vendor=$2
2942shift; shift
2943# Remember, the first character of IFS is used to create $*,
2944# except with old shells:
2945host_os=$*
2946IFS=$ac_save_IFS
2947case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2948
2949
2950
doko@python.orga10e4a92013-01-25 18:45:12 +01002951
2952
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002953if test "$cross_compiling" = yes; then
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2955$as_echo_n "checking for python interpreter for cross build... " >&6; }
2956 if test -z "$PYTHON_FOR_BUILD"; then
2957 for interp in python$PACKAGE_VERSION python3 python; do
2958 which $interp >/dev/null 2>&1 || continue
2959 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2960 break
2961 fi
2962 interp=
2963 done
2964 if test x$interp = x; then
2965 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2966 fi
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2968$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002969 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 +02002970 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002971elif test "$cross_compiling" = maybe; then
2972 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002973else
2974 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2975fi
2976
2977
Martin v. Löwis11437992002-04-12 09:54:03 +00002978
Benjamin Petersond23f8222009-04-05 19:13:16 +00002979if test "$prefix" != "/"; then
2980 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2981fi
2982
2983
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
2985
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002986# We don't use PACKAGE_ variables, and they cause conflicts
2987# with other autoconf-based packages that include Python.h
2988grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2989rm confdefs.h
2990mv confdefs.h.new confdefs.h
2991
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002992
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002993VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002994
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002995# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002996
2997SOVERSION=1.0
2998
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002999# The later defininition of _XOPEN_SOURCE disables certain features
3000# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003003
3004
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003005# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3006# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3007# them.
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003010
3011
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003012# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3013# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3014# them.
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003017
3018
Martin v. Löwisd6320502004-08-12 13:45:08 +00003019# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3020# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3021
Matthias Kloseb9621712010-04-24 17:59:49 +00003022$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003023
3024
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003025# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3026# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3027# them.
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003030
3031
3032
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003033define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003034
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003035# Arguments passed to configure.
3036
3037CONFIG_ARGS="$ac_configure_args"
3038
Matthias Kloseb9621712010-04-24 17:59:49 +00003039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3040$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003042if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003044 case $enableval in
3045 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003046 # Locate the best usable SDK, see Mac/README.txt for more
3047 # information
3048 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003049 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003051 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3052 if test ! -d "${enableval}"
3053 then
3054 enableval=/
3055 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057 ;;
3058 esac
3059 case $enableval in
3060 no)
3061 UNIVERSALSDK=
3062 enable_universalsdk=
3063 ;;
3064 *)
3065 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066 if test ! -d "${UNIVERSALSDK}"
3067 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003068 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003070 ;;
3071 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003072
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003073
Thomas Wouters477c8d52006-05-27 19:21:47 +00003074else
3075
3076 UNIVERSALSDK=
3077 enable_universalsdk=
3078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003080
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003081if test -n "${UNIVERSALSDK}"
3082then
Matthias Kloseb9621712010-04-24 17:59:49 +00003083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3084$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085else
Matthias Kloseb9621712010-04-24 17:59:49 +00003086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3087$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003090
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003091
Ned Deily87adb6e2013-10-18 21:09:56 -07003092ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003093
Ned Deilycbfb9a52012-06-23 16:02:19 -07003094# For backward compatibility reasons we prefer to select '32-bit' if available,
3095# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003096UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097if test "`uname -s`" = "Darwin"
3098then
3099 if test -n "${UNIVERSALSDK}"
3100 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003101 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003102 then
3103 UNIVERSAL_ARCHS="intel"
3104 fi
3105 fi
3106fi
3107
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003108
Matthias Kloseb9621712010-04-24 17:59:49 +00003109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3110$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003111
3112# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003113if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003115 UNIVERSAL_ARCHS="$withval"
3116
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003117fi
3118
Ned Deily87adb6e2013-10-18 21:09:56 -07003119if test -n "${UNIVERSALSDK}"
3120then
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3122$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3123else
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3125$as_echo "no" >&6; }
3126fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003128
3129# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003130if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003131 withval=$with_framework_name;
3132 PYTHONFRAMEWORK=${withval}
3133 PYTHONFRAMEWORKDIR=${withval}.framework
3134 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3135
3136else
3137
3138 PYTHONFRAMEWORK=Python
3139 PYTHONFRAMEWORKDIR=Python.framework
3140 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3141
3142fi
3143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003144# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003145if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003147 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003148 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003149 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003150 esac
3151 case $enableval in
3152 no)
3153 PYTHONFRAMEWORK=
3154 PYTHONFRAMEWORKDIR=no-framework
3155 PYTHONFRAMEWORKPREFIX=
3156 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003157 FRAMEWORKINSTALLFIRST=
3158 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 FRAMEWORKALTINSTALLFIRST=
3160 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003161 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162 if test "x${prefix}" = "xNONE"; then
3163 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3164 else
3165 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3166 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003167 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003168 ;;
3169 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003170 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003171 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003172 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003173 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003174 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3175 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003176 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003178
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003179 if test "x${prefix}" = "xNONE" ; then
3180 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003181
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003182 else
3183 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3184 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003185
3186 case "${enableval}" in
3187 /System*)
3188 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3189 if test "${prefix}" = "NONE" ; then
3190 # See below
3191 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3192 fi
3193 ;;
3194
3195 /Library*)
3196 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3197 ;;
3198
3199 */Library/Frameworks)
3200 MDIR="`dirname "${enableval}"`"
3201 MDIR="`dirname "${MDIR}"`"
3202 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3203
3204 if test "${prefix}" = "NONE"; then
3205 # User hasn't specified the
3206 # --prefix option, but wants to install
3207 # the framework in a non-default location,
3208 # ensure that the compatibility links get
3209 # installed relative to that prefix as well
3210 # instead of in /usr/local.
3211 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3212 fi
3213 ;;
3214
3215 *)
3216 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3217 ;;
3218 esac
3219
Jack Jansen127e56e2001-09-11 14:41:54 +00003220 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003222 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003223 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3229
3230 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3231
Jack Jansene578a632001-08-15 01:27:14 +00003232 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003233
Guido van Rossum563e7081996-09-10 18:20:48 +00003234else
Martin v. Löwis11437992002-04-12 09:54:03 +00003235
Jack Jansene578a632001-08-15 01:27:14 +00003236 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003237 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003238 PYTHONFRAMEWORKPREFIX=
3239 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240 FRAMEWORKINSTALLFIRST=
3241 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003242 FRAMEWORKALTINSTALLFIRST=
3243 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003244 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003245 if test "x${prefix}" = "xNONE" ; then
3246 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3247 else
3248 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3249 fi
Jack Jansene578a632001-08-15 01:27:14 +00003250 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003251
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253fi
3254
Thomas Wouters477c8d52006-05-27 19:21:47 +00003255
3256
Michael W. Hudson54241132001-12-07 15:38:26 +00003257
3258
3259
3260
Jack Jansene578a632001-08-15 01:27:14 +00003261
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003262
3263
3264
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003265
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003266
Ned Deilyb8f944f2013-11-21 22:42:25 -08003267
Jack Jansene578a632001-08-15 01:27:14 +00003268##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003269## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003270## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003271##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272# Set name for machine-dependent library files
3273
Matthias Kloseb9621712010-04-24 17:59:49 +00003274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3275$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003276if test -z "$MACHDEP"
3277then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 # avoid using uname for cross builds
3279 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003280 # ac_sys_system and ac_sys_release are used for setting
3281 # a lot of different things including 'define_xopen_source'
3282 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case "$host" in
3284 *-*-linux*)
3285 ac_sys_system=Linux
3286 ;;
3287 *-*-cygwin*)
3288 ac_sys_system=Cygwin
3289 ;;
3290 *)
3291 # for now, limit cross builds to known configurations
3292 MACHDEP="unknown"
3293 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3294 esac
3295 ac_sys_release=
3296 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003297 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003298 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003299 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003300 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003301 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003302 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003303 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 fi
3305 ac_md_system=`echo $ac_sys_system |
3306 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3307 ac_md_release=`echo $ac_sys_release |
3308 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3309 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003310
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003311 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003312 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003313 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003314 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003315 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003316 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003317 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318fi
Guido van Rossum91922671997-10-09 20:24:13 +00003319
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003320
3321if test "$cross_compiling" = yes; then
3322 case "$host" in
3323 *-*-linux*)
3324 case "$host_cpu" in
3325 arm*)
3326 _host_cpu=arm
3327 ;;
3328 *)
3329 _host_cpu=$host_cpu
3330 esac
3331 ;;
3332 *-*-cygwin*)
3333 _host_cpu=
3334 ;;
3335 *)
3336 # for now, limit cross builds to known configurations
3337 MACHDEP="unknown"
3338 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3339 esac
3340 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3341fi
3342
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003343# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3344# disable features if it is defined, without any means to access these
3345# features as extensions. For these systems, we skip the definition of
3346# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3347# some feature, make sure there is no alternative way to access this
3348# feature. Also, when using wildcards, make sure you have verified the
3349# need for not defining _XOPEN_SOURCE on all systems matching the
3350# wildcard, and that the wildcard does not include future systems
3351# (which may remove their limitations).
3352case $ac_sys_system/$ac_sys_release in
3353 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3354 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003355 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003356 # In addition, Stefan Krah confirms that issue #1244610 exists through
3357 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003358 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003359 define_xopen_source=no
3360 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3361 # also defined. This can be overridden by defining _BSD_SOURCE
3362 # As this has a different meaning on Linux, only define it on OpenBSD
3363
Matthias Kloseb9621712010-04-24 17:59:49 +00003364$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003365
3366 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003367 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003368 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3369 # also defined. This can be overridden by defining _BSD_SOURCE
3370 # As this has a different meaning on Linux, only define it on OpenBSD
3371
Matthias Kloseb9621712010-04-24 17:59:49 +00003372$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003373
3374 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003375 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3376 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3377 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003378 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 +00003379 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003380 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3381 # request to enable features supported by the standard as a request
3382 # to disable features not supported by the standard. The best way
3383 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3384 # entirely and define __EXTENSIONS__ instead.
3385 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003386 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003387 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3388 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003389 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003390 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003391 define_xopen_source=no;;
3392 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003393 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003394 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003395 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003396 # On FreeBSD 4, the math functions C89 does not cover are never defined
3397 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3398 FreeBSD/4.*)
3399 define_xopen_source=no;;
3400 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3401 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3402 # identifies itself as Darwin/7.*
3403 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3404 # disables platform specific features beyond repair.
3405 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3406 # has no effect, don't bother defining them
3407 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003408 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003409 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003410 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003411 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3412 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3413 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003414 AIX/4)
3415 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003416 AIX/5)
3417 if test `uname -r` -eq 1; then
3418 define_xopen_source=no
3419 fi
3420 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003421 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3422 # defining NI_NUMERICHOST.
3423 QNX/6.3.2)
3424 define_xopen_source=no
3425 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003426
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427esac
3428
3429if test $define_xopen_source = yes
3430then
Victor Stinner14d098d2011-09-07 22:29:43 +02003431 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003432
Victor Stinner14d098d2011-09-07 22:29:43 +02003433$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
3436 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3437 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3438 # several APIs are not declared. Since this is also needed in some
3439 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003440
Matthias Kloseb9621712010-04-24 17:59:49 +00003441$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003442
3443
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003444
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003445$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003446
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003447fi
3448
Christian Heimes647cd872013-12-07 23:39:33 +01003449# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3450case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003451 hp*|HP*)
3452 define_stdc_a1=yes;;
3453 *)
3454 define_stdc_a1=no;;
3455esac
3456
3457if test $define_stdc_a1 = yes
3458then
Christian Heimes647cd872013-12-07 23:39:33 +01003459
3460$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3461
Christian Heimesb02bcae2013-12-08 15:21:08 +01003462fi
Christian Heimes647cd872013-12-07 23:39:33 +01003463
Guido van Rossum91922671997-10-09 20:24:13 +00003464#
3465# SGI compilers allow the specification of the both the ABI and the
3466# ISA on the command line. Depending on the values of these switches,
3467# different and often incompatable code will be generated.
3468#
3469# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3470# thus supply support for various ABI/ISA combinations. The MACHDEP
3471# variable is also adjusted.
3472#
3473
3474if test ! -z "$SGI_ABI"
3475then
3476 CC="cc $SGI_ABI"
3477 LDFLAGS="$SGI_ABI $LDFLAGS"
3478 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3481$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003482
Jack Jansen6b08a402004-06-03 12:41:45 +00003483# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3484# it may influence the way we can build extensions, so distutils
3485# needs to check it
3486
Thomas Wouters477c8d52006-05-27 19:21:47 +00003487
Jack Jansen6b08a402004-06-03 12:41:45 +00003488CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003489EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003490
Guido van Rossum627b2d71993-12-24 10:39:16 +00003491# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003492
3493# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3494# for debug/optimization stuff. BASECFLAGS is for flags that are required
3495# just to get things to compile and link. Users are free to override OPT
3496# when running configure or make. The build should not break if they do.
3497# BASECFLAGS should generally not be messed with, however.
3498
3499# XXX shouldn't some/most/all of this code be merged with the stuff later
3500# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3502$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003505if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003507 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003508 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003509 without_gcc=yes;;
3510 yes) CC=gcc
3511 without_gcc=no;;
3512 *) CC=$withval
3513 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003514 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003515else
Martin v. Löwis11437992002-04-12 09:54:03 +00003516
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003517 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003518 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003519 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003520 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003521 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003522fi
3523
Matthias Kloseb9621712010-04-24 17:59:49 +00003524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3525$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003526
Guido van Rossum8b131c51995-03-09 14:10:13 +00003527# If the user switches compilers, we can't believe the cache
3528if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3529then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003530 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003531(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003532fi
3533
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003534# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3535# when the compiler supports them, but we don't always want -O2, and
3536# we set -g later.
3537if test -z "$CFLAGS"; then
3538 CFLAGS=
3539fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003540
3541if test "$ac_sys_system" = "Darwin"
3542then
3543 # Compiler selection on MacOSX is more complicated than
3544 # AC_PROG_CC can handle, see Mac/README.txt for more
3545 # information
3546 if test -z "${CC}"
3547 then
3548 found_gcc=
3549 found_clang=
3550 as_save_IFS=$IFS; IFS=:
3551 for as_dir in $PATH
3552 do
3553 IFS=$as_save_IFS
3554 if test -x $as_dir/gcc; then
3555 if test -z "${found_gcc}"; then
3556 found_gcc=$as_dir/gcc
3557 fi
3558 fi
3559 if test -x $as_dir/clang; then
3560 if test -z "${found_clang}"; then
3561 found_clang=$as_dir/clang
3562 fi
3563 fi
3564 done
3565 IFS=$as_save_IFS
3566
3567 if test -n "$found_gcc" -a -n "$found_clang"
3568 then
3569 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3570 then
3571 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3572$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3573 CC="$found_clang"
3574 CXX="$found_clang++"
3575 fi
3576
3577
3578 elif test -z "$found_gcc" -a -n "$found_clang"
3579 then
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3581$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3582 CC="$found_clang"
3583 CXX="$found_clang++"
3584
3585 elif test -z "$found_gcc" -a -z "$found_clang"
3586 then
3587 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3588 if test -n "${found_clang}"
3589 then
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3591$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3592 CC="${found_clang}"
3593 CXX="`/usr/bin/xcrun -find clang++`"
3594
3595 # else: use default behaviour
3596 fi
3597 fi
3598 fi
3599fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003600ac_ext=c
3601ac_cpp='$CPP $CPPFLAGS'
3602ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3603ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3604ac_compiler_gnu=$ac_cv_c_compiler_gnu
3605if test -n "$ac_tool_prefix"; then
3606 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3607set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3609$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003610if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003612else
3613 if test -n "$CC"; then
3614 ac_cv_prog_CC="$CC" # Let the user override the test.
3615else
Martin v. Löwis11437992002-04-12 09:54:03 +00003616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3617for as_dir in $PATH
3618do
3619 IFS=$as_save_IFS
3620 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 $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 +00003625 break 2
3626 fi
3627done
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003630
Jack Jansendd19cf82001-12-06 22:36:17 +00003631fi
3632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003633CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003634if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3636$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003637else
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3639$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003640fi
3641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644if test -z "$ac_cv_prog_CC"; then
3645 ac_ct_CC=$CC
3646 # Extract the first word of "gcc", so it can be a program name with args.
3647set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3649$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003650if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003652else
3653 if test -n "$ac_ct_CC"; then
3654 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3655else
3656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3657for as_dir in $PATH
3658do
3659 IFS=$as_save_IFS
3660 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 $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 +00003665 break 2
3666 fi
3667done
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003670
3671fi
3672fi
3673ac_ct_CC=$ac_cv_prog_ac_ct_CC
3674if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3676$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003677else
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3679$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680fi
3681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 if test "x$ac_ct_CC" = x; then
3683 CC=""
3684 else
3685 case $cross_compiling:$ac_tool_warned in
3686yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003687{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3688$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689ac_tool_warned=yes ;;
3690esac
3691 CC=$ac_ct_CC
3692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003693else
3694 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003695fi
3696
Jack Jansendd19cf82001-12-06 22:36:17 +00003697if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698 if test -n "$ac_tool_prefix"; then
3699 # 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 +00003700set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3702$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003703if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003705else
3706 if test -n "$CC"; then
3707 ac_cv_prog_CC="$CC" # Let the user override the test.
3708else
Martin v. Löwis11437992002-04-12 09:54:03 +00003709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3710for as_dir in $PATH
3711do
3712 IFS=$as_save_IFS
3713 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003716 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 $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 +00003718 break 2
3719 fi
3720done
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003723
3724fi
3725fi
3726CC=$ac_cv_prog_CC
3727if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3729$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003730else
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3732$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733fi
3734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003737fi
3738if test -z "$CC"; then
3739 # Extract the first word of "cc", so it can be a program name with args.
3740set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003743if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003745else
3746 if test -n "$CC"; then
3747 ac_cv_prog_CC="$CC" # Let the user override the test.
3748else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3751for as_dir in $PATH
3752do
3753 IFS=$as_save_IFS
3754 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3758 ac_prog_rejected=yes
3759 continue
3760 fi
3761 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 $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 +00003763 break 2
3764 fi
3765done
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769if test $ac_prog_rejected = yes; then
3770 # We found a bogon in the path, so make sure we never use it.
3771 set dummy $ac_cv_prog_CC
3772 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774 # We chose a different compiler from the bogus one.
3775 # However, it has the same basename, so the bogon will be chosen
3776 # first if we set CC to just the basename; use the full file name.
3777 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003778 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779 fi
3780fi
3781fi
3782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003783CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003784if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3786$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787else
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3789$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790fi
3791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792
Martin v. Löwis11437992002-04-12 09:54:03 +00003793fi
3794if test -z "$CC"; then
3795 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 do
3798 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3799set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3801$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003802if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003804else
3805 if test -n "$CC"; then
3806 ac_cv_prog_CC="$CC" # Let the user override the test.
3807else
Martin v. Löwis11437992002-04-12 09:54:03 +00003808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809for as_dir in $PATH
3810do
3811 IFS=$as_save_IFS
3812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $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 +00003817 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003818 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003819done
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
3823fi
3824fi
3825CC=$ac_cv_prog_CC
3826if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3828$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829else
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003832fi
3833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 test -n "$CC" && break
3836 done
3837fi
3838if test -z "$CC"; then
3839 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003841do
3842 # Extract the first word of "$ac_prog", so it can be a program name with args.
3843set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3845$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003846if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003848else
3849 if test -n "$ac_ct_CC"; then
3850 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3851else
3852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3853for as_dir in $PATH
3854do
3855 IFS=$as_save_IFS
3856 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 $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 +00003861 break 2
3862 fi
3863done
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003866
Martin v. Löwis11437992002-04-12 09:54:03 +00003867fi
3868fi
3869ac_ct_CC=$ac_cv_prog_ac_ct_CC
3870if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3872$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003873else
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3875$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878
Martin v. Löwis11437992002-04-12 09:54:03 +00003879 test -n "$ac_ct_CC" && break
3880done
Michael W. Hudson54241132001-12-07 15:38:26 +00003881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882 if test "x$ac_ct_CC" = x; then
3883 CC=""
3884 else
3885 case $cross_compiling:$ac_tool_warned in
3886yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003887{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3888$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889ac_tool_warned=yes ;;
3890esac
3891 CC=$ac_ct_CC
3892 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003893fi
3894
3895fi
3896
3897
Matthias Kloseb9621712010-04-24 17:59:49 +00003898test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003900as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003901See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003902
3903# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003904$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3905set X $ac_compile
3906ac_compiler=$2
3907for ac_option in --version -v -V -qversion; do
3908 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909case "(($ac_try" in
3910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3911 *) ac_try_echo=$ac_try;;
3912esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3914$as_echo "$ac_try_echo"; } >&5
3915 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 if test -s conftest.err; then
3918 sed '10a\
3919... rest of stderr output deleted ...
3920 10q' conftest.err >conftest.er1
3921 cat conftest.er1 >&5
3922 fi
3923 rm -f conftest.er1 conftest.err
3924 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3925 test $ac_status = 0; }
3926done
Martin v. Löwis11437992002-04-12 09:54:03 +00003927
Matthias Kloseb9621712010-04-24 17:59:49 +00003928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003930
Martin v. Löwis11437992002-04-12 09:54:03 +00003931int
3932main ()
3933{
3934
3935 ;
3936 return 0;
3937}
3938_ACEOF
3939ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003940ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003941# Try to create an executable without -o first, disregard a.out.
3942# It will help us diagnose broken compilers, and finding out an intuition
3943# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3945$as_echo_n "checking whether the C compiler works... " >&6; }
3946ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3947
3948# The possible output files:
3949ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951ac_rmfiles=
3952for ac_file in $ac_files
3953do
3954 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3957 esac
3958done
3959rm -f $ac_rmfiles
3960
Matthias Kloseb9621712010-04-24 17:59:49 +00003961if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3971 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3973# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3974# in a Makefile. We should not override ac_cv_exeext if it was cached,
3975# so that the user can short-circuit this test for compilers unknown to
3976# Autoconf.
3977for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003978do
3979 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003980 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003981 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982 ;;
3983 [ab].out )
3984 # We found the default executable, but exeext='' is most
3985 # certainly right.
3986 break;;
3987 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003988 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 then :; else
3990 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3991 fi
3992 # We set ac_cv_exeext here because the later test for it is not
3993 # safe: cross compilers may not add the suffix if given an `-o'
3994 # argument, so we may need to know it at that point already.
3995 # Even if this section looks crufty: it has the advantage of
3996 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997 break;;
3998 * )
3999 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 esac
4001done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002test "$ac_cv_exeext" = no && ac_cv_exeext=
4003
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004004else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005 ac_file=''
4006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004007if test -z "$ac_file"; then :
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009$as_echo "no" >&6; }
4010$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004011sed 's/^/| /' conftest.$ac_ext >&5
4012
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004015as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004016See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004017else
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4019$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4022$as_echo_n "checking for C compiler default output file name... " >&6; }
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4024$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026
Matthias Kloseb9621712010-04-24 17:59:49 +00004027rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4030$as_echo_n "checking for suffix of executables... " >&6; }
4031if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004032case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4037$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004039 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4043# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4044# work properly (i.e., refer to `conftest.exe'), while it won't with
4045# `rm'.
4046for ac_file in conftest.exe conftest conftest.*; do
4047 test -f "$ac_file" || continue
4048 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4051 break;;
4052 * ) break;;
4053 esac
4054done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004055else
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004058as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004059See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004061rm -f conftest conftest$ac_cv_exeext
4062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4063$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004064
4065rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004066EXEEXT=$ac_cv_exeext
4067ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4069/* end confdefs.h. */
4070#include <stdio.h>
4071int
4072main ()
4073{
4074FILE *f = fopen ("conftest.out", "w");
4075 return ferror (f) || fclose (f) != 0;
4076
4077 ;
4078 return 0;
4079}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004081ac_clean_files="$ac_clean_files conftest.out"
4082# Check that the compiler produces executables we can run. If not, either
4083# the compiler is broken, or we cross compile.
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4085$as_echo_n "checking whether we are cross compiling... " >&6; }
4086if test "$cross_compiling" != yes; then
4087 { { ac_try="$ac_link"
4088case "(($ac_try" in
4089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4090 *) ac_try_echo=$ac_try;;
4091esac
4092eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4093$as_echo "$ac_try_echo"; } >&5
4094 (eval "$ac_link") 2>&5
4095 ac_status=$?
4096 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4097 test $ac_status = 0; }
4098 if { ac_try='./conftest$ac_cv_exeext'
4099 { { case "(($ac_try" in
4100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4101 *) ac_try_echo=$ac_try;;
4102esac
4103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4104$as_echo "$ac_try_echo"; } >&5
4105 (eval "$ac_try") 2>&5
4106 ac_status=$?
4107 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4108 test $ac_status = 0; }; }; then
4109 cross_compiling=no
4110 else
4111 if test "$cross_compiling" = maybe; then
4112 cross_compiling=yes
4113 else
4114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004116as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004117If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004118See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 fi
4120 fi
4121fi
4122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4123$as_echo "$cross_compiling" >&6; }
4124
4125rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4126ac_clean_files=$ac_clean_files_save
4127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4128$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004129if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 $as_echo_n "(cached) " >&6
4131else
4132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133/* end confdefs.h. */
4134
4135int
4136main ()
4137{
4138
4139 ;
4140 return 0;
4141}
4142_ACEOF
4143rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004144if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145case "(($ac_try" in
4146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4147 *) ac_try_echo=$ac_try;;
4148esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004149eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4150$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4154 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155 for ac_file in conftest.o conftest.obj conftest.*; do
4156 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4160 break;;
4161 esac
4162done
4163else
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004165sed 's/^/| /' conftest.$ac_ext >&5
4166
Matthias Kloseb9621712010-04-24 17:59:49 +00004167{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004169as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004170See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004171fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004172rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4175$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004176OBJEXT=$ac_cv_objext
4177ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4179$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004180if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004185
Martin v. Löwis11437992002-04-12 09:54:03 +00004186int
4187main ()
4188{
4189#ifndef __GNUC__
4190 choke me
4191#endif
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004197if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 ac_compiler_gnu=yes
4199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004203ac_cv_c_compiler_gnu=$ac_compiler_gnu
4204
4205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4207$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4208if test $ac_compiler_gnu = yes; then
4209 GCC=yes
4210else
4211 GCC=
4212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004213ac_test_CFLAGS=${CFLAGS+set}
4214ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4216$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004217if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 ac_save_c_werror_flag=$ac_c_werror_flag
4221 ac_c_werror_flag=yes
4222 ac_cv_prog_cc_g=no
4223 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004226
Martin v. Löwis11437992002-04-12 09:54:03 +00004227int
4228main ()
4229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004235if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004236 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237else
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 CFLAGS=""
4239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240/* end confdefs.h. */
4241
4242int
4243main ()
4244{
4245
4246 ;
4247 return 0;
4248}
4249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004250if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251
Matthias Kloseb9621712010-04-24 17:59:49 +00004252else
4253 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256/* end confdefs.h. */
4257
4258int
4259main ()
4260{
4261
4262 ;
4263 return 0;
4264}
4265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004266if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4274 ac_c_werror_flag=$ac_save_c_werror_flag
4275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4277$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004278if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004280elif test $ac_cv_prog_cc_g = yes; then
4281 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004282 CFLAGS="-g -O2"
4283 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004284 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285 fi
4286else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 if test "$GCC" = yes; then
4288 CFLAGS="-O2"
4289 else
4290 CFLAGS=
4291 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4294$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004295if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004297else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004299ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004301/* end confdefs.h. */
4302#include <stdarg.h>
4303#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004304struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004305/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4306struct buf { int x; };
4307FILE * (*rcsopen) (struct buf *, struct stat *, int);
4308static char *e (p, i)
4309 char **p;
4310 int i;
4311{
4312 return p[i];
4313}
4314static char *f (char * (*g) (char **, int), char **p, ...)
4315{
4316 char *s;
4317 va_list v;
4318 va_start (v,p);
4319 s = g (p, va_arg (v,int));
4320 va_end (v);
4321 return s;
4322}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323
4324/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4325 function prototypes and stuff, but not '\xHH' hex character constants.
4326 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004328 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4329 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004331int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4334 inside strings and character constants. */
4335#define FOO(x) 'x'
4336int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4337
Skip Montanaro6dead952003-09-25 14:50:04 +00004338int test (int i, double x);
4339struct s1 {int (*f) (int a);};
4340struct s2 {int (*f) (double a);};
4341int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4342int argc;
4343char **argv;
4344int
4345main ()
4346{
4347return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4348 ;
4349 return 0;
4350}
4351_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4353 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004354do
4355 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359rm -f core conftest.err conftest.$ac_objext
4360 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004361done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004363CC=$ac_save_CC
4364
4365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366# AC_CACHE_VAL
4367case "x$ac_cv_prog_cc_c89" in
4368 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4370$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4373$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004374 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4377$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004378esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004379if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004380
Matthias Kloseb9621712010-04-24 17:59:49 +00004381fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004382
Martin v. Löwis11437992002-04-12 09:54:03 +00004383ac_ext=c
4384ac_cpp='$CPP $CPPFLAGS'
4385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4387ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004388
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004389
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004390
4391
Matthias Kloseb9621712010-04-24 17:59:49 +00004392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4393$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004396if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004398
4399 case $withval in
4400 no) with_cxx_main=no
4401 MAINCC='$(CC)';;
4402 yes) with_cxx_main=yes
4403 MAINCC='$(CXX)';;
4404 *) with_cxx_main=yes
4405 MAINCC=$withval
4406 if test -z "$CXX"
4407 then
4408 CXX=$withval
4409 fi;;
4410 esac
4411else
4412
4413 with_cxx_main=no
4414 MAINCC='$(CC)'
4415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416fi
4417
Matthias Kloseb9621712010-04-24 17:59:49 +00004418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4419$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004420
4421preset_cxx="$CXX"
4422if test -z "$CXX"
4423then
4424 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004425 gcc) if test -n "$ac_tool_prefix"; then
4426 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4427set dummy ${ac_tool_prefix}g++; ac_word=$2
4428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4429$as_echo_n "checking for $ac_word... " >&6; }
4430if ${ac_cv_path_CXX+:} false; then :
4431 $as_echo_n "(cached) " >&6
4432else
4433 case $CXX in
4434 [\\/]* | ?:[\\/]*)
4435 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4436 ;;
4437 *)
4438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4439for as_dir in notfound
4440do
4441 IFS=$as_save_IFS
4442 test -z "$as_dir" && as_dir=.
4443 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004444 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004445 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4447 break 2
4448 fi
4449done
4450 done
4451IFS=$as_save_IFS
4452
4453 ;;
4454esac
4455fi
4456CXX=$ac_cv_path_CXX
4457if test -n "$CXX"; then
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4459$as_echo "$CXX" >&6; }
4460else
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4462$as_echo "no" >&6; }
4463fi
4464
4465
4466fi
4467if test -z "$ac_cv_path_CXX"; then
4468 ac_pt_CXX=$CXX
4469 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004470set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4472$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004473if ${ac_cv_path_ac_pt_CXX+:} false; then :
4474 $as_echo_n "(cached) " >&6
4475else
4476 case $ac_pt_CXX in
4477 [\\/]* | ?:[\\/]*)
4478 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4479 ;;
4480 *)
4481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4482for as_dir in notfound
4483do
4484 IFS=$as_save_IFS
4485 test -z "$as_dir" && as_dir=.
4486 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004487 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004488 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4489 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4490 break 2
4491 fi
4492done
4493 done
4494IFS=$as_save_IFS
4495
4496 ;;
4497esac
4498fi
4499ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4500if test -n "$ac_pt_CXX"; then
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4502$as_echo "$ac_pt_CXX" >&6; }
4503else
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4505$as_echo "no" >&6; }
4506fi
4507
4508 if test "x$ac_pt_CXX" = x; then
4509 CXX="g++"
4510 else
4511 case $cross_compiling:$ac_tool_warned in
4512yes:)
4513{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4514$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4515ac_tool_warned=yes ;;
4516esac
4517 CXX=$ac_pt_CXX
4518 fi
4519else
4520 CXX="$ac_cv_path_CXX"
4521fi
4522 ;;
4523 cc) if test -n "$ac_tool_prefix"; then
4524 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4525set dummy ${ac_tool_prefix}c++; ac_word=$2
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4527$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004528if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004529 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004530else
4531 case $CXX in
4532 [\\/]* | ?:[\\/]*)
4533 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4534 ;;
4535 *)
4536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4537for as_dir in notfound
4538do
4539 IFS=$as_save_IFS
4540 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004541 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004543 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004545 break 2
4546 fi
4547done
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004549IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004551 ;;
4552esac
4553fi
4554CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004555if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4557$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004558else
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4560$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004562
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004563
4564fi
4565if test -z "$ac_cv_path_CXX"; then
4566 ac_pt_CXX=$CXX
4567 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004568set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4570$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004571if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004572 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004573else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004574 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004575 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004576 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 +00004577 ;;
4578 *)
4579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4580for as_dir in notfound
4581do
4582 IFS=$as_save_IFS
4583 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004584 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004585 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004586 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004587 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588 break 2
4589 fi
4590done
Matthias Kloseb9621712010-04-24 17:59:49 +00004591 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004592IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004593
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004594 ;;
4595esac
4596fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004597ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4598if test -n "$ac_pt_CXX"; then
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4600$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004601else
Matthias Kloseb9621712010-04-24 17:59:49 +00004602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004605
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004606 if test "x$ac_pt_CXX" = x; then
4607 CXX="c++"
4608 else
4609 case $cross_compiling:$ac_tool_warned in
4610yes:)
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4612$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4613ac_tool_warned=yes ;;
4614esac
4615 CXX=$ac_pt_CXX
4616 fi
4617else
4618 CXX="$ac_cv_path_CXX"
4619fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004620 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004621 clang|*/clang) if test -n "$ac_tool_prefix"; then
4622 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4623set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_path_CXX+:} false; then :
4627 $as_echo_n "(cached) " >&6
4628else
4629 case $CXX in
4630 [\\/]* | ?:[\\/]*)
4631 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4632 ;;
4633 *)
4634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in notfound
4636do
4637 IFS=$as_save_IFS
4638 test -z "$as_dir" && as_dir=.
4639 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004641 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643 break 2
4644 fi
4645done
4646 done
4647IFS=$as_save_IFS
4648
Ned Deilycbfb9a52012-06-23 16:02:19 -07004649 ;;
4650esac
4651fi
4652CXX=$ac_cv_path_CXX
4653if test -n "$CXX"; then
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4655$as_echo "$CXX" >&6; }
4656else
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
4659fi
4660
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004661
4662fi
4663if test -z "$ac_cv_path_CXX"; then
4664 ac_pt_CXX=$CXX
4665 # Extract the first word of "clang++", so it can be a program name with args.
4666set dummy clang++; ac_word=$2
4667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4668$as_echo_n "checking for $ac_word... " >&6; }
4669if ${ac_cv_path_ac_pt_CXX+:} false; then :
4670 $as_echo_n "(cached) " >&6
4671else
4672 case $ac_pt_CXX in
4673 [\\/]* | ?:[\\/]*)
4674 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4675 ;;
4676 *)
4677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4678for as_dir in notfound
4679do
4680 IFS=$as_save_IFS
4681 test -z "$as_dir" && as_dir=.
4682 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004684 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4686 break 2
4687 fi
4688done
4689 done
4690IFS=$as_save_IFS
4691
4692 ;;
4693esac
4694fi
4695ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4696if test -n "$ac_pt_CXX"; then
4697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4698$as_echo "$ac_pt_CXX" >&6; }
4699else
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701$as_echo "no" >&6; }
4702fi
4703
4704 if test "x$ac_pt_CXX" = x; then
4705 CXX="clang++"
4706 else
4707 case $cross_compiling:$ac_tool_warned in
4708yes:)
4709{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4710$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4711ac_tool_warned=yes ;;
4712esac
4713 CXX=$ac_pt_CXX
4714 fi
4715else
4716 CXX="$ac_cv_path_CXX"
4717fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004718 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004719 esac
4720 if test "$CXX" = "notfound"
4721 then
4722 CXX=""
4723 fi
4724fi
4725if test -z "$CXX"
4726then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004727 if test -n "$ac_tool_prefix"; then
4728 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4729 do
4730 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4731set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004734if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004735 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736else
4737 if test -n "$CXX"; then
4738 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4739else
4740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in $PATH
4742do
4743 IFS=$as_save_IFS
4744 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004747 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749 break 2
4750 fi
4751done
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004753IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004754
4755fi
4756fi
4757CXX=$ac_cv_prog_CXX
4758if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4760$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004761else
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4763$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764fi
4765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004766
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004767 test -n "$CXX" && break
4768 done
4769fi
4770if test -z "$CXX"; then
4771 ac_ct_CXX=$CXX
4772 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4773do
4774 # Extract the first word of "$ac_prog", so it can be a program name with args.
4775set dummy $ac_prog; ac_word=$2
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777$as_echo_n "checking for $ac_word... " >&6; }
4778if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4779 $as_echo_n "(cached) " >&6
4780else
4781 if test -n "$ac_ct_CXX"; then
4782 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4783else
4784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785for as_dir in $PATH
4786do
4787 IFS=$as_save_IFS
4788 test -z "$as_dir" && as_dir=.
4789 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004791 ac_cv_prog_ac_ct_CXX="$ac_prog"
4792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4793 break 2
4794 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796 done
4797IFS=$as_save_IFS
4798
4799fi
4800fi
4801ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4802if test -n "$ac_ct_CXX"; then
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4804$as_echo "$ac_ct_CXX" >&6; }
4805else
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
4808fi
4809
4810
4811 test -n "$ac_ct_CXX" && break
4812done
4813
4814 if test "x$ac_ct_CXX" = x; then
4815 CXX="notfound"
4816 else
4817 case $cross_compiling:$ac_tool_warned in
4818yes:)
4819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4821ac_tool_warned=yes ;;
4822esac
4823 CXX=$ac_ct_CXX
4824 fi
4825fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826
4827 if test "$CXX" = "notfound"
4828 then
4829 CXX=""
4830 fi
4831fi
4832if test "$preset_cxx" != "$CXX"
4833then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004834 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835
4836 By default, distutils will build C++ extension modules with \"$CXX\".
4837 If this is not intended, then set CXX on the configure command line.
4838 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004839$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840
4841 By default, distutils will build C++ extension modules with \"$CXX\".
4842 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004843 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844fi
4845
4846
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4848$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4849save_LDFLAGS="$LDFLAGS"
4850LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004851
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4853/* end confdefs.h. */
4854
4855int
4856main ()
4857{
4858
4859 ;
4860 return 0;
4861}
4862_ACEOF
4863if ac_fn_c_try_link "$LINENO"; then :
4864 NO_AS_NEEDED="-Wl,--no-as-needed"
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4866$as_echo "yes" >&6; }
4867else
4868 NO_AS_NEEDED=""
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870$as_echo "no" >&6; }
4871fi
4872rm -f core conftest.err conftest.$ac_objext \
4873 conftest$ac_exeext conftest.$ac_ext
4874LDFLAGS="$save_LDFLAGS"
4875
4876
4877
4878# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004879ac_ext=c
4880ac_cpp='$CPP $CPPFLAGS'
4881ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4882ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4883ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4885$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004886# On Suns, sometimes $CPP names a directory.
4887if test -n "$CPP" && test -d "$CPP"; then
4888 CPP=
4889fi
4890if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004891 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004893else
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 # Double quotes because CPP needs to be expanded
4895 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4896 do
4897 ac_preproc_ok=false
4898for ac_c_preproc_warn_flag in '' yes
4899do
4900 # Use a header file that comes with gcc, so configuring glibc
4901 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004902 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4903 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004904 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004905 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004907/* end confdefs.h. */
4908#ifdef __STDC__
4909# include <limits.h>
4910#else
4911# include <assert.h>
4912#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004913 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004915if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004916
Matthias Kloseb9621712010-04-24 17:59:49 +00004917else
Martin v. Löwis11437992002-04-12 09:54:03 +00004918 # Broken: fails on valid input.
4919continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004920fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004921rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004923 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004924 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004927#include <ac_nonexistent.h>
4928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004929if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004930 # Broken: success on invalid input.
4931continue
4932else
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 # Passes both tests.
4934ac_preproc_ok=:
4935break
4936fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004937rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004938
4939done
4940# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004941rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004942if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004943 break
4944fi
4945
4946 done
4947 ac_cv_prog_CPP=$CPP
4948
4949fi
4950 CPP=$ac_cv_prog_CPP
4951else
4952 ac_cv_prog_CPP=$CPP
4953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4955$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004956ac_preproc_ok=false
4957for ac_c_preproc_warn_flag in '' yes
4958do
4959 # Use a header file that comes with gcc, so configuring glibc
4960 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004961 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4962 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004963 # On the NeXT, cc -E runs the code through the compiler's parser,
4964 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004966/* end confdefs.h. */
4967#ifdef __STDC__
4968# include <limits.h>
4969#else
4970# include <assert.h>
4971#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004972 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004974if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004975
Matthias Kloseb9621712010-04-24 17:59:49 +00004976else
Martin v. Löwis11437992002-04-12 09:54:03 +00004977 # Broken: fails on valid input.
4978continue
4979fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004980rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004982 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004983 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004986#include <ac_nonexistent.h>
4987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004988if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004989 # Broken: success on invalid input.
4990continue
4991else
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 # Passes both tests.
4993ac_preproc_ok=:
4994break
4995fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004996rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004997
4998done
4999# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005000rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005001if $ac_preproc_ok; then :
5002
Martin v. Löwis11437992002-04-12 09:54:03 +00005003else
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005006as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005007See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005008fi
5009
5010ac_ext=c
5011ac_cpp='$CPP $CPPFLAGS'
5012ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5013ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5014ac_compiler_gnu=$ac_cv_c_compiler_gnu
5015
5016
Matthias Kloseb9621712010-04-24 17:59:49 +00005017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5018$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005019if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005020 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005021else
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005023 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 # Loop through the user's path and test for each of PROGNAME-LIST
5025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5027do
5028 IFS=$as_save_IFS
5029 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 for ac_prog in grep ggrep; do
5031 for ac_exec_ext in '' $ac_executable_extensions; do
5032 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005033 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005034# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005035 # Check for GNU $ac_path_GREP
5036case `"$ac_path_GREP" --version 2>&1` in
5037*GNU*)
5038 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5039*)
5040 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042 while :
5043 do
5044 cat "conftest.in" "conftest.in" >"conftest.tmp"
5045 mv "conftest.tmp" "conftest.in"
5046 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5049 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005051 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5052 # Best one so far, save it but keep looking for a better one
5053 ac_cv_path_GREP="$ac_path_GREP"
5054 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005055 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056 # 10*(2^10) chars as input seems more than enough
5057 test $ac_count -gt 10 && break
5058 done
5059 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5060esac
5061
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 $ac_path_GREP_found && break 3
5063 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005066IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005068 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 +00005069 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005070else
5071 ac_cv_path_GREP=$GREP
5072fi
5073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5076$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077 GREP="$ac_cv_path_GREP"
5078
5079
Matthias Kloseb9621712010-04-24 17:59:49 +00005080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5081$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005082if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005084else
5085 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5086 then ac_cv_path_EGREP="$GREP -E"
5087 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 # Loop through the user's path and test for each of PROGNAME-LIST
5091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5093do
5094 IFS=$as_save_IFS
5095 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 for ac_prog in egrep; do
5097 for ac_exec_ext in '' $ac_executable_extensions; do
5098 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005099 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005100# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101 # Check for GNU $ac_path_EGREP
5102case `"$ac_path_EGREP" --version 2>&1` in
5103*GNU*)
5104 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5105*)
5106 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005108 while :
5109 do
5110 cat "conftest.in" "conftest.in" >"conftest.tmp"
5111 mv "conftest.tmp" "conftest.in"
5112 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005114 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5115 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005117 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5118 # Best one so far, save it but keep looking for a better one
5119 ac_cv_path_EGREP="$ac_path_EGREP"
5120 ac_path_EGREP_max=$ac_count
5121 fi
5122 # 10*(2^10) chars as input seems more than enough
5123 test $ac_count -gt 10 && break
5124 done
5125 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5126esac
5127
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 $ac_path_EGREP_found && break 3
5129 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005130 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005132IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005134 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 +00005135 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005136else
5137 ac_cv_path_EGREP=$EGREP
5138fi
5139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005140 fi
5141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5143$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005144 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005145
5146
Matthias Kloseb9621712010-04-24 17:59:49 +00005147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5148$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005149if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005150 $as_echo_n "(cached) " >&6
5151else
5152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005153/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005154#include <stdlib.h>
5155#include <stdarg.h>
5156#include <string.h>
5157#include <float.h>
5158
5159int
5160main ()
5161{
5162
5163 ;
5164 return 0;
5165}
5166_ACEOF
5167if ac_fn_c_try_compile "$LINENO"; then :
5168 ac_cv_header_stdc=yes
5169else
5170 ac_cv_header_stdc=no
5171fi
5172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5173
5174if test $ac_cv_header_stdc = yes; then
5175 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5177/* end confdefs.h. */
5178#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005179
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005180_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005182 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005184else
Matthias Kloseb9621712010-04-24 17:59:49 +00005185 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005186fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005187rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188
Matthias Kloseb9621712010-04-24 17:59:49 +00005189fi
5190
5191if test $ac_cv_header_stdc = yes; then
5192 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5194/* end confdefs.h. */
5195#include <stdlib.h>
5196
5197_ACEOF
5198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5199 $EGREP "free" >/dev/null 2>&1; then :
5200
5201else
5202 ac_cv_header_stdc=no
5203fi
5204rm -f conftest*
5205
5206fi
5207
5208if test $ac_cv_header_stdc = yes; then
5209 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5210 if test "$cross_compiling" = yes; then :
5211 :
5212else
5213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5214/* end confdefs.h. */
5215#include <ctype.h>
5216#include <stdlib.h>
5217#if ((' ' & 0x0FF) == 0x020)
5218# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5219# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5220#else
5221# define ISLOWER(c) \
5222 (('a' <= (c) && (c) <= 'i') \
5223 || ('j' <= (c) && (c) <= 'r') \
5224 || ('s' <= (c) && (c) <= 'z'))
5225# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5226#endif
5227
5228#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5229int
5230main ()
5231{
5232 int i;
5233 for (i = 0; i < 256; i++)
5234 if (XOR (islower (i), ISLOWER (i))
5235 || toupper (i) != TOUPPER (i))
5236 return 2;
5237 return 0;
5238}
5239_ACEOF
5240if ac_fn_c_try_run "$LINENO"; then :
5241
5242else
5243 ac_cv_header_stdc=no
5244fi
5245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5246 conftest.$ac_objext conftest.beam conftest.$ac_ext
5247fi
5248
5249fi
5250fi
5251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5252$as_echo "$ac_cv_header_stdc" >&6; }
5253if test $ac_cv_header_stdc = yes; then
5254
5255$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5256
5257fi
5258
5259# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5260for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5261 inttypes.h stdint.h unistd.h
5262do :
5263 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5264ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5265"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005266if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005267 cat >>confdefs.h <<_ACEOF
5268#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5269_ACEOF
5270
5271fi
5272
5273done
5274
5275
5276
5277 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 +02005278if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005279 MINIX=yes
5280else
5281 MINIX=
5282fi
5283
5284
5285 if test "$MINIX" = yes; then
5286
5287$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5288
5289
5290$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5291
5292
5293$as_echo "#define _MINIX 1" >>confdefs.h
5294
5295 fi
5296
5297
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5299$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005300if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005301 $as_echo_n "(cached) " >&6
5302else
5303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5304/* end confdefs.h. */
5305
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005306# define __EXTENSIONS__ 1
5307 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005308int
5309main ()
5310{
5311
5312 ;
5313 return 0;
5314}
5315_ACEOF
5316if ac_fn_c_try_compile "$LINENO"; then :
5317 ac_cv_safe_to_define___extensions__=yes
5318else
5319 ac_cv_safe_to_define___extensions__=no
5320fi
5321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5322fi
5323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5324$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5325 test $ac_cv_safe_to_define___extensions__ = yes &&
5326 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5327
5328 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5329
5330 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5331
5332 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5333
5334 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5335
5336
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338# Check for unsupported systems
5339case $ac_sys_system/$ac_sys_release in
5340atheos*|Linux*/1*)
5341 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5342 echo See README for details.
5343 exit 1;;
5344esac
5345
5346
Matthias Kloseb9621712010-04-24 17:59:49 +00005347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5348$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005349
5350# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005351if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 withval=$with_suffix;
5353 case $withval in
5354 no) EXEEXT=;;
5355 yes) EXEEXT=.exe;;
5356 *) EXEEXT=$withval;;
5357 esac
5358fi
5359
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5361$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363# Test whether we're running on a non-case-sensitive system, in which
5364# case we give a warning if no ext is given
5365
Matthias Kloseb9621712010-04-24 17:59:49 +00005366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5367$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368if test ! -d CaseSensitiveTestDir; then
5369mkdir CaseSensitiveTestDir
5370fi
5371
5372if test -d casesensitivetestdir
5373then
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5375$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376 BUILDEXEEXT=.exe
5377else
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5379$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380 BUILDEXEEXT=$EXEEXT
5381fi
5382rmdir CaseSensitiveTestDir
5383
5384case $MACHDEP in
5385bsdos*)
5386 case $CC in
5387 gcc) CC="$CC -D_HAVE_BSDI";;
5388 esac;;
5389esac
5390
5391case $ac_sys_system in
5392hp*|HP*)
5393 case $CC in
5394 cc|*/cc) CC="$CC -Ae";;
5395 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396esac
5397
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005398MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5399
5400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401
5402
Matthias Kloseb9621712010-04-24 17:59:49 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5404$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405if test -z "$LIBRARY"
5406then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005407 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5410$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411
5412# LDLIBRARY is the name of the library to link against (as opposed to the
5413# name of the library into which to insert object files). BLDLIBRARY is also
5414# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5415# is blank as the main program is not linked directly against LDLIBRARY.
5416# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5417# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5418# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5419# DLLLIBRARY is the shared (i.e., DLL) library.
5420#
5421# RUNSHARED is used to run shared python without installed libraries
5422#
5423# INSTSONAME is the name of the shared library that will be use to install
5424# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005425#
5426# LDVERSION is the shared library version number, normally the Python version
5427# with the ABI build flags appended.
5428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429
5430
5431
5432
5433
5434
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436LDLIBRARY="$LIBRARY"
5437BLDLIBRARY='$(LDLIBRARY)'
5438INSTSONAME='$(LDLIBRARY)'
5439DLLLIBRARY=''
5440LDLIBRARYDIR=''
5441RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005442LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443
5444# LINKCC is the command that links the python executable -- default is $(CC).
5445# If CXX is set, and if it is needed to link a main function that was
5446# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5447# python might then depend on the C++ runtime
5448# This is altered for AIX in order to build the export list before
5449# linking.
5450
Matthias Kloseb9621712010-04-24 17:59:49 +00005451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5452$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453if test -z "$LINKCC"
5454then
5455 LINKCC='$(PURIFY) $(MAINCC)'
5456 case $ac_sys_system in
5457 AIX*)
5458 exp_extra="\"\""
5459 if test $ac_sys_release -ge 5 -o \
5460 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5461 exp_extra="."
5462 fi
5463 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464 QNX*)
5465 # qcc must be used because the other compilers do not
5466 # support -N.
5467 LINKCC=qcc;;
5468 esac
5469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5471$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472
5473# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5474# make sure we default having it set to "no": this is used by
5475# distutils.unixccompiler to know if it should add --enable-new-dtags
5476# to linker command lines, and failing to detect GNU ld simply results
5477# in the same bahaviour as before.
5478
Matthias Kloseb9621712010-04-24 17:59:49 +00005479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5480$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005481ac_prog=ld
5482if test "$GCC" = yes; then
5483 ac_prog=`$CC -print-prog-name=ld`
5484fi
5485case `"$ac_prog" -V 2>&1 < /dev/null` in
5486 *GNU*)
5487 GNULD=yes;;
5488 *)
5489 GNULD=no;;
5490esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5492$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5495$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005496if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005497 $as_echo_n "(cached) " >&6
5498else
5499 ac_cv_c_inline=no
5500for ac_kw in inline __inline__ __inline; do
5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5502/* end confdefs.h. */
5503#ifndef __cplusplus
5504typedef int foo_t;
5505static $ac_kw foo_t static_foo () {return 0; }
5506$ac_kw foo_t foo () {return 0; }
5507#endif
5508
5509_ACEOF
5510if ac_fn_c_try_compile "$LINENO"; then :
5511 ac_cv_c_inline=$ac_kw
5512fi
5513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514 test "$ac_cv_c_inline" != no && break
5515done
5516
5517fi
5518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5519$as_echo "$ac_cv_c_inline" >&6; }
5520
5521case $ac_cv_c_inline in
5522 inline | yes) ;;
5523 *)
5524 case $ac_cv_c_inline in
5525 no) ac_val=;;
5526 *) ac_val=$ac_cv_c_inline;;
5527 esac
5528 cat >>confdefs.h <<_ACEOF
5529#ifndef __cplusplus
5530#define inline $ac_val
5531#endif
5532_ACEOF
5533 ;;
5534esac
5535
5536if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005537
5538$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005539
5540
5541fi
5542
5543
Matthias Kloseb9621712010-04-24 17:59:49 +00005544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5545$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005547if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548 enableval=$enable_shared;
5549fi
5550
5551
5552if test -z "$enable_shared"
5553then
5554 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005555 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556 enable_shared="yes";;
5557 *)
5558 enable_shared="no";;
5559 esac
5560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5562$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563
Matthias Kloseb9621712010-04-24 17:59:49 +00005564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5565$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005567if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005568 enableval=$enable_profiling;
5569fi
5570
5571if test "x$enable_profiling" = xyes; then
5572 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005573 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575/* end confdefs.h. */
5576int main() { return 0; }
5577_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005578if ac_fn_c_try_link "$LINENO"; then :
5579
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005581 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005583rm -f core conftest.err conftest.$ac_objext \
5584 conftest$ac_exeext conftest.$ac_ext
5585 CC="$ac_save_cc"
5586else
5587 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5590$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591
doko@ubuntu.comba015832012-06-30 16:52:05 +02005592if test "x$enable_profiling" = xyes; then
5593 BASECFLAGS="-pg $BASECFLAGS"
5594 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595fi
5596
Matthias Kloseb9621712010-04-24 17:59:49 +00005597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5598$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599
5600# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5601# library that we build, but we do not want to link against it (we
5602# will find it with a -framework option). For this reason there is an
5603# extra variable BLDLIBRARY against which Python and the extension
5604# modules are linked, BLDLIBRARY. This is normally the same as
5605# LDLIBRARY, but empty for MacOSX framework builds.
5606if test "$enable_framework"
5607then
5608 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005609 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610 BLDLIBRARY=''
5611else
5612 BLDLIBRARY='$(LDLIBRARY)'
5613fi
5614
5615# Other platforms follow
5616if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005617 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618
Matthias Kloseb9621712010-04-24 17:59:49 +00005619$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620
5621 case $ac_sys_system in
5622 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005623 LDLIBRARY='libpython$(LDVERSION).dll.a'
5624 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625 ;;
5626 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005627 LDLIBRARY='libpython$(LDVERSION).so'
5628 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005629 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005631 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005632 then
5633 PY3LIBRARY=libpython3.so
5634 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005636 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005637 LDLIBRARY='libpython$(LDVERSION).so'
5638 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005639 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640 case $ac_sys_system in
5641 FreeBSD*)
5642 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5643 ;;
5644 esac
5645 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005646 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005647 then
5648 PY3LIBRARY=libpython3.so
5649 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650 ;;
5651 hp*|HP*)
5652 case `uname -m` in
5653 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005654 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 ;;
5656 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005657 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 ;;
5659 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005660 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005661 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005664 LDLIBRARY='libpython$(LDVERSION).dylib'
5665 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005666 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005668 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005669 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005670 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005671 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672
5673 esac
5674else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005675 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 case $ac_sys_system in
5677 CYGWIN*)
5678 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005679 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 ;;
5681 esac
5682fi
5683
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005684if test "$cross_compiling" = yes; then
5685 RUNSHARED=
5686fi
5687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5689$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690
5691if test -n "$ac_tool_prefix"; then
5692 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5693set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5695$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005696if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005697 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698else
5699 if test -n "$RANLIB"; then
5700 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5701else
5702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703for as_dir in $PATH
5704do
5705 IFS=$as_save_IFS
5706 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005707 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711 break 2
5712 fi
5713done
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715IFS=$as_save_IFS
5716
5717fi
5718fi
5719RANLIB=$ac_cv_prog_RANLIB
5720if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5722$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723else
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5725$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726fi
5727
5728
5729fi
5730if test -z "$ac_cv_prog_RANLIB"; then
5731 ac_ct_RANLIB=$RANLIB
5732 # Extract the first word of "ranlib", so it can be a program name with args.
5733set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5735$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005736if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738else
5739 if test -n "$ac_ct_RANLIB"; then
5740 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5741else
5742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743for as_dir in $PATH
5744do
5745 IFS=$as_save_IFS
5746 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 break 2
5752 fi
5753done
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755IFS=$as_save_IFS
5756
5757fi
5758fi
5759ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5760if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5762$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763else
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5765$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766fi
5767
5768 if test "x$ac_ct_RANLIB" = x; then
5769 RANLIB=":"
5770 else
5771 case $cross_compiling:$ac_tool_warned in
5772yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5774$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775ac_tool_warned=yes ;;
5776esac
5777 RANLIB=$ac_ct_RANLIB
5778 fi
5779else
5780 RANLIB="$ac_cv_prog_RANLIB"
5781fi
5782
5783
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005784if test -n "$ac_tool_prefix"; then
5785 for ac_prog in ar aal
5786 do
5787 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5788set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5790$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005791if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005792 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793else
5794 if test -n "$AR"; then
5795 ac_cv_prog_AR="$AR" # Let the user override the test.
5796else
5797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5798for as_dir in $PATH
5799do
5800 IFS=$as_save_IFS
5801 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005802 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005804 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806 break 2
5807 fi
5808done
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810IFS=$as_save_IFS
5811
5812fi
5813fi
5814AR=$ac_cv_prog_AR
5815if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5817$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818else
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5820$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821fi
5822
5823
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005824 test -n "$AR" && break
5825 done
5826fi
5827if test -z "$AR"; then
5828 ac_ct_AR=$AR
5829 for ac_prog in ar aal
5830do
5831 # Extract the first word of "$ac_prog", so it can be a program name with args.
5832set dummy $ac_prog; ac_word=$2
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5834$as_echo_n "checking for $ac_word... " >&6; }
5835if ${ac_cv_prog_ac_ct_AR+:} false; then :
5836 $as_echo_n "(cached) " >&6
5837else
5838 if test -n "$ac_ct_AR"; then
5839 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5840else
5841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5842for as_dir in $PATH
5843do
5844 IFS=$as_save_IFS
5845 test -z "$as_dir" && as_dir=.
5846 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005848 ac_cv_prog_ac_ct_AR="$ac_prog"
5849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5850 break 2
5851 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005853 done
5854IFS=$as_save_IFS
5855
5856fi
5857fi
5858ac_ct_AR=$ac_cv_prog_ac_ct_AR
5859if test -n "$ac_ct_AR"; then
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5861$as_echo "$ac_ct_AR" >&6; }
5862else
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5864$as_echo "no" >&6; }
5865fi
5866
5867
5868 test -n "$ac_ct_AR" && break
5869done
5870
5871 if test "x$ac_ct_AR" = x; then
5872 AR="ar"
5873 else
5874 case $cross_compiling:$ac_tool_warned in
5875yes:)
5876{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5877$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5878ac_tool_warned=yes ;;
5879esac
5880 AR=$ac_ct_AR
5881 fi
5882fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
5884
5885# tweak ARFLAGS only if the user didn't set it on the command line
5886
5887if test -z "$ARFLAGS"
5888then
5889 ARFLAGS="rc"
5890fi
5891
doko@ubuntu.com58844492012-06-30 18:25:32 +02005892if test -n "$ac_tool_prefix"; then
5893 for ac_prog in readelf
5894 do
5895 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5896set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5898$as_echo_n "checking for $ac_word... " >&6; }
5899if ${ac_cv_prog_READELF+:} false; then :
5900 $as_echo_n "(cached) " >&6
5901else
5902 if test -n "$READELF"; then
5903 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5904else
5905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5906for as_dir in $PATH
5907do
5908 IFS=$as_save_IFS
5909 test -z "$as_dir" && as_dir=.
5910 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005912 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5914 break 2
5915 fi
5916done
5917 done
5918IFS=$as_save_IFS
5919
5920fi
5921fi
5922READELF=$ac_cv_prog_READELF
5923if test -n "$READELF"; then
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5925$as_echo "$READELF" >&6; }
5926else
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928$as_echo "no" >&6; }
5929fi
5930
5931
5932 test -n "$READELF" && break
5933 done
5934fi
5935if test -z "$READELF"; then
5936 ac_ct_READELF=$READELF
5937 for ac_prog in readelf
5938do
5939 # Extract the first word of "$ac_prog", so it can be a program name with args.
5940set dummy $ac_prog; ac_word=$2
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5942$as_echo_n "checking for $ac_word... " >&6; }
5943if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5944 $as_echo_n "(cached) " >&6
5945else
5946 if test -n "$ac_ct_READELF"; then
5947 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5948else
5949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950for as_dir in $PATH
5951do
5952 IFS=$as_save_IFS
5953 test -z "$as_dir" && as_dir=.
5954 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005956 ac_cv_prog_ac_ct_READELF="$ac_prog"
5957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5958 break 2
5959 fi
5960done
5961 done
5962IFS=$as_save_IFS
5963
5964fi
5965fi
5966ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5967if test -n "$ac_ct_READELF"; then
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5969$as_echo "$ac_ct_READELF" >&6; }
5970else
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972$as_echo "no" >&6; }
5973fi
5974
5975
5976 test -n "$ac_ct_READELF" && break
5977done
5978
5979 if test "x$ac_ct_READELF" = x; then
5980 READELF=":"
5981 else
5982 case $cross_compiling:$ac_tool_warned in
5983yes:)
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5985$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5986ac_tool_warned=yes ;;
5987esac
5988 READELF=$ac_ct_READELF
5989 fi
5990fi
5991
5992if test "$cross_compiling" = yes; then
5993 case "$READELF" in
5994 readelf|:)
5995 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5996 ;;
5997 esac
5998fi
5999
6000
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001
Matthias Klosec4c48422012-10-21 23:05:35 +02006002for ac_prog in python$PACKAGE_VERSION python3 python
6003do
6004 # Extract the first word of "$ac_prog", so it can be a program name with args.
6005set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6007$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006008if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006009 $as_echo_n "(cached) " >&6
6010else
Matthias Klosec4c48422012-10-21 23:05:35 +02006011 if test -n "$PYTHON"; then
6012 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006013else
6014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6015for as_dir in $PATH
6016do
6017 IFS=$as_save_IFS
6018 test -z "$as_dir" && as_dir=.
6019 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006021 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6023 break 2
6024 fi
6025done
6026 done
6027IFS=$as_save_IFS
6028
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006029fi
6030fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006031PYTHON=$ac_cv_prog_PYTHON
6032if test -n "$PYTHON"; then
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6034$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006035else
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037$as_echo "no" >&6; }
6038fi
6039
6040
Matthias Klosec4c48422012-10-21 23:05:35 +02006041 test -n "$PYTHON" && break
6042done
6043test -n "$PYTHON" || PYTHON="not-found"
6044
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006045if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006046 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6047else
6048 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006049fi
6050
6051
Kushal Das02d23a22014-04-15 23:50:06 +05306052for ac_prog in python$PACKAGE_VERSION python3 python
6053do
6054 # Extract the first word of "$ac_prog", so it can be a program name with args.
6055set dummy $ac_prog; ac_word=$2
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6057$as_echo_n "checking for $ac_word... " >&6; }
6058if ${ac_cv_prog_PYTHON+:} false; then :
6059 $as_echo_n "(cached) " >&6
6060else
6061 if test -n "$PYTHON"; then
6062 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6063else
6064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6065for as_dir in $PATH
6066do
6067 IFS=$as_save_IFS
6068 test -z "$as_dir" && as_dir=.
6069 for ac_exec_ext in '' $ac_executable_extensions; do
6070 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6071 ac_cv_prog_PYTHON="$ac_prog"
6072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6073 break 2
6074 fi
6075done
6076 done
6077IFS=$as_save_IFS
6078
6079fi
6080fi
6081PYTHON=$ac_cv_prog_PYTHON
6082if test -n "$PYTHON"; then
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6084$as_echo "$PYTHON" >&6; }
6085else
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6087$as_echo "no" >&6; }
6088fi
6089
6090
6091 test -n "$PYTHON" && break
6092done
6093test -n "$PYTHON" || PYTHON="not-found"
6094
6095if test "$PYTHON" = not-found; then
6096 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6097else
6098 OPCODEHGEN="$PYTHON"
6099fi
6100
6101
6102
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103case $MACHDEP in
6104bsdos*|hp*|HP*)
6105 # install -d does not work on BSDI or HP-UX
6106 if test -z "$INSTALL"
6107 then
6108 INSTALL="${srcdir}/install-sh -c"
6109 fi
6110esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006111# Find a good install program. We prefer a C program (faster),
6112# so one script is as good as another. But avoid the broken or
6113# incompatible versions:
6114# SysV /etc/install, /usr/sbin/install
6115# SunOS /usr/etc/install
6116# IRIX /sbin/install
6117# AIX /bin/install
6118# AmigaOS /C/install, which installs bootblocks on floppy discs
6119# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6120# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6121# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6122# OS/2's system install, which has a completely different semantic
6123# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006124# Reject install programs that cannot install multiple files.
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6126$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006127if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006128if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006129 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130else
6131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6132for as_dir in $PATH
6133do
6134 IFS=$as_save_IFS
6135 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 # Account for people who put trailing slashes in PATH elements.
6137case $as_dir/ in #((
6138 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006140 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141 /usr/ucb/* ) ;;
6142 *)
6143 # OSF1 and SCO ODT 3.0 have their own names for install.
6144 # Don't use installbsd from OSF since it installs stuff as root
6145 # by default.
6146 for ac_prog in ginstall scoinst install; do
6147 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006148 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149 if test $ac_prog = install &&
6150 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6151 # AIX install. It has an incompatible calling convention.
6152 :
6153 elif test $ac_prog = install &&
6154 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6155 # program-specific install script used by HP pwplus--don't use.
6156 :
6157 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006158 rm -rf conftest.one conftest.two conftest.dir
6159 echo one > conftest.one
6160 echo two > conftest.two
6161 mkdir conftest.dir
6162 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6163 test -s conftest.one && test -s conftest.two &&
6164 test -s conftest.dir/conftest.one &&
6165 test -s conftest.dir/conftest.two
6166 then
6167 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6168 break 3
6169 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170 fi
6171 fi
6172 done
6173 done
6174 ;;
6175esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006176
6177 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178IFS=$as_save_IFS
6179
Matthias Kloseb9621712010-04-24 17:59:49 +00006180rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181
6182fi
6183 if test "${ac_cv_path_install+set}" = set; then
6184 INSTALL=$ac_cv_path_install
6185 else
6186 # As a last resort, use the slow shell script. Don't cache a
6187 # value for INSTALL within a source directory, because that will
6188 # break other packages using the cache if that directory is
6189 # removed, or if the value is a relative name.
6190 INSTALL=$ac_install_sh
6191 fi
6192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6194$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195
6196# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6197# It thinks the first close brace ends the variable substitution.
6198test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6199
6200test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6201
6202test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6203
Matthias Klose93a0ef12012-03-15 18:08:34 +01006204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6205$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6206if test -z "$MKDIR_P"; then
6207 if ${ac_cv_path_mkdir+:} false; then :
6208 $as_echo_n "(cached) " >&6
6209else
6210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6211for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6212do
6213 IFS=$as_save_IFS
6214 test -z "$as_dir" && as_dir=.
6215 for ac_prog in mkdir gmkdir; do
6216 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006217 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006218 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6219 'mkdir (GNU coreutils) '* | \
6220 'mkdir (coreutils) '* | \
6221 'mkdir (fileutils) '4.1*)
6222 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6223 break 3;;
6224 esac
6225 done
6226 done
6227 done
6228IFS=$as_save_IFS
6229
6230fi
6231
6232 test -d ./--version && rmdir ./--version
6233 if test "${ac_cv_path_mkdir+set}" = set; then
6234 MKDIR_P="$ac_cv_path_mkdir -p"
6235 else
6236 # As a last resort, use the slow shell script. Don't cache a
6237 # value for MKDIR_P within a source directory, because that will
6238 # break other packages using the cache if that directory is
6239 # removed, or if the value is a relative name.
6240 MKDIR_P="$ac_install_sh -d"
6241 fi
6242fi
6243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6244$as_echo "$MKDIR_P" >&6; }
6245
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246
6247# Not every filesystem supports hard links
6248
6249if test -z "$LN" ; then
6250 case $ac_sys_system in
6251 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006252 *) LN=ln;;
6253 esac
6254fi
6255
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006256# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006257
6258ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006259
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6262$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263
6264# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006265if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266 withval=$with_pydebug;
6267if test "$withval" != no
6268then
6269
Matthias Kloseb9621712010-04-24 17:59:49 +00006270$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271
Matthias Kloseb9621712010-04-24 17:59:49 +00006272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6273$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006275 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006276else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6277$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278fi
6279else
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6281$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282fi
6283
6284
6285# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6286# merged with this chunk of code?
6287
6288# Optimizer/debugger flags
6289# ------------------------
6290# (The following bit of code is complicated enough - please keep things
6291# indented properly. Just pretend you're editing Python code. ;-)
6292
6293# There are two parallel sets of case statements below, one that checks to
6294# see if OPT was set and one that does BASECFLAGS setting based upon
6295# compiler and platform. BASECFLAGS tweaks need to be made even if the
6296# user set OPT.
6297
6298# tweak OPT based on compiler and platform, only if the user didn't set
6299# it on the command line
6300
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006301if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302then
6303 case $GCC in
6304 yes)
6305 if test "$CC" != 'g++' ; then
6306 STRICT_PROTO="-Wstrict-prototypes"
6307 fi
6308 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6309 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6310 WRAP="-fwrapv"
6311 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006312
6313 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006314 case $CC in
6315 *clang*) WRAP="-fwrapv"
6316 ;;
6317 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006318
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319 case $ac_cv_prog_cc_g in
6320 yes)
6321 if test "$Py_DEBUG" = 'true' ; then
6322 # Optimization messes up debuggers, so turn it off for
6323 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006324 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 else
6326 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6327 fi
6328 ;;
6329 *)
6330 OPT="-O3 -Wall $STRICT_PROTO"
6331 ;;
6332 esac
6333 case $ac_sys_system in
6334 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6335 ;;
6336 esac
6337 ;;
6338
6339 *)
6340 OPT="-O"
6341 ;;
6342 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006343fi
6344
6345
6346
6347# The -arch flags for universal builds on OSX
6348UNIVERSAL_ARCH_FLAGS=
6349
6350
6351# tweak BASECFLAGS based on compiler and platform
6352case $GCC in
6353yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006354 # Python doesn't violate C99 aliasing rules, but older versions of
6355 # GCC produce warnings for legal Python code. Enable
6356 # -fno-strict-aliasing on versions of GCC that support but produce
6357 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6359$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360 ac_save_cc="$CC"
6361 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006362 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006363 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006364 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006365else
Matthias Kloseb9621712010-04-24 17:59:49 +00006366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006368
Matthias Kloseb159a552010-04-25 21:00:44 +00006369
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006370int
6371main ()
6372{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006373
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006374 ;
6375 return 0;
6376}
Matthias Kloseb159a552010-04-25 21:00:44 +00006377
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006379if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006380
6381 CC="$ac_save_cc -fstrict-aliasing"
6382 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006384/* end confdefs.h. */
6385
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006386 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006387int
6388main ()
6389{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006390double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006391 ;
6392 return 0;
6393}
Matthias Kloseb159a552010-04-25 21:00:44 +00006394
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006396if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006397
6398 ac_cv_no_strict_aliasing=no
6399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006400else
Matthias Kloseb159a552010-04-25 21:00:44 +00006401
6402 ac_cv_no_strict_aliasing=yes
6403
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006404fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006406
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006407else
Matthias Kloseb159a552010-04-25 21:00:44 +00006408
6409 ac_cv_no_strict_aliasing=no
6410
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006413fi
6414
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006415 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006416 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6418$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006419 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420 then
6421 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6422 fi
6423
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6425$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6426 ac_save_cc="$CC"
6427 CC="$CC -Wunused-result -Werror"
6428 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006429 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006430 $as_echo_n "(cached) " >&6
6431else
6432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6433/* end confdefs.h. */
6434
6435
6436int
6437main ()
6438{
6439
6440 ;
6441 return 0;
6442}
6443
6444_ACEOF
6445if ac_fn_c_try_compile "$LINENO"; then :
6446
6447 ac_cv_disable_unused_result_warning=yes
6448
6449else
6450
6451 ac_cv_disable_unused_result_warning=no
6452
6453fi
6454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6455fi
6456
6457 CFLAGS="$save_CFLAGS"
6458 CC="$ac_save_cc"
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6460$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6461
6462 if test $ac_cv_disable_unused_result_warning = yes
6463 then
6464 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6465 fi
6466
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6468$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6469 ac_save_cc="$CC"
6470 CC="$CC -Werror=declaration-after-statement"
6471 save_CFLAGS="$CFLAGS"
6472 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6473 $as_echo_n "(cached) " >&6
6474else
6475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6476/* end confdefs.h. */
6477
6478
6479int
6480main ()
6481{
6482
6483 ;
6484 return 0;
6485}
6486
6487_ACEOF
6488if ac_fn_c_try_compile "$LINENO"; then :
6489
6490 ac_cv_declaration_after_statement_warning=yes
6491
6492else
6493
6494 ac_cv_declaration_after_statement_warning=no
6495
6496fi
6497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6498fi
6499
6500 CFLAGS="$save_CFLAGS"
6501 CC="$ac_save_cc"
6502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6503$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6504
6505 if test $ac_cv_declaration_after_statement_warning = yes
6506 then
6507 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6508 fi
6509
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006510 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6511 # support. Without this, treatment of subnormals doesn't follow
6512 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006513 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006514 alpha*)
6515 BASECFLAGS="$BASECFLAGS -mieee"
6516 ;;
6517 esac
6518
6519 case $ac_sys_system in
6520 SCO_SV*)
6521 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6522 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006523
6524 # is there any other compiler on Darwin besides gcc?
6525 Darwin*)
6526 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6527 # used to be here, but non-Apple gcc doesn't accept them.
6528 if test "${CC}" = gcc
6529 then
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006531$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006532 case "${UNIVERSALSDK}" in
6533 */MacOSX10.4u.sdk)
6534 # Build using 10.4 SDK, force usage of gcc when the
6535 # compiler is gcc, otherwise the user will get very
6536 # confusing error messages when building on OSX 10.6
6537 CC=gcc-4.0
6538 CPP=cpp-4.0
6539 ;;
6540 esac
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006542$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006543 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006544
Ned Deily87adb6e2013-10-18 21:09:56 -07006545 if test "${enable_universalsdk}"
6546 then
6547 case "$UNIVERSAL_ARCHS" in
6548 32-bit)
6549 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6550 LIPO_32BIT_FLAGS=""
6551 ARCH_RUN_32BIT=""
6552 ;;
6553 64-bit)
6554 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6555 LIPO_32BIT_FLAGS=""
6556 ARCH_RUN_32BIT="true"
6557 ;;
6558 all)
6559 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6560 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6561 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6562 ;;
6563 intel)
6564 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6565 LIPO_32BIT_FLAGS="-extract i386"
6566 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6567 ;;
6568 intel-32)
6569 UNIVERSAL_ARCH_FLAGS="-arch i386"
6570 LIPO_32BIT_FLAGS=""
6571 ARCH_RUN_32BIT=""
6572 ;;
6573 3-way)
6574 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6575 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6576 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6577 ;;
6578 *)
6579 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6580 ;;
6581 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006582
Ned Deily87adb6e2013-10-18 21:09:56 -07006583 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6584 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6585 if test "${UNIVERSALSDK}" != "/"
6586 then
6587 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6588 fi
6589 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006590
Ned Deily87adb6e2013-10-18 21:09:56 -07006591 # Calculate an appropriate deployment target for this build:
6592 # The deployment target value is used explicitly to enable certain
6593 # features are enabled (such as builtin libedit support for readline)
6594 # through the use of Apple's Availabiliy Macros and is used as a
6595 # component of the string returned by distutils.get_platform().
6596 #
6597 # Use the value from:
6598 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6599 # 2. the operating system version of the build machine if >= 10.6
6600 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6601 # below to pick either 10.3, 10.4, or 10.5 as the target.
6602 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006603
Ned Deily87adb6e2013-10-18 21:09:56 -07006604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6605$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
6606 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6607 if test ${cur_target} '>' 10.2 && \
6608 test ${cur_target} '<' 10.6
6609 then
6610 cur_target=10.3
6611 if test ${enable_universalsdk}
6612 then
6613 case "$UNIVERSAL_ARCHS" in
6614 all|3-way|intel|64-bit)
6615 # These configurations were first supported in 10.5
6616 cur_target='10.5'
6617 ;;
6618 esac
6619 else
6620 if test `/usr/bin/arch` = "i386"
6621 then
6622 # 10.4 was the first release to support Intel archs
6623 cur_target="10.4"
6624 fi
6625 fi
6626 fi
6627 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006628
Ned Deily87adb6e2013-10-18 21:09:56 -07006629 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6630 # environment with a value that is the same as what we'll use
6631 # in the Makefile to ensure that we'll get the same compiler
6632 # environment during configure and build time.
6633 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6634 export MACOSX_DEPLOYMENT_TARGET
6635 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6637$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006638
Ned Deily87adb6e2013-10-18 21:09:56 -07006639 # end of Darwin* tests
6640 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006641 esac
6642 ;;
6643
6644*)
6645 case $ac_sys_system in
6646 OpenUNIX*|UnixWare*)
6647 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6648 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006649 SCO_SV*)
6650 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6651 ;;
6652 esac
6653 ;;
6654esac
6655
6656if test "$Py_DEBUG" = 'true'; then
6657 :
6658else
6659 OPT="-DNDEBUG $OPT"
6660fi
6661
6662if test "$ac_arch_flags"
6663then
6664 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6665fi
6666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006667# On some compilers, pthreads are available without further options
6668# (e.g. MacOS X). On some of these systems, the compiler will not
6669# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6670# So we have to see first whether pthreads are available without
6671# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6673$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006674if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006676else
Matthias Kloseb9621712010-04-24 17:59:49 +00006677 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678 ac_cv_pthread_is_default=no
6679else
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681/* end confdefs.h. */
6682
Stefan Krah7dba5942012-11-22 22:49:11 +01006683#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684#include <pthread.h>
6685
6686void* routine(void* p){return NULL;}
6687
6688int main(){
6689 pthread_t p;
6690 if(pthread_create(&p,NULL,routine,NULL)!=0)
6691 return 1;
6692 (void)pthread_detach(p);
6693 return 0;
6694}
6695
6696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006697if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006698
6699 ac_cv_pthread_is_default=yes
6700 ac_cv_kthread=no
6701 ac_cv_pthread=no
6702
6703else
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708fi
6709
6710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711fi
6712
Matthias Kloseb9621712010-04-24 17:59:49 +00006713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6714$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006715
6716
6717if test $ac_cv_pthread_is_default = yes
6718then
6719 ac_cv_kpthread=no
6720else
6721# -Kpthread, if available, provides the right #defines
6722# and linker options to make pthread_create available
6723# Some compilers won't report that they do not support -Kpthread,
6724# so we need to run a program to see whether it really made the
6725# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6727$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006728if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730else
6731 ac_save_cc="$CC"
6732CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006733if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734 ac_cv_kpthread=no
6735else
Matthias Kloseb9621712010-04-24 17:59:49 +00006736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006737/* end confdefs.h. */
6738
Stefan Krah7dba5942012-11-22 22:49:11 +01006739#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740#include <pthread.h>
6741
6742void* routine(void* p){return NULL;}
6743
6744int main(){
6745 pthread_t p;
6746 if(pthread_create(&p,NULL,routine,NULL)!=0)
6747 return 1;
6748 (void)pthread_detach(p);
6749 return 0;
6750}
6751
6752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006753if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754 ac_cv_kpthread=yes
6755else
Matthias Kloseb9621712010-04-24 17:59:49 +00006756 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760fi
6761
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006762CC="$ac_save_cc"
6763fi
6764
Matthias Kloseb9621712010-04-24 17:59:49 +00006765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6766$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006767fi
6768
6769if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6770then
6771# -Kthread, if available, provides the right #defines
6772# and linker options to make pthread_create available
6773# Some compilers won't report that they do not support -Kthread,
6774# so we need to run a program to see whether it really made the
6775# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6777$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006778if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780else
6781 ac_save_cc="$CC"
6782CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006783if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784 ac_cv_kthread=no
6785else
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787/* end confdefs.h. */
6788
Stefan Krah7dba5942012-11-22 22:49:11 +01006789#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790#include <pthread.h>
6791
6792void* routine(void* p){return NULL;}
6793
6794int main(){
6795 pthread_t p;
6796 if(pthread_create(&p,NULL,routine,NULL)!=0)
6797 return 1;
6798 (void)pthread_detach(p);
6799 return 0;
6800}
6801
6802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006803if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804 ac_cv_kthread=yes
6805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810fi
6811
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812CC="$ac_save_cc"
6813fi
6814
Matthias Kloseb9621712010-04-24 17:59:49 +00006815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6816$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817fi
6818
6819if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6820then
6821# -pthread, if available, provides the right #defines
6822# and linker options to make pthread_create available
6823# Some compilers won't report that they do not support -pthread,
6824# so we need to run a program to see whether it really made the
6825# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6827$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006828if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830else
6831 ac_save_cc="$CC"
6832CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006833if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006834 ac_cv_pthread=no
6835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837/* end confdefs.h. */
6838
Stefan Krah7dba5942012-11-22 22:49:11 +01006839#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840#include <pthread.h>
6841
6842void* routine(void* p){return NULL;}
6843
6844int main(){
6845 pthread_t p;
6846 if(pthread_create(&p,NULL,routine,NULL)!=0)
6847 return 1;
6848 (void)pthread_detach(p);
6849 return 0;
6850}
6851
6852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006853if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854 ac_cv_pthread=yes
6855else
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860fi
6861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862CC="$ac_save_cc"
6863fi
6864
Matthias Kloseb9621712010-04-24 17:59:49 +00006865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6866$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867fi
6868
6869# If we have set a CC compiler flag for thread support then
6870# check if it works for CXX, too.
6871ac_cv_cxx_thread=no
6872if test ! -z "$CXX"
6873then
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6875$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876ac_save_cxx="$CXX"
6877
6878if test "$ac_cv_kpthread" = "yes"
6879then
6880 CXX="$CXX -Kpthread"
6881 ac_cv_cxx_thread=yes
6882elif test "$ac_cv_kthread" = "yes"
6883then
6884 CXX="$CXX -Kthread"
6885 ac_cv_cxx_thread=yes
6886elif test "$ac_cv_pthread" = "yes"
6887then
6888 CXX="$CXX -pthread"
6889 ac_cv_cxx_thread=yes
6890fi
6891
6892if test $ac_cv_cxx_thread = yes
6893then
6894 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6895 $CXX -c conftest.$ac_ext 2>&5
6896 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6897 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6898 then
6899 ac_cv_cxx_thread=yes
6900 else
6901 ac_cv_cxx_thread=no
6902 fi
6903 rm -fr conftest*
6904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6906$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907fi
6908CXX="$ac_save_cxx"
6909
6910
6911# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6913$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006914if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006915 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006916else
Matthias Kloseb9621712010-04-24 17:59:49 +00006917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006918/* end confdefs.h. */
6919#include <stdlib.h>
6920#include <stdarg.h>
6921#include <string.h>
6922#include <float.h>
6923
6924int
6925main ()
6926{
6927
6928 ;
6929 return 0;
6930}
6931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006932if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933 ac_cv_header_stdc=yes
6934else
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6938
6939if test $ac_cv_header_stdc = yes; then
6940 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942/* end confdefs.h. */
6943#include <string.h>
6944
6945_ACEOF
6946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 $EGREP "memchr" >/dev/null 2>&1; then :
6948
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949else
6950 ac_cv_header_stdc=no
6951fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006952rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006953
6954fi
6955
6956if test $ac_cv_header_stdc = yes; then
6957 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959/* end confdefs.h. */
6960#include <stdlib.h>
6961
6962_ACEOF
6963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 $EGREP "free" >/dev/null 2>&1; then :
6965
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966else
6967 ac_cv_header_stdc=no
6968fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006969rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970
6971fi
6972
6973if test $ac_cv_header_stdc = yes; then
6974 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006975 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976 :
6977else
Matthias Kloseb9621712010-04-24 17:59:49 +00006978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006979/* end confdefs.h. */
6980#include <ctype.h>
6981#include <stdlib.h>
6982#if ((' ' & 0x0FF) == 0x020)
6983# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6984# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6985#else
6986# define ISLOWER(c) \
6987 (('a' <= (c) && (c) <= 'i') \
6988 || ('j' <= (c) && (c) <= 'r') \
6989 || ('s' <= (c) && (c) <= 'z'))
6990# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6991#endif
6992
6993#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6994int
6995main ()
6996{
6997 int i;
6998 for (i = 0; i < 256; i++)
6999 if (XOR (islower (i), ISLOWER (i))
7000 || toupper (i) != TOUPPER (i))
7001 return 2;
7002 return 0;
7003}
7004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007005if ac_fn_c_try_run "$LINENO"; then :
7006
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007007else
Matthias Kloseb9621712010-04-24 17:59:49 +00007008 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007012fi
7013
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007014fi
7015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7017$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018if test $ac_cv_header_stdc = yes; then
7019
Matthias Kloseb9621712010-04-24 17:59:49 +00007020$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007021
7022fi
7023
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007024for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007025fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007026ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007027sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007028unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007029poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007030sys/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 +01007031sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007032sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007033sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007034sys/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 -07007035libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007036bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7037sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007038do :
7039 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7040ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007041if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007042 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007043#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007044_ACEOF
7045
7046fi
7047
Guido van Rossum627b2d71993-12-24 10:39:16 +00007048done
7049
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007050ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007051for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7054$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007055if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007057else
Matthias Kloseb9621712010-04-24 17:59:49 +00007058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007059/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007060#include <sys/types.h>
7061#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007062
Martin v. Löwis11437992002-04-12 09:54:03 +00007063int
7064main ()
7065{
7066if ((DIR *) 0)
7067return 0;
7068 ;
7069 return 0;
7070}
7071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007072if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007073 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007074else
Matthias Kloseb9621712010-04-24 17:59:49 +00007075 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007079eval ac_res=\$$as_ac_Header
7080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7081$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007082if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007083 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007084#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007085_ACEOF
7086
7087ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007088fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007090done
7091# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7092if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7094$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007095if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007096 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007097else
Martin v. Löwis11437992002-04-12 09:54:03 +00007098 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007102/* Override any GCC internal prototype to avoid an error.
7103 Use char because int might match the return type of a GCC
7104 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007105#ifdef __cplusplus
7106extern "C"
7107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007108char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007109int
7110main ()
7111{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007113 ;
7114 return 0;
7115}
7116_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007117for ac_lib in '' dir; do
7118 if test -z "$ac_lib"; then
7119 ac_res="none required"
7120 else
7121 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007122 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007123 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007124 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007125 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127rm -f core conftest.err conftest.$ac_objext \
7128 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007129 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007130 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007132done
Victor Stinnere0be4232011-10-25 13:06:09 +02007133if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007135else
7136 ac_cv_search_opendir=no
7137fi
7138rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007139LIBS=$ac_func_search_save_LIBS
7140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7142$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007143ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007144if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007145 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007146
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007147fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007148
Michael W. Hudson54241132001-12-07 15:38:26 +00007149else
Matthias Kloseb9621712010-04-24 17:59:49 +00007150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7151$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007152if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007153 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007154else
7155 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007158
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007159/* Override any GCC internal prototype to avoid an error.
7160 Use char because int might match the return type of a GCC
7161 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007162#ifdef __cplusplus
7163extern "C"
7164#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007165char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007166int
7167main ()
7168{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007169return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007170 ;
7171 return 0;
7172}
7173_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007174for ac_lib in '' x; do
7175 if test -z "$ac_lib"; then
7176 ac_res="none required"
7177 else
7178 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007179 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007180 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007181 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007182 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007184rm -f core conftest.err conftest.$ac_objext \
7185 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007186 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007187 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007189done
Victor Stinnere0be4232011-10-25 13:06:09 +02007190if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007192else
7193 ac_cv_search_opendir=no
7194fi
7195rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007196LIBS=$ac_func_search_save_LIBS
7197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7199$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007200ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007201if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007202 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007203
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007204fi
7205
7206fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007207
Matthias Kloseb9621712010-04-24 17:59:49 +00007208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7209$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007210if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007212else
Matthias Kloseb9621712010-04-24 17:59:49 +00007213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007214/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007215#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007216int
7217main ()
7218{
7219return makedev(0, 0);
7220 ;
7221 return 0;
7222}
7223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007224if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007225 ac_cv_header_sys_types_h_makedev=yes
7226else
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007229rm -f core conftest.err conftest.$ac_objext \
7230 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007231
7232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7234$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007235
7236if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007237ac_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 +02007238if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007239
Matthias Kloseb9621712010-04-24 17:59:49 +00007240$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007241
7242fi
7243
7244
7245
7246 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 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 +02007248if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007249
Matthias Kloseb9621712010-04-24 17:59:49 +00007250$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007251
7252fi
7253
7254
7255 fi
7256fi
7257
Michael W. Hudson54241132001-12-07 15:38:26 +00007258
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007259# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7260for ac_header in net/if.h
7261do :
7262 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7263#ifdef STDC_HEADERS
7264# include <stdlib.h>
7265# include <stddef.h>
7266#else
7267# ifdef HAVE_STDLIB_H
7268# include <stdlib.h>
7269# endif
7270#endif
7271#ifdef HAVE_SYS_SOCKET_H
7272# include <sys/socket.h>
7273#endif
7274
7275"
Victor Stinnere0be4232011-10-25 13:06:09 +02007276if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007277 cat >>confdefs.h <<_ACEOF
7278#define HAVE_NET_IF_H 1
7279_ACEOF
7280
7281fi
7282
7283done
7284
7285
Martin v. Löwis11017b12006-01-14 18:12:57 +00007286# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007287for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007288do :
7289 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 +00007290#ifdef HAVE_ASM_TYPES_H
7291#include <asm/types.h>
7292#endif
7293#ifdef HAVE_SYS_SOCKET_H
7294#include <sys/socket.h>
7295#endif
7296
Matthias Kloseb9621712010-04-24 17:59:49 +00007297"
Victor Stinnere0be4232011-10-25 13:06:09 +02007298if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007299 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007300#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007301_ACEOF
7302
7303fi
7304
7305done
7306
7307
Charles-François Natali47413c12011-10-06 19:47:44 +02007308# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007309for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007310do :
7311 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7312ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7313#ifdef HAVE_SYS_SOCKET_H
7314#include <sys/socket.h>
7315#endif
7316
7317"
7318if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7319 cat >>confdefs.h <<_ACEOF
7320#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7321_ACEOF
7322
7323fi
7324
7325done
7326
7327
Guido van Rossum627b2d71993-12-24 10:39:16 +00007328# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007329was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7331$as_echo_n "checking for clock_t in time.h... " >&6; }
7332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007333/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007334#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007335
7336_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007337if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007338 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007339 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007340else
Martin v. Löwis11437992002-04-12 09:54:03 +00007341
7342
Matthias Kloseb9621712010-04-24 17:59:49 +00007343$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007344
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007345
Guido van Rossum627b2d71993-12-24 10:39:16 +00007346fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007347rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007348
Matthias Kloseb9621712010-04-24 17:59:49 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7350$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7353$as_echo_n "checking for makedev... " >&6; }
7354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007355/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007356
Jesus Cea740f53a2010-04-28 11:35:30 +00007357#if defined(MAJOR_IN_MKDEV)
7358#include <sys/mkdev.h>
7359#elif defined(MAJOR_IN_SYSMACROS)
7360#include <sys/sysmacros.h>
7361#else
7362#include <sys/types.h>
7363#endif
7364
Neal Norwitz11690112002-07-30 01:08:28 +00007365int
7366main ()
7367{
Jesus Cea740f53a2010-04-28 11:35:30 +00007368
7369 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007370 ;
7371 return 0;
7372}
Matthias Kloseb159a552010-04-25 21:00:44 +00007373
Neal Norwitz11690112002-07-30 01:08:28 +00007374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007375if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007376 ac_cv_has_makedev=yes
7377else
Matthias Kloseb9621712010-04-24 17:59:49 +00007378 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007380rm -f core conftest.err conftest.$ac_objext \
7381 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7383$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007384if test "$ac_cv_has_makedev" = "yes"; then
7385
Matthias Kloseb9621712010-04-24 17:59:49 +00007386$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007387
7388fi
7389
Christian Heimes985ecdc2013-11-20 11:46:18 +01007390# byte swapping
7391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7392$as_echo_n "checking for le64toh... " >&6; }
7393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7394/* end confdefs.h. */
7395
7396#ifdef HAVE_ENDIAN_H
7397#include <endian.h>
7398#elif defined(HAVE_SYS_ENDIAN_H)
7399#include <sys/endian.h>
7400#endif
7401
7402int
7403main ()
7404{
7405
7406 le64toh(1)
7407 ;
7408 return 0;
7409}
7410
7411_ACEOF
7412if ac_fn_c_try_link "$LINENO"; then :
7413 ac_cv_has_le64toh=yes
7414else
7415 ac_cv_has_le64toh=no
7416fi
7417rm -f core conftest.err conftest.$ac_objext \
7418 conftest$ac_exeext conftest.$ac_ext
7419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7420$as_echo "$ac_cv_has_le64toh" >&6; }
7421if test "$ac_cv_has_le64toh" = "yes"; then
7422
7423$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7424
7425fi
7426
Martin v. Löwis399a6892002-10-04 10:22:02 +00007427# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7428# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7429# defined, but the compiler does not support pragma redefine_extname,
7430# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7431# structures (such as rlimit64) without declaring them. As a
7432# work-around, disable LFS on such configurations
7433
7434use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7436$as_echo_n "checking Solaris LFS bug... " >&6; }
7437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007438/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007439
7440#define _LARGEFILE_SOURCE 1
7441#define _FILE_OFFSET_BITS 64
7442#include <sys/resource.h>
7443
Martin v. Löwis399a6892002-10-04 10:22:02 +00007444int
7445main ()
7446{
7447struct rlimit foo;
7448 ;
7449 return 0;
7450}
7451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007453 sol_lfs_bug=no
7454else
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7459$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007460if test "$sol_lfs_bug" = "yes"; then
7461 use_lfs=no
7462fi
7463
7464if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007465# Two defines needed to enable largefile support on various platforms
7466# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007467case $ac_sys_system/$ac_sys_release in
7468AIX*)
7469
7470$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7471
7472 ;;
7473esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007474
Matthias Kloseb9621712010-04-24 17:59:49 +00007475$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007476
7477
Matthias Kloseb9621712010-04-24 17:59:49 +00007478$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007479
Martin v. Löwis399a6892002-10-04 10:22:02 +00007480fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007481
Guido van Rossum84e7b241996-08-19 21:59:00 +00007482# Add some code to confdefs.h so that the test for off_t works on SCO
7483cat >> confdefs.h <<\EOF
7484#if defined(SCO_DS)
7485#undef _OFF_T
7486#endif
7487EOF
7488
Guido van Rossumef2255b2000-03-10 22:30:29 +00007489# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007490ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007491if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007492
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007493else
Martin v. Löwis11437992002-04-12 09:54:03 +00007494
7495cat >>confdefs.h <<_ACEOF
7496#define mode_t int
7497_ACEOF
7498
7499fi
7500
Matthias Kloseb9621712010-04-24 17:59:49 +00007501ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007502if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007503
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007504else
Martin v. Löwis11437992002-04-12 09:54:03 +00007505
7506cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007507#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007508_ACEOF
7509
7510fi
7511
Matthias Kloseb9621712010-04-24 17:59:49 +00007512ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007513if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007514
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007515else
Martin v. Löwis11437992002-04-12 09:54:03 +00007516
7517cat >>confdefs.h <<_ACEOF
7518#define pid_t int
7519_ACEOF
7520
7521fi
7522
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007523
Martin v. Löwis11437992002-04-12 09:54:03 +00007524cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007525#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007526_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007527
Matthias Kloseb9621712010-04-24 17:59:49 +00007528ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007529if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007530
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007531else
Martin v. Löwis11437992002-04-12 09:54:03 +00007532
7533cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007534#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007535_ACEOF
7536
7537fi
7538
Matthias Kloseb9621712010-04-24 17:59:49 +00007539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7540$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007541if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007542 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007543else
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007545/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007546#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007547
7548_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007549if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007550 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007551 ac_cv_type_uid_t=yes
7552else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007553 ac_cv_type_uid_t=no
7554fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007555rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007556
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7559$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007560if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007561
Matthias Kloseb9621712010-04-24 17:59:49 +00007562$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007563
7564
Matthias Kloseb9621712010-04-24 17:59:49 +00007565$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007566
7567fi
7568
Mark Dickinson983bc162012-12-02 12:11:38 +00007569
7570# There are two separate checks for each of the exact-width integer types we
7571# need. First we check whether the type is available using the usual
7572# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7573# and <stdint.h> where available). We then also use the special type checks of
7574# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7575# directly, #define's uint32_t to be a suitable type.
7576
7577ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7578if test "x$ac_cv_type_uint32_t" = xyes; then :
7579
7580$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7581
7582fi
7583
Matthias Kloseb9621712010-04-24 17:59:49 +00007584ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7585case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007586 no|yes) ;; #(
7587 *)
7588
Matthias Kloseb9621712010-04-24 17:59:49 +00007589$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007590
7591
7592cat >>confdefs.h <<_ACEOF
7593#define uint32_t $ac_cv_c_uint32_t
7594_ACEOF
7595;;
7596 esac
7597
Mark Dickinson983bc162012-12-02 12:11:38 +00007598
7599ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7600if test "x$ac_cv_type_uint64_t" = xyes; then :
7601
7602$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7603
7604fi
7605
Matthias Kloseb9621712010-04-24 17:59:49 +00007606ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7607case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007608 no|yes) ;; #(
7609 *)
7610
Matthias Kloseb9621712010-04-24 17:59:49 +00007611$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007612
7613
7614cat >>confdefs.h <<_ACEOF
7615#define uint64_t $ac_cv_c_uint64_t
7616_ACEOF
7617;;
7618 esac
7619
Mark Dickinson983bc162012-12-02 12:11:38 +00007620
7621ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7622if test "x$ac_cv_type_int32_t" = xyes; then :
7623
7624$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7625
7626fi
7627
Matthias Kloseb9621712010-04-24 17:59:49 +00007628ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7629case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007630 no|yes) ;; #(
7631 *)
7632
7633cat >>confdefs.h <<_ACEOF
7634#define int32_t $ac_cv_c_int32_t
7635_ACEOF
7636;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007637esac
7638
Mark Dickinson983bc162012-12-02 12:11:38 +00007639
7640ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7641if test "x$ac_cv_type_int64_t" = xyes; then :
7642
7643$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7644
7645fi
7646
Matthias Kloseb9621712010-04-24 17:59:49 +00007647ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7648case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007649 no|yes) ;; #(
7650 *)
7651
7652cat >>confdefs.h <<_ACEOF
7653#define int64_t $ac_cv_c_int64_t
7654_ACEOF
7655;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007656esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007657
Mark Dickinson983bc162012-12-02 12:11:38 +00007658
Matthias Kloseb9621712010-04-24 17:59:49 +00007659ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007660if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007661
Matthias Kloseb9621712010-04-24 17:59:49 +00007662$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007663
7664fi
7665
Stefan Krah1919b7e2012-03-21 18:25:23 +01007666ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7667if test "x$ac_cv_type___uint128_t" = xyes; then :
7668
7669$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7670
7671fi
7672
Jack Jansendd19cf82001-12-06 22:36:17 +00007673
Michael W. Hudson54241132001-12-07 15:38:26 +00007674# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007675# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676# The cast to long int works around a bug in the HP C Compiler
7677# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7678# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7679# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7681$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007682if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007684else
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 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 +00007686
Martin v. Löwis11437992002-04-12 09:54:03 +00007687else
Matthias Kloseb9621712010-04-24 17:59:49 +00007688 if test "$ac_cv_type_int" = yes; then
7689 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007691as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007692See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693 else
7694 ac_cv_sizeof_int=0
7695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007697
Martin v. Löwis11437992002-04-12 09:54:03 +00007698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7700$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701
7702
7703
Martin v. Löwis11437992002-04-12 09:54:03 +00007704cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007705#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007706_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007707
7708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007709# The cast to long int works around a bug in the HP C Compiler
7710# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7711# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7712# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7714$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007715if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007716 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007717else
Matthias Kloseb9621712010-04-24 17:59:49 +00007718 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 +00007719
Martin v. Löwis11437992002-04-12 09:54:03 +00007720else
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 if test "$ac_cv_type_long" = yes; then
7722 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007724as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007725See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007726 else
7727 ac_cv_sizeof_long=0
7728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007730
Martin v. Löwis11437992002-04-12 09:54:03 +00007731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7733$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734
7735
7736
Martin v. Löwis11437992002-04-12 09:54:03 +00007737cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007738#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007739_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007740
7741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007742# The cast to long int works around a bug in the HP C Compiler
7743# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7744# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7745# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7747$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007748if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007749 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007750else
Matthias Kloseb9621712010-04-24 17:59:49 +00007751 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 +00007752
Martin v. Löwis11437992002-04-12 09:54:03 +00007753else
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 if test "$ac_cv_type_void_p" = yes; then
7755 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7756$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007757as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007758See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007759 else
7760 ac_cv_sizeof_void_p=0
7761 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007763
Martin v. Löwis11437992002-04-12 09:54:03 +00007764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7766$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007767
7768
7769
Martin v. Löwis11437992002-04-12 09:54:03 +00007770cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007771#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007772_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007773
7774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007775# The cast to long int works around a bug in the HP C Compiler
7776# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7777# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7778# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7780$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007781if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007783else
Matthias Kloseb9621712010-04-24 17:59:49 +00007784 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 +00007785
Martin v. Löwis11437992002-04-12 09:54:03 +00007786else
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 if test "$ac_cv_type_short" = yes; then
7788 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7789$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007790as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007791See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792 else
7793 ac_cv_sizeof_short=0
7794 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007796
Martin v. Löwis11437992002-04-12 09:54:03 +00007797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7799$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800
7801
7802
Martin v. Löwis11437992002-04-12 09:54:03 +00007803cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007804#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007805_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007806
7807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808# The cast to long int works around a bug in the HP C Compiler
7809# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7810# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7811# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7813$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007814if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007815 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007816else
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 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 +00007818
Martin v. Löwis11437992002-04-12 09:54:03 +00007819else
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 if test "$ac_cv_type_float" = yes; then
7821 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007823as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007824See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 else
7826 ac_cv_sizeof_float=0
7827 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007829
Martin v. Löwis11437992002-04-12 09:54:03 +00007830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7832$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833
7834
7835
Martin v. Löwis11437992002-04-12 09:54:03 +00007836cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007837#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007838_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007839
7840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841# The cast to long int works around a bug in the HP C Compiler
7842# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7843# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7844# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7846$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007847if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007848 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007849else
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 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 +00007851
Martin v. Löwis11437992002-04-12 09:54:03 +00007852else
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 if test "$ac_cv_type_double" = yes; then
7854 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007856as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007857See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858 else
7859 ac_cv_sizeof_double=0
7860 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007862
Martin v. Löwis11437992002-04-12 09:54:03 +00007863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7865$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866
7867
7868
Martin v. Löwis11437992002-04-12 09:54:03 +00007869cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007870#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007871_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007872
7873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874# The cast to long int works around a bug in the HP C Compiler
7875# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7876# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7877# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7879$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007880if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007882else
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 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 +00007884
Martin v. Löwis11437992002-04-12 09:54:03 +00007885else
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 if test "$ac_cv_type_fpos_t" = yes; then
7887 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7888$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007889as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007890See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891 else
7892 ac_cv_sizeof_fpos_t=0
7893 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007895
Martin v. Löwis11437992002-04-12 09:54:03 +00007896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7898$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899
7900
7901
Martin v. Löwis11437992002-04-12 09:54:03 +00007902cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007903#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007904_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007905
Michael W. Hudson54241132001-12-07 15:38:26 +00007906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907# The cast to long int works around a bug in the HP C Compiler
7908# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7909# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7910# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7912$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007913if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007915else
Matthias Kloseb9621712010-04-24 17:59:49 +00007916 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 +00007917
Martin v. Löwis18e16552006-02-15 17:27:45 +00007918else
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 if test "$ac_cv_type_size_t" = yes; then
7920 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007922as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007923See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924 else
7925 ac_cv_sizeof_size_t=0
7926 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007928
Martin v. Löwis18e16552006-02-15 17:27:45 +00007929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7931$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007932
7933
7934
Martin v. Löwis18e16552006-02-15 17:27:45 +00007935cat >>confdefs.h <<_ACEOF
7936#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7937_ACEOF
7938
7939
Christian Heimes400adb02008-02-01 08:12:03 +00007940# The cast to long int works around a bug in the HP C Compiler
7941# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7942# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7943# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7945$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007946if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007948else
Matthias Kloseb9621712010-04-24 17:59:49 +00007949 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 +00007950
Christian Heimes400adb02008-02-01 08:12:03 +00007951else
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 if test "$ac_cv_type_pid_t" = yes; then
7953 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007955as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007956See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007957 else
7958 ac_cv_sizeof_pid_t=0
7959 fi
7960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007961
Christian Heimes400adb02008-02-01 08:12:03 +00007962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7964$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007965
7966
7967
7968cat >>confdefs.h <<_ACEOF
7969#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7970_ACEOF
7971
7972
Michael W. Hudson54241132001-12-07 15:38:26 +00007973
Matthias Kloseb9621712010-04-24 17:59:49 +00007974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7975$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007976have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007979
Martin v. Löwis11437992002-04-12 09:54:03 +00007980int
7981main ()
7982{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007983long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 ;
7985 return 0;
7986}
7987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007989
7990
Matthias Kloseb9621712010-04-24 17:59:49 +00007991$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007992
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007993 have_long_long=yes
7994
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7998$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007999if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000# The cast to long int works around a bug in the HP C Compiler
8001# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8002# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8003# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8005$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008006if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008008else
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 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 +00008010
Martin v. Löwis11437992002-04-12 09:54:03 +00008011else
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 if test "$ac_cv_type_long_long" = yes; then
8013 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008015as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008016See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017 else
8018 ac_cv_sizeof_long_long=0
8019 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008021
Martin v. Löwis11437992002-04-12 09:54:03 +00008022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8024$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025
8026
8027
Martin v. Löwis11437992002-04-12 09:54:03 +00008028cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008029#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008030_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008031
Michael W. Hudson54241132001-12-07 15:38:26 +00008032
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008033fi
8034
Matthias Kloseb9621712010-04-24 17:59:49 +00008035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8036$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008037have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008039/* end confdefs.h. */
8040
8041int
8042main ()
8043{
8044long double x; x = (long double)0;
8045 ;
8046 return 0;
8047}
8048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008049if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008050
8051
Matthias Kloseb9621712010-04-24 17:59:49 +00008052$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008053
8054 have_long_double=yes
8055
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008056fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8059$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008060if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008061# The cast to long int works around a bug in the HP C Compiler
8062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8064# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8066$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008067if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008068 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008069else
Matthias Kloseb9621712010-04-24 17:59:49 +00008070 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 +00008071
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008072else
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 if test "$ac_cv_type_long_double" = yes; then
8074 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008076as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008077See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008078 else
8079 ac_cv_sizeof_long_double=0
8080 fi
8081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008082
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8085$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008086
8087
8088
8089cat >>confdefs.h <<_ACEOF
8090#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8091_ACEOF
8092
8093
8094fi
8095
8096
Matthias Kloseb9621712010-04-24 17:59:49 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8098$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008099have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008101/* end confdefs.h. */
8102
8103int
8104main ()
8105{
8106_Bool x; x = (_Bool)0;
8107 ;
8108 return 0;
8109}
8110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008111if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008112
8113
Matthias Kloseb9621712010-04-24 17:59:49 +00008114$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008115
8116 have_c99_bool=yes
8117
Thomas Woutersb2137042007-02-01 18:02:27 +00008118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8121$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008122if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123# The cast to long int works around a bug in the HP C Compiler
8124# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8125# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8126# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8128$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008129if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008131else
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 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 +00008133
Thomas Woutersb2137042007-02-01 18:02:27 +00008134else
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 if test "$ac_cv_type__Bool" = yes; then
8136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008138as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008139See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140 else
8141 ac_cv_sizeof__Bool=0
8142 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008144
Thomas Woutersb2137042007-02-01 18:02:27 +00008145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8147$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148
8149
8150
Thomas Woutersb2137042007-02-01 18:02:27 +00008151cat >>confdefs.h <<_ACEOF
8152#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8153_ACEOF
8154
8155
8156fi
8157
Matthias Kloseb9621712010-04-24 17:59:49 +00008158ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008159 #include <stdint.h>
8160 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008161 #ifdef HAVE_INTTYPES_H
8162 #include <inttypes.h>
8163 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008164"
Victor Stinnere0be4232011-10-25 13:06:09 +02008165if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008166
8167cat >>confdefs.h <<_ACEOF
8168#define HAVE_UINTPTR_T 1
8169_ACEOF
8170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171# The cast to long int works around a bug in the HP C Compiler
8172# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8173# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8174# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8176$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008177if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008179else
Matthias Kloseb9621712010-04-24 17:59:49 +00008180 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 +00008181
Martin v. Löwis11437992002-04-12 09:54:03 +00008182else
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 if test "$ac_cv_type_uintptr_t" = yes; then
8184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008186as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008187See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188 else
8189 ac_cv_sizeof_uintptr_t=0
8190 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008192
Martin v. Löwis11437992002-04-12 09:54:03 +00008193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8195$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196
8197
8198
Martin v. Löwis11437992002-04-12 09:54:03 +00008199cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008200#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008201_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008202
Michael W. Hudson54241132001-12-07 15:38:26 +00008203
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008204fi
8205
Thomas Wouters89f507f2006-12-13 04:49:30 +00008206
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008207# The cast to long int works around a bug in the HP C Compiler
8208# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8209# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8210# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8212$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008213if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008215else
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008217#ifdef HAVE_SYS_TYPES_H
8218#include <sys/types.h>
8219#endif
8220
Matthias Kloseb9621712010-04-24 17:59:49 +00008221"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008222
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008223else
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 if test "$ac_cv_type_off_t" = yes; then
8225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008227as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008228See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008229 else
8230 ac_cv_sizeof_off_t=0
8231 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008233
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8236$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008238
8239
Martin v. Löwis11437992002-04-12 09:54:03 +00008240cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008241#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008242_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008243
Michael W. Hudson54241132001-12-07 15:38:26 +00008244
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008245
Matthias Kloseb9621712010-04-24 17:59:49 +00008246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8247$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008248if test "$have_long_long" = yes
8249then
8250if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008251 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008252
Matthias Kloseb9621712010-04-24 17:59:49 +00008253$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008254
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8256$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008257else
Matthias Kloseb9621712010-04-24 17:59:49 +00008258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8259$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008260fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008261else
Matthias Kloseb9621712010-04-24 17:59:49 +00008262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8263$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008264fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008265
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008266# The cast to long int works around a bug in the HP C Compiler
8267# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8268# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8269# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8271$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008272if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008273 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008274else
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008276#ifdef HAVE_SYS_TYPES_H
8277#include <sys/types.h>
8278#endif
8279#ifdef HAVE_TIME_H
8280#include <time.h>
8281#endif
8282
Matthias Kloseb9621712010-04-24 17:59:49 +00008283"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008284
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008285else
Matthias Kloseb9621712010-04-24 17:59:49 +00008286 if test "$ac_cv_type_time_t" = yes; then
8287 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8288$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008289as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008290See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008291 else
8292 ac_cv_sizeof_time_t=0
8293 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008295
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8298$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008299
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008300
8301
Martin v. Löwis11437992002-04-12 09:54:03 +00008302cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008303#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008304_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008305
Michael W. Hudson54241132001-12-07 15:38:26 +00008306
8307
Trent Mick635f6fb2000-08-23 21:33:05 +00008308# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008309ac_save_cc="$CC"
8310if test "$ac_cv_kpthread" = "yes"
8311then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008312elif test "$ac_cv_kthread" = "yes"
8313then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008314elif test "$ac_cv_pthread" = "yes"
8315then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008316fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008317
Matthias Kloseb9621712010-04-24 17:59:49 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8319$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008320have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008322/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008323
8324 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008325int
8326main ()
8327{
Guido van Rossum12580492000-09-24 16:47:19 +00008328pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008329 ;
8330 return 0;
8331}
Matthias Kloseb159a552010-04-25 21:00:44 +00008332
Martin v. Löwis11437992002-04-12 09:54:03 +00008333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008334if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008335 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8339$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008340if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008342# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8343# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8344# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8346$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008347if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008349else
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008351#ifdef HAVE_PTHREAD_H
8352#include <pthread.h>
8353#endif
8354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008356
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008357else
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 if test "$ac_cv_type_pthread_t" = yes; then
8359 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008361as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008362See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008363 else
8364 ac_cv_sizeof_pthread_t=0
8365 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008367
Trent Mick635f6fb2000-08-23 21:33:05 +00008368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8370$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008371
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008372
8373
Martin v. Löwis11437992002-04-12 09:54:03 +00008374cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008375#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008376_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008377
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008378
Trent Mick635f6fb2000-08-23 21:33:05 +00008379fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008380CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008381
Michael W. Hudson54241132001-12-07 15:38:26 +00008382
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008383case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008384 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008385 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8386 ;;
8387 Darwin/*)
8388 OTHER_LIBTOOL_OPT=""
8389 ;;
8390esac
8391
8392
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008393
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008394case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008395 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008396 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8397 if test "${enable_universalsdk}"; then
8398 :
8399 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008400 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008401 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008402 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008403 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008404 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008405 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008406 if test ${gcc_version} '<' 4.0
8407 then
8408 LIBTOOL_CRUFT="-lcc_dynamic"
8409 else
8410 LIBTOOL_CRUFT=""
8411 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008413 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008414else
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008416/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008417
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008418 #include <unistd.h>
8419 int main(int argc, char*argv[])
8420 {
8421 if (sizeof(long) == 4) {
8422 return 0;
8423 } else {
8424 return 1;
8425 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008426 }
8427
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008429if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008430 ac_osx_32bit=yes
8431else
Matthias Kloseb9621712010-04-24 17:59:49 +00008432 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8435 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008436fi
8437
8438
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008439 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008440 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008441 i386)
8442 MACOSX_DEFAULT_ARCH="i386"
8443 ;;
8444 ppc)
8445 MACOSX_DEFAULT_ARCH="ppc"
8446 ;;
8447 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008448 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008449 ;;
8450 esac
8451 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008452 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008453 i386)
8454 MACOSX_DEFAULT_ARCH="x86_64"
8455 ;;
8456 ppc)
8457 MACOSX_DEFAULT_ARCH="ppc64"
8458 ;;
8459 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008460 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008461 ;;
8462 esac
8463
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008464 fi
8465
8466 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008467 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008468 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008469esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8471$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008472if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008473then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008474 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008476 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008477
Matthias Kloseb9621712010-04-24 17:59:49 +00008478$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008479
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8481$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008482 if test $enable_shared = "yes"
8483 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008484 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 +00008485 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8488$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008489fi
8490
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8492$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008493case $ac_sys_system/$ac_sys_release in
8494 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008495
Matthias Kloseb9621712010-04-24 17:59:49 +00008496$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008497
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8499$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008500 ;;
8501 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8503$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008504 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008505esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008506
Guido van Rossum0a516c91994-09-12 10:58:40 +00008507# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008508
Michael W. Hudson54241132001-12-07 15:38:26 +00008509
8510
8511
8512
Benjamin Peterson99f03762010-04-11 22:15:28 +00008513
Thomas Wouters477c8d52006-05-27 19:21:47 +00008514
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008515# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8516# -- usually .so, .sl on HP-UX, .dll on Cygwin
8517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8518$as_echo_n "checking the extension of shared libraries... " >&6; }
8519if test -z "$SHLIB_SUFFIX"; then
8520 case $ac_sys_system in
8521 hp*|HP*)
8522 case `uname -m` in
8523 ia64) SHLIB_SUFFIX=.so;;
8524 *) SHLIB_SUFFIX=.sl;;
8525 esac
8526 ;;
8527 CYGWIN*) SHLIB_SUFFIX=.dll;;
8528 *) SHLIB_SUFFIX=.so;;
8529 esac
8530fi
8531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8532$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008533
Guido van Rossum0a516c91994-09-12 10:58:40 +00008534# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008535# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008536# (Shared libraries in this instance are shared modules to be loaded into
8537# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8539$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008540if test -z "$LDSHARED"
8541then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008542 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008543 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008544 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008545 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008546 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008547 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008548 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008549 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008550 if test "$GCC" = "yes" ; then
8551 LDSHARED='$(CC) -shared'
8552 LDCXXSHARED='$(CXX) -shared'
8553 else
8554 LDSHARED='$(CC) -G'
8555 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008556 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008557 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008558 if test "$GCC" = "yes" ; then
8559 LDSHARED='$(CC) -shared'
8560 LDCXXSHARED='$(CXX) -shared'
8561 else
8562 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008563 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008564 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008565 LDSHARED='$(CC) -bundle'
8566 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008567 if test "$enable_framework" ; then
8568 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008569 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8570 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008571 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008572 else
8573 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008574 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008575 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008576 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008577 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008578 LDSHARED='$(CC) -bundle'
8579 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008580 if test "$enable_framework" ; then
8581 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008582 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8583 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008584 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008585 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008586 # No framework, use the Python app as bundle-loader
8587 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008588 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008589 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008590 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008591 Darwin/*)
8592 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8593 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008594
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008595 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008596 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008597 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8598 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008599 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008600 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008601 LDSHARED='$(CC) -bundle'
8602 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008603 if test "$enable_framework" ; then
8604 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008605 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8606 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008607 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008608 else
8609 # No framework, use the Python app as bundle-loader
8610 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8611 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008612 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008613 fi
8614 fi
8615 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008616 Linux*|GNU*|QNX*)
8617 LDSHARED='$(CC) -shared'
8618 LDCXXSHARED='$(CXX) -shared';;
8619 BSD/OS*/4*)
8620 LDSHARED="gcc -shared"
8621 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008622 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008623 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008624 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008625 LDSHARED='$(CC) -shared'
8626 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008627 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008628 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008629 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008630 OpenBSD*)
8631 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8632 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008633 LDSHARED='$(CC) -shared $(CCSHARED)'
8634 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008635 else
8636 case `uname -r` in
8637 [01].* | 2.[0-7] | 2.[0-7].*)
8638 LDSHARED="ld -Bshareable ${LDFLAGS}"
8639 ;;
8640 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008641 LDSHARED='$(CC) -shared $(CCSHARED)'
8642 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008643 ;;
8644 esac
8645 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008646 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008647 LDSHARED='$(CC) -shared'
8648 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008649 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008650 if test "$GCC" = "yes" ; then
8651 LDSHARED='$(CC) -shared'
8652 LDCXXSHARED='$(CXX) -shared'
8653 else
8654 LDSHARED='$(CC) -G'
8655 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008656 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008657 SCO_SV*)
8658 LDSHARED='$(CC) -Wl,-G,-Bexport'
8659 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8660 CYGWIN*)
8661 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8662 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008663 *) LDSHARED="ld";;
8664 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8667$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008668LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008669BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008670# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008671# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8673$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008674if test -z "$CCSHARED"
8675then
Guido van Rossum07397971997-04-29 21:49:50 +00008676 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008677 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008678 then CCSHARED="-fPIC";
8679 elif test `uname -p` = sparc;
8680 then CCSHARED="-xcode=pic32";
8681 else CCSHARED="-Kpic";
8682 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008683 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008684 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008685 else CCSHARED="+z";
8686 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008687 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008688 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008689 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008690 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008691 if test "$GCC" = "yes"
8692 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008693 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008694 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008695 SCO_SV*)
8696 if test "$GCC" = "yes"
8697 then CCSHARED="-fPIC"
8698 else CCSHARED="-Kpic -belf"
8699 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008700 IRIX*/6*) case $CC in
8701 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008702 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008703 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008704 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8707$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008708# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008709# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8711$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008712if test -z "$LINKFORSHARED"
8713then
Guido van Rossum07397971997-04-29 21:49:50 +00008714 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008715 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008716 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008717 LINKFORSHARED="-Wl,-E -Wl,+s";;
8718# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008719 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008720 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008721 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008722 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008723 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008724
8725 # Issue #18075: the default maximum stack size (8MBytes) is too
8726 # small for the default recursion limit. Increase the stack size
8727 # to ensure that tests don't crash
8728 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8729
Jack Jansene578a632001-08-15 01:27:14 +00008730 if test "$enable_framework"
8731 then
Jack Jansenda49e192005-01-07 13:08:22 +00008732 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008733 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008734 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008735 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008736 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008737 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008738 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008739 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8740 then
8741 LINKFORSHARED="-Wl,--export-dynamic"
8742 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008743 SunOS/5*) case $CC in
8744 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008745 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008746 then
8747 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008748 fi;;
8749 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008750 CYGWIN*)
8751 if test $enable_shared = "no"
8752 then
8753 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8754 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008755 QNX*)
8756 # -Wl,-E causes the symbols to be added to the dynamic
8757 # symbol table so that they can be found when a module
8758 # is loaded. -N 2048K causes the stack size to be set
8759 # to 2048 kilobytes so that the stack doesn't overflow
8760 # when running test_compile.py.
8761 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008762 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8765$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008766
Michael W. Hudson54241132001-12-07 15:38:26 +00008767
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008768
Matthias Kloseb9621712010-04-24 17:59:49 +00008769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8770$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008771if test ! "$LIBRARY" = "$LDLIBRARY"
8772then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008773 case $ac_sys_system in
8774 CYGWIN*)
8775 # Cygwin needs CCSHARED when building extension DLLs
8776 # but not when building the interpreter DLL.
8777 CFLAGSFORSHARED='';;
8778 *)
8779 CFLAGSFORSHARED='$(CCSHARED)'
8780 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8783$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008784
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008785# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8786# library (with --enable-shared).
8787# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008788# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8789# if it is not required, since it creates a dependency of the shared library
8790# to LIBS. This, in turn, means that applications linking the shared libpython
8791# don't need to link LIBS explicitly. The default should be only changed
8792# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008793
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8795$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008796case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008797 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008798 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008799esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8801$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008802
8803
Guido van Rossum627b2d71993-12-24 10:39:16 +00008804# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8806$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008807if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008808 $as_echo_n "(cached) " >&6
8809else
8810 ac_check_lib_save_LIBS=$LIBS
8811LIBS="-lsendfile $LIBS"
8812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8813/* end confdefs.h. */
8814
8815/* Override any GCC internal prototype to avoid an error.
8816 Use char because int might match the return type of a GCC
8817 builtin and then its argument prototype would still apply. */
8818#ifdef __cplusplus
8819extern "C"
8820#endif
8821char sendfile ();
8822int
8823main ()
8824{
8825return sendfile ();
8826 ;
8827 return 0;
8828}
8829_ACEOF
8830if ac_fn_c_try_link "$LINENO"; then :
8831 ac_cv_lib_sendfile_sendfile=yes
8832else
8833 ac_cv_lib_sendfile_sendfile=no
8834fi
8835rm -f core conftest.err conftest.$ac_objext \
8836 conftest$ac_exeext conftest.$ac_ext
8837LIBS=$ac_check_lib_save_LIBS
8838fi
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8840$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008841if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008842 cat >>confdefs.h <<_ACEOF
8843#define HAVE_LIBSENDFILE 1
8844_ACEOF
8845
8846 LIBS="-lsendfile $LIBS"
8847
8848fi
8849
Matthias Kloseb9621712010-04-24 17:59:49 +00008850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8851$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008852if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008854else
Martin v. Löwis11437992002-04-12 09:54:03 +00008855 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008856LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860/* Override any GCC internal prototype to avoid an error.
8861 Use char because int might match the return type of a GCC
8862 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008863#ifdef __cplusplus
8864extern "C"
8865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008866char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008867int
8868main ()
8869{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 ;
8872 return 0;
8873}
8874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008875if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008877else
Matthias Kloseb9621712010-04-24 17:59:49 +00008878 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008880rm -f core conftest.err conftest.$ac_objext \
8881 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008882LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8885$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008886if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008887 cat >>confdefs.h <<_ACEOF
8888#define HAVE_LIBDL 1
8889_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008890
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008891 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008892
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008893fi
8894 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8896$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008897if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008899else
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008901LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008905/* Override any GCC internal prototype to avoid an error.
8906 Use char because int might match the return type of a GCC
8907 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008908#ifdef __cplusplus
8909extern "C"
8910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008911char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008912int
8913main ()
8914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 ;
8917 return 0;
8918}
8919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008922else
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008925rm -f core conftest.err conftest.$ac_objext \
8926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008927LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8930$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008931if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008932 cat >>confdefs.h <<_ACEOF
8933#define HAVE_LIBDLD 1
8934_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008935
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008936 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008937
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008938fi
8939 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008940
Georg Brandlb1441c72009-01-03 22:33:39 +00008941# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008942if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8944$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008945if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008947else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008948 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008952/* Override any GCC internal prototype to avoid an error.
8953 Use char because int might match the return type of a GCC
8954 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008955#ifdef __cplusplus
8956extern "C"
8957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008958char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008959int
8960main ()
8961{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008962return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008963 ;
8964 return 0;
8965}
8966_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967for ac_lib in '' pthread rt posix4; do
8968 if test -z "$ac_lib"; then
8969 ac_res="none required"
8970 else
8971 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008972 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008975 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008977rm -f core conftest.err conftest.$ac_objext \
8978 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008979 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008980 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982done
Victor Stinnere0be4232011-10-25 13:06:09 +02008983if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008985else
8986 ac_cv_search_sem_init=no
8987fi
8988rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008989LIBS=$ac_func_search_save_LIBS
8990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8992$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008993ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008994if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008995 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008996
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008997fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008998 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008999 # posix4 on Solaris 2.6
9000 # pthread (first!) on Linux
9001fi
9002
Martin v. Löwis19d17342003-06-14 21:03:05 +00009003# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9005$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009006if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009008else
9009 ac_check_lib_save_LIBS=$LIBS
9010LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014/* Override any GCC internal prototype to avoid an error.
9015 Use char because int might match the return type of a GCC
9016 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009017#ifdef __cplusplus
9018extern "C"
9019#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009020char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009021int
9022main ()
9023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009025 ;
9026 return 0;
9027}
9028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009029if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009030 ac_cv_lib_intl_textdomain=yes
9031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009034rm -f core conftest.err conftest.$ac_objext \
9035 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009036LIBS=$ac_check_lib_save_LIBS
9037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9039$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009040if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009041
Matthias Kloseb9621712010-04-24 17:59:49 +00009042$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009043
Brett Cannonc6d936e2009-06-07 20:09:53 +00009044 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009045fi
9046
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009047
9048# checks for system dependent C++ extensions support
9049case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9051$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009053/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009054
Georg Brandl59e87bd2011-02-15 19:48:59 +00009055 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009056int
9057main ()
9058{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009059loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 ;
9061 return 0;
9062}
Matthias Kloseb159a552010-04-25 21:00:44 +00009063
Martin v. Löwis11437992002-04-12 09:54:03 +00009064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009065if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009066
Matthias Kloseb159a552010-04-25 21:00:44 +00009067
Matthias Kloseb9621712010-04-24 17:59:49 +00009068$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009069
Matthias Kloseb159a552010-04-25 21:00:44 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009071$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009072
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009073else
Matthias Kloseb159a552010-04-25 21:00:44 +00009074
9075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009076$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009077
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009079rm -f core conftest.err conftest.$ac_objext \
9080 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009081 *) ;;
9082esac
9083
Christian Heimes985ecdc2013-11-20 11:46:18 +01009084# check for systems that require aligned memory access
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9086$as_echo_n "checking aligned memory access is required... " >&6; }
9087if test "$cross_compiling" = yes; then :
9088 aligned_required=yes
9089else
9090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9091/* end confdefs.h. */
9092
9093int main()
9094{
9095 char s[16];
9096 int i, *p1, *p2;
9097 for (i=0; i < 16; i++)
9098 s[i] = i;
9099 p1 = (int*)(s+1);
9100 p2 = (int*)(s+2);
9101 if (*p1 == *p2)
9102 return 1;
9103 return 0;
9104}
9105
9106_ACEOF
9107if ac_fn_c_try_run "$LINENO"; then :
9108 aligned_required=no
9109else
9110 aligned_required=yes
9111fi
9112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9113 conftest.$ac_objext conftest.beam conftest.$ac_ext
9114fi
9115
9116
9117if test "$aligned_required" = yes ; then
9118
9119$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9120
9121fi
9122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9123$as_echo "$aligned_required" >&6; }
9124
9125
9126# str, bytes and memoryview hash algorithm
9127
9128
9129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9130$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9131
9132# Check whether --with-hash_algorithm was given.
9133if test "${with_hash_algorithm+set}" = set; then :
9134 withval=$with_hash_algorithm;
9135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9136$as_echo "$withval" >&6; }
9137case "$withval" in
9138 siphash24)
9139 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9140
9141 ;;
9142 fnv)
9143 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9144
9145 ;;
9146 *)
9147 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9148 ;;
9149esac
9150
9151else
9152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9153$as_echo "default" >&6; }
9154fi
9155
9156
Guido van Rossum70c7f481998-03-26 18:44:10 +00009157# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9159$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009160if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009161 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009162else
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009164LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168/* Override any GCC internal prototype to avoid an error.
9169 Use char because int might match the return type of a GCC
9170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009171#ifdef __cplusplus
9172extern "C"
9173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009174char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009175int
9176main ()
9177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 ;
9180 return 0;
9181}
9182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009185else
Matthias Kloseb9621712010-04-24 17:59:49 +00009186 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009188rm -f core conftest.err conftest.$ac_objext \
9189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009190LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9193$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009194if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009195 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009196fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009197 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9199$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009200if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009201 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009202else
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009204LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009207
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208/* Override any GCC internal prototype to avoid an error.
9209 Use char because int might match the return type of a GCC
9210 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009211#ifdef __cplusplus
9212extern "C"
9213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009214char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009215int
9216main ()
9217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 ;
9220 return 0;
9221}
9222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009223if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009225else
Matthias Kloseb9621712010-04-24 17:59:49 +00009226 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009228rm -f core conftest.err conftest.$ac_objext \
9229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009230LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9233$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009234if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009235 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009236fi
9237 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009238
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9240$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009242# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009243if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009244 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9246$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009247LIBS="$withval $LIBS"
9248
9249else
Matthias Kloseb9621712010-04-24 17:59:49 +00009250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9251$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252fi
9253
Guido van Rossum7f43da71994-08-01 12:15:30 +00009254
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009255if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009256 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9257set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9259$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009260if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009261 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009262else
9263 case $PKG_CONFIG in
9264 [\\/]* | ?:[\\/]*)
9265 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9266 ;;
9267 *)
9268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9269for as_dir in $PATH
9270do
9271 IFS=$as_save_IFS
9272 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009273 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009274 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009275 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009277 break 2
9278 fi
9279done
Matthias Kloseb9621712010-04-24 17:59:49 +00009280 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009281IFS=$as_save_IFS
9282
9283 ;;
9284esac
9285fi
9286PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9287if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9289$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009290else
Matthias Kloseb9621712010-04-24 17:59:49 +00009291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9292$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009293fi
9294
9295
9296fi
9297if test -z "$ac_cv_path_PKG_CONFIG"; then
9298 ac_pt_PKG_CONFIG=$PKG_CONFIG
9299 # Extract the first word of "pkg-config", so it can be a program name with args.
9300set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9302$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009303if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009304 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009305else
9306 case $ac_pt_PKG_CONFIG in
9307 [\\/]* | ?:[\\/]*)
9308 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9309 ;;
9310 *)
9311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9312for as_dir in $PATH
9313do
9314 IFS=$as_save_IFS
9315 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009316 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009317 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009318 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009319 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009320 break 2
9321 fi
9322done
Matthias Kloseb9621712010-04-24 17:59:49 +00009323 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009324IFS=$as_save_IFS
9325
9326 ;;
9327esac
9328fi
9329ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9330if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9332$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009333else
Matthias Kloseb9621712010-04-24 17:59:49 +00009334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9335$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009336fi
9337
9338 if test "x$ac_pt_PKG_CONFIG" = x; then
9339 PKG_CONFIG=""
9340 else
9341 case $cross_compiling:$ac_tool_warned in
9342yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009343{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9344$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009345ac_tool_warned=yes ;;
9346esac
9347 PKG_CONFIG=$ac_pt_PKG_CONFIG
9348 fi
9349else
9350 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9351fi
9352
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009353
9354# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9356$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009357
9358# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009359if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009360 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009361else
9362 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009363fi
9364
9365
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9367$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009368
9369# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9371$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009372
9373# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009374if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009375 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009376else
9377 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009378fi
9379
9380
9381if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009382 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9383else
9384 LIBFFI_INCLUDEDIR=""
9385fi
9386
9387
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9389$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009390
Stefan Krah60187b52012-03-23 19:06:27 +01009391# Check for use of the system libmpdec library
9392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9393$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9394
9395# Check whether --with-system_libmpdec was given.
9396if test "${with_system_libmpdec+set}" = set; then :
9397 withval=$with_system_libmpdec;
9398else
9399 with_system_libmpdec="no"
9400fi
9401
9402
9403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9404$as_echo "$with_system_libmpdec" >&6; }
9405
Benjamin Peterson076ed002010-10-31 17:11:02 +00009406# Check for support for loadable sqlite extensions
9407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9408$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9409# Check whether --enable-loadable-sqlite-extensions was given.
9410if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9411 enableval=$enable_loadable_sqlite_extensions;
9412else
9413 enable_loadable_sqlite_extensions="no"
9414fi
9415
9416
9417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9418$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9419
Ned Deilyd819b932013-09-06 01:07:05 -07009420# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9421
9422
9423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9424$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9425
9426# Check whether --with-tcltk-includes was given.
9427if test "${with_tcltk_includes+set}" = set; then :
9428 withval=$with_tcltk_includes;
9429else
9430 with_tcltk_includes="default"
9431fi
9432
9433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9434$as_echo "$with_tcltk_includes" >&6; }
9435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9436$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9437
9438# Check whether --with-tcltk-libs was given.
9439if test "${with_tcltk_libs+set}" = set; then :
9440 withval=$with_tcltk_libs;
9441else
9442 with_tcltk_libs="default"
9443fi
9444
9445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9446$as_echo "$with_tcltk_libs" >&6; }
9447if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9448then
9449 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9450 then
9451 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9452 fi
9453 TCLTK_INCLUDES=""
9454 TCLTK_LIBS=""
9455else
9456 TCLTK_INCLUDES="$with_tcltk_includes"
9457 TCLTK_LIBS="$with_tcltk_libs"
9458fi
9459
Matthias Klose55708cc2009-04-30 08:06:49 +00009460# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9462$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009463
9464# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009465if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009466 withval=$with_dbmliborder;
9467if test x$with_dbmliborder = xyes
9468then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009469as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009470else
9471 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9472 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9473 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009474 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009475 fi
9476 done
9477fi
9478fi
9479
Matthias Kloseb9621712010-04-24 17:59:49 +00009480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9481$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009482
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009483# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009484
9485
Matthias Kloseb9621712010-04-24 17:59:49 +00009486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9487$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009489# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009490if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009491 withval=$with_signal_module;
9492fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009493
9494
9495if test -z "$with_signal_module"
9496then with_signal_module="yes"
9497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9499$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009500
9501if test "${with_signal_module}" = "yes"; then
9502 USE_SIGNAL_MODULE=""
9503 SIGNAL_OBJS=""
9504else
9505 USE_SIGNAL_MODULE="#"
9506 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9507fi
9508
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009509# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009510
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009511USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513
Martin v. Löwis11437992002-04-12 09:54:03 +00009514
9515# Templates for things AC_DEFINEd more than once.
9516# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009517
9518
Martin v. Löwis11437992002-04-12 09:54:03 +00009519
Matthias Kloseb9621712010-04-24 17:59:49 +00009520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9521$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009524if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009525 withval=$with_threads;
9526fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009527
9528
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009529# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009532if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009533 withval=$with_thread; with_threads=$with_thread
9534fi
9535
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009536
9537if test -z "$with_threads"
9538then with_threads="yes"
9539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9541$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009542
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009543
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009544if test "$with_threads" = "no"
9545then
9546 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009547elif test "$ac_cv_pthread_is_default" = yes
9548then
Matthias Kloseb9621712010-04-24 17:59:49 +00009549 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009550
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009551 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009552 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009553
9554 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009555 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009556elif test "$ac_cv_kpthread" = "yes"
9557then
9558 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009559 if test "$ac_cv_cxx_thread" = "yes"; then
9560 CXX="$CXX -Kpthread"
9561 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009562 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009563
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009564 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009565 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009566elif test "$ac_cv_kthread" = "yes"
9567then
9568 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009569 if test "$ac_cv_cxx_thread" = "yes"; then
9570 CXX="$CXX -Kthread"
9571 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009572 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009573
9574 posix_threads=yes
9575 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009576elif test "$ac_cv_pthread" = "yes"
9577then
9578 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009579 if test "$ac_cv_cxx_thread" = "yes"; then
9580 CXX="$CXX -pthread"
9581 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009583
9584 posix_threads=yes
9585 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009586else
9587 if test ! -z "$with_threads" -a -d "$with_threads"
9588 then LDFLAGS="$LDFLAGS -L$with_threads"
9589 fi
9590 if test ! -z "$withval" -a -d "$withval"
9591 then LDFLAGS="$LDFLAGS -L$withval"
9592 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009593
9594 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009595 # define _POSIX_THREADS in unistd.h. Some apparently don't
9596 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9598$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009600/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009601
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009602#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009603#ifdef _POSIX_THREADS
9604yes
9605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009606
9607_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009609 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009610 unistd_defines_pthreads=yes
9611else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009612 unistd_defines_pthreads=no
9613fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009614rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009615
Matthias Kloseb9621712010-04-24 17:59:49 +00009616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9617$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009618
Matthias Kloseb9621712010-04-24 17:59:49 +00009619 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009620
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009621 # Just looking for pthread_create in libpthread is not enough:
9622 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9623 # So we really have to include pthread.h, and then link.
9624 _libs=$LIBS
9625 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9627$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009629/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009630
9631#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009632#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009633
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009634void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009635int
9636main ()
9637{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009638
9639pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ;
9641 return 0;
9642}
9643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009644if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009645
Matthias Kloseb9621712010-04-24 17:59:49 +00009646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9647$as_echo "yes" >&6; }
9648 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009649
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009650 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009651 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009652else
Martin v. Löwis11437992002-04-12 09:54:03 +00009653
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009654 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009655 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009656if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009658
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009659 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009660 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009661else
Guido van Rossumad678af1998-10-02 14:42:15 +00009662
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9664$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009665if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009667else
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009669LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673/* Override any GCC internal prototype to avoid an error.
9674 Use char because int might match the return type of a GCC
9675 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009676#ifdef __cplusplus
9677extern "C"
9678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009679char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009680int
9681main ()
9682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 ;
9685 return 0;
9686}
9687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009688if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009690else
Matthias Kloseb9621712010-04-24 17:59:49 +00009691 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009693rm -f core conftest.err conftest.$ac_objext \
9694 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009695LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9698$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009699if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009701
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009702 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009703 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009704 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009705else
Greg Steinadf63d62000-07-05 10:38:09 +00009706
Matthias Kloseb9621712010-04-24 17:59:49 +00009707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9708$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009709if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009711else
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009713LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717/* Override any GCC internal prototype to avoid an error.
9718 Use char because int might match the return type of a GCC
9719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009720#ifdef __cplusplus
9721extern "C"
9722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009723char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009724int
9725main ()
9726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 ;
9729 return 0;
9730}
9731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009732if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009734else
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009737rm -f core conftest.err conftest.$ac_objext \
9738 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009739LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9742$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009743if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009745
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009746 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009747 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009748 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009749else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009750
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9752$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009753if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009755else
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009757LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761/* Override any GCC internal prototype to avoid an error.
9762 Use char because int might match the return type of a GCC
9763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009764#ifdef __cplusplus
9765extern "C"
9766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009767char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009768int
9769main ()
9770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ;
9773 return 0;
9774}
9775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009776if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009778else
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009781rm -f core conftest.err conftest.$ac_objext \
9782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9786$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009787if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009789
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009790 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009791 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009792 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009793else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009794
Matthias Kloseb9621712010-04-24 17:59:49 +00009795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9796$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009797if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009799else
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009801LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805/* Override any GCC internal prototype to avoid an error.
9806 Use char because int might match the return type of a GCC
9807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009808#ifdef __cplusplus
9809extern "C"
9810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009811char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009812int
9813main ()
9814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 ;
9817 return 0;
9818}
9819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009820if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009822else
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009825rm -f core conftest.err conftest.$ac_objext \
9826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009827LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9830$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009831if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009833
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009834 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009835 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009836 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009837else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009838
Martin v. Löwis130fb172001-07-19 11:00:41 +00009839 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009840fi
9841
Guido van Rossum627b2d71993-12-24 10:39:16 +00009842
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009843fi
9844
Guido van Rossum0be3e491997-05-22 20:33:33 +00009845fi
9846
Guido van Rossum49545951997-12-02 19:28:29 +00009847fi
9848
Guido van Rossumb93a8621998-05-07 13:27:32 +00009849fi
9850
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009852rm -f core conftest.err conftest.$ac_objext \
9853 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009854
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9856$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009857if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009859else
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009861LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865/* Override any GCC internal prototype to avoid an error.
9866 Use char because int might match the return type of a GCC
9867 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009868#ifdef __cplusplus
9869extern "C"
9870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009871char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009872int
9873main ()
9874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 ;
9877 return 0;
9878}
9879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009881 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009882else
Matthias Kloseb9621712010-04-24 17:59:49 +00009883 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009885rm -f core conftest.err conftest.$ac_objext \
9886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009887LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9890$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009891if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009893
Martin v. Löwis130fb172001-07-19 11:00:41 +00009894 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009895 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009896 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009897fi
9898
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009899
Neal Norwitza978ab02002-11-02 16:58:05 +00009900 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9902$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009903if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009905else
Martin v. Löwis11437992002-04-12 09:54:03 +00009906 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009907LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009911/* Override any GCC internal prototype to avoid an error.
9912 Use char because int might match the return type of a GCC
9913 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009914#ifdef __cplusplus
9915extern "C"
9916#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009917char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009918int
9919main ()
9920{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009921return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009922 ;
9923 return 0;
9924}
9925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009926if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009927 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009928else
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009931rm -f core conftest.err conftest.$ac_objext \
9932 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009933LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9936$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009937if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009939
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009940 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009941 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009942 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009943fi
9944
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009945 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009946fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009947
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009948if test "$posix_threads" = "yes"; then
9949 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009950
Matthias Kloseb9621712010-04-24 17:59:49 +00009951$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009952
9953 fi
9954
9955 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9956 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009957 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009958$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009959
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009960 ;;
9961 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009962$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009963
9964 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009965 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009966$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009967
9968 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009969 esac
9970
Matthias Kloseb9621712010-04-24 17:59:49 +00009971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9972$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009973 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009975else
Matthias Kloseb9621712010-04-24 17:59:49 +00009976 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009977 ac_cv_pthread_system_supported=no
9978else
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009980/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009981
9982 #include <stdio.h>
9983 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009984 void *foo(void *parm) {
9985 return NULL;
9986 }
9987 main() {
9988 pthread_attr_t attr;
9989 pthread_t id;
9990 if (pthread_attr_init(&attr)) exit(-1);
9991 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9992 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9993 exit(0);
9994 }
9995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009996if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009997 ac_cv_pthread_system_supported=yes
9998else
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10002 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010003fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010005
Guido van Rossum627b2d71993-12-24 10:39:16 +000010006fi
10007
Matthias Kloseb9621712010-04-24 17:59:49 +000010008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10009$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010010 if test "$ac_cv_pthread_system_supported" = "yes"; then
10011
Matthias Kloseb9621712010-04-24 17:59:49 +000010012$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010013
10014 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010015 for ac_func in pthread_sigmask
10016do :
10017 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010018if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010019 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010020#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010021_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010022 case $ac_sys_system in
10023 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010026
10027 ;;
10028 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010029fi
10030done
10031
Christian Heimesf77b4b22013-08-21 13:26:05 +020010032 for ac_func in pthread_atfork
10033do :
10034 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10035if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10036 cat >>confdefs.h <<_ACEOF
10037#define HAVE_PTHREAD_ATFORK 1
10038_ACEOF
10039
10040fi
10041done
10042
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010043fi
10044
10045
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010046# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010047
Matthias Kloseb9621712010-04-24 17:59:49 +000010048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10049$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010051if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010052 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010053 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10055$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010056 ipv6=no
10057 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10059$as_echo "yes" >&6; }
10060 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010061
10062 ipv6=yes
10063 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010065else
Martin v. Löwis11437992002-04-12 09:54:03 +000010066
Matthias Kloseb9621712010-04-24 17:59:49 +000010067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010068/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010069 /* AF_INET6 available check */
10070#include <sys/types.h>
10071#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010072int
10073main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010074{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010075int domain = AF_INET6;
10076 ;
10077 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010078}
Martin v. Löwis11437992002-04-12 09:54:03 +000010079_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010080if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010081
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10083$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010084 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010085
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010086else
Matthias Kloseb159a552010-04-25 21:00:44 +000010087
Matthias Kloseb9621712010-04-24 17:59:49 +000010088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010090 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010091
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010092fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010095if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10097$as_echo_n "checking if RFC2553 API is available... " >&6; }
10098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010099/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010100
10101 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010102#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010103int
10104main ()
10105{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010106struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010107 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 ;
10109 return 0;
10110}
Matthias Kloseb159a552010-04-25 21:00:44 +000010111
Martin v. Löwis11437992002-04-12 09:54:03 +000010112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010113if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010114
10115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010116$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010117 ipv6=yes
10118
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010119else
Matthias Kloseb159a552010-04-25 21:00:44 +000010120
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010122$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010123 ipv6=no
10124
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010127fi
10128
10129if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010131
10132fi
10133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134fi
10135
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010136
10137ipv6type=unknown
10138ipv6lib=none
10139ipv6trylibc=no
10140
10141if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10143$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010144 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10145 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010146 case $i in
10147 inria)
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 <netinet/in.h>
10152#ifdef IPV6_INRIA_VERSION
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öwis44ddbde2001-12-02 10:15:37 +000010158 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010159fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010160rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010161
10162 ;;
10163 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010165/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010166
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010167#include <netinet/in.h>
10168#ifdef __KAME__
10169yes
10170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010171_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010172if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010173 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010174 ipv6type=$i;
10175 ipv6lib=inet6
10176 ipv6libdir=/usr/local/v6/lib
10177 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010178fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010179rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010180
10181 ;;
10182 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010184/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010185
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010186#include <features.h>
10187#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10188yes
10189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010190_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010193 ipv6type=$i;
10194 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010195fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010196rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010197
10198 ;;
10199 linux-inet6)
10200 if test -d /usr/inet6; then
10201 ipv6type=$i
10202 ipv6lib=inet6
10203 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010204 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010205 fi
10206 ;;
10207 solaris)
10208 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010209 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010210 ipv6type=$i
10211 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010212 fi
10213 fi
10214 ;;
10215 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010217/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010218
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010219#include <sys/param.h>
10220#ifdef _TOSHIBA_INET6
10221yes
10222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010223_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010226 ipv6type=$i;
10227 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010228 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010230rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010231
10232 ;;
10233 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010235/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010236
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010237#include </usr/local/v6/include/sys/v6config.h>
10238#ifdef __V6D__
10239yes
10240#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010241_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010244 ipv6type=$i;
10245 ipv6lib=v6;
10246 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010247 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010248fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010249rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010250
10251 ;;
10252 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010254/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010255
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010256#include <sys/param.h>
10257#ifdef _ZETA_MINAMI_INET6
10258yes
10259#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010260_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010263 ipv6type=$i;
10264 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010265 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010266fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010267rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010268
10269 ;;
10270 esac
10271 if test "$ipv6type" != "unknown"; then
10272 break
10273 fi
10274 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10276$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010277fi
10278
10279if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10280 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10281 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10282 echo "using lib$ipv6lib"
10283 else
10284 if test $ipv6trylibc = "yes"; then
10285 echo "using libc"
10286 else
10287 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10288 echo "You need to fetch lib$ipv6lib.a from appropriate"
10289 echo 'ipv6 kit and compile beforehand.'
10290 exit 1
10291 fi
10292 fi
10293fi
10294
Matthias Kloseb9621712010-04-24 17:59:49 +000010295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10296$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010298/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010299
10300 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010301int
10302main ()
10303{
10304FSIORefNum fRef = 0
10305 ;
10306 return 0;
10307}
Matthias Kloseb159a552010-04-25 21:00:44 +000010308
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010310if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010311
Matthias Kloseb159a552010-04-25 21:00:44 +000010312
Matthias Kloseb9621712010-04-24 17:59:49 +000010313$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010314
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10316$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010317
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010318else
Matthias Kloseb159a552010-04-25 21:00:44 +000010319
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10321$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010322
10323fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10325
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010326# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10328$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010330# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010331if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332 withval=$with_doc_strings;
10333fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010334
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010335
10336if test -z "$with_doc_strings"
10337then with_doc_strings="yes"
10338fi
10339if test "$with_doc_strings" != "no"
10340then
10341
Matthias Kloseb9621712010-04-24 17:59:49 +000010342$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010343
10344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10346$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010347
Antoine Pitrou042b1282010-08-13 21:15:58 +000010348# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10350$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010352# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010353if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010355if test "$withval" != no
10356then
10357
Matthias Kloseb9621712010-04-24 17:59:49 +000010358$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010359
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10361$as_echo "yes" >&6; }
10362else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10363$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010364fi
10365else
Matthias Kloseb9621712010-04-24 17:59:49 +000010366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10367$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368fi
10369
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010370
10371# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10373$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010375# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010376if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010377 withval=$with_pymalloc;
10378fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010379
Neil Schemenauera35c6882001-02-27 04:45:05 +000010380
Neil Schemenauer16c22972002-03-22 15:34:49 +000010381if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010382then
10383 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010384fi
10385if test "$with_pymalloc" != "no"
10386then
Martin v. Löwis11437992002-04-12 09:54:03 +000010387
Matthias Kloseb9621712010-04-24 17:59:49 +000010388$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010389
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010390 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10393$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010394
Benjamin Peterson05159c42009-12-03 03:01:27 +000010395# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10397$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010398
10399# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010400if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010401 withval=$with_valgrind;
10402else
10403 with_valgrind=no
10404fi
10405
Matthias Kloseb9621712010-04-24 17:59:49 +000010406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10407$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010408if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 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 +020010410if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010411
Matthias Kloseb9621712010-04-24 17:59:49 +000010412$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010413
10414else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010415 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010416
10417fi
10418
10419
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010420 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010421fi
10422
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010423# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010424
Guido van Rossum98935bf2001-09-05 19:13:16 +000010425DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010426
Guido van Rossume97ee181999-12-20 21:27:22 +000010427# the dlopen() function means we might want to use dynload_shlib.o. some
10428# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010429for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010430do :
10431 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010432if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010434#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010435_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010436
Guido van Rossume97ee181999-12-20 21:27:22 +000010437fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010438done
Guido van Rossume97ee181999-12-20 21:27:22 +000010439
Michael W. Hudson54241132001-12-07 15:38:26 +000010440
Guido van Rossume97ee181999-12-20 21:27:22 +000010441# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10442# loading of modules.
10443
Matthias Kloseb9621712010-04-24 17:59:49 +000010444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10445$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010446if test -z "$DYNLOADFILE"
10447then
10448 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010449 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10450 if test "$ac_cv_func_dlopen" = yes
10451 then DYNLOADFILE="dynload_shlib.o"
10452 else DYNLOADFILE="dynload_aix.o"
10453 fi
10454 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010455 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010456 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10457 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010458 *)
10459 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10460 # out any dynamic loading
10461 if test "$ac_cv_func_dlopen" = yes
10462 then DYNLOADFILE="dynload_shlib.o"
10463 else DYNLOADFILE="dynload_stub.o"
10464 fi
10465 ;;
10466 esac
10467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10469$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010470if test "$DYNLOADFILE" != "dynload_stub.o"
10471then
Martin v. Löwis11437992002-04-12 09:54:03 +000010472
Matthias Kloseb9621712010-04-24 17:59:49 +000010473$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010474
10475fi
10476
Neil Schemenauer4e425612001-06-19 15:44:15 +000010477# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10478
Michael W. Hudson54241132001-12-07 15:38:26 +000010479
Matthias Kloseb9621712010-04-24 17:59:49 +000010480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10481$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010482if test -z "$MACHDEP_OBJS"
10483then
Jack Jansene578a632001-08-15 01:27:14 +000010484 MACHDEP_OBJS=$extra_machdep_objs
10485else
10486 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010487fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010488if test -z "$MACHDEP_OBJS"; then
10489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10490$as_echo "none" >&6; }
10491else
10492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10493$as_echo "$MACHDEP_OBJS" >&6; }
10494fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010495
Guido van Rossum627b2d71993-12-24 10:39:16 +000010496# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010497for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010498 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010499 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010500 futimens futimes gai_strerror \
10501 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010502 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010503 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010504 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10505 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010506 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010507 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010508 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010509 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010510 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010511 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010512 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10513 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010514 sigaction sigaltstack siginterrupt sigpending sigrelse \
10515 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010516 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010517 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010518 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010519do :
10520 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10521ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010522if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010524#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010525_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010526
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010527fi
10528done
10529
Michael W. Hudson54241132001-12-07 15:38:26 +000010530
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010531ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10532 #include <dirent.h>
10533"
10534if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10535
10536$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10537
10538fi
10539
10540
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010541# For some functions, having a definition is not sufficient, since
10542# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10544$as_echo_n "checking for chroot... " >&6; }
10545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010546/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010547#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010548int
10549main ()
10550{
10551void *x=chroot
10552 ;
10553 return 0;
10554}
10555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010557
Matthias Kloseb9621712010-04-24 17:59:49 +000010558$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010559
Matthias Kloseb159a552010-04-25 21:00:44 +000010560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010561$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010562else
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010565
10566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10569$as_echo_n "checking for link... " >&6; }
10570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010571/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010572#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010573int
10574main ()
10575{
10576void *x=link
10577 ;
10578 return 0;
10579}
10580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010581if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010582
Matthias Kloseb9621712010-04-24 17:59:49 +000010583$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010584
Matthias Kloseb159a552010-04-25 21:00:44 +000010585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010586$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010587else
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10589$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010590
10591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10594$as_echo_n "checking for symlink... " >&6; }
10595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010596/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010597#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010598int
10599main ()
10600{
10601void *x=symlink
10602 ;
10603 return 0;
10604}
10605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010606if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010607
Matthias Kloseb9621712010-04-24 17:59:49 +000010608$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010609
Matthias Kloseb159a552010-04-25 21:00:44 +000010610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010611$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010612else
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10614$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010615
10616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10619$as_echo_n "checking for fchdir... " >&6; }
10620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010621/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010622#include <unistd.h>
10623int
10624main ()
10625{
10626void *x=fchdir
10627 ;
10628 return 0;
10629}
10630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010632
Matthias Kloseb9621712010-04-24 17:59:49 +000010633$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010634
Matthias Kloseb159a552010-04-25 21:00:44 +000010635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010636$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010637else
Matthias Kloseb9621712010-04-24 17:59:49 +000010638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010640
10641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10644$as_echo_n "checking for fsync... " >&6; }
10645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010646/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010647#include <unistd.h>
10648int
10649main ()
10650{
10651void *x=fsync
10652 ;
10653 return 0;
10654}
10655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010656if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010659
Matthias Kloseb159a552010-04-25 21:00:44 +000010660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010661$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010662else
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10664$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010665
10666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10669$as_echo_n "checking for fdatasync... " >&6; }
10670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010671/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010672#include <unistd.h>
10673int
10674main ()
10675{
10676void *x=fdatasync
10677 ;
10678 return 0;
10679}
10680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010681if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010682
Matthias Kloseb9621712010-04-24 17:59:49 +000010683$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010684
Matthias Kloseb159a552010-04-25 21:00:44 +000010685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010686$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010687else
Matthias Kloseb9621712010-04-24 17:59:49 +000010688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10689$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010690
10691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10694$as_echo_n "checking for epoll... " >&6; }
10695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010696/* end confdefs.h. */
10697#include <sys/epoll.h>
10698int
10699main ()
10700{
10701void *x=epoll_create
10702 ;
10703 return 0;
10704}
10705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010709
Matthias Kloseb159a552010-04-25 21:00:44 +000010710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010711$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010712else
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10714$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010715
10716fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10719$as_echo_n "checking for epoll_create1... " >&6; }
10720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10721/* end confdefs.h. */
10722#include <sys/epoll.h>
10723int
10724main ()
10725{
10726void *x=epoll_create1
10727 ;
10728 return 0;
10729}
10730_ACEOF
10731if ac_fn_c_try_compile "$LINENO"; then :
10732
10733$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10734
10735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10736$as_echo "yes" >&6; }
10737else
10738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10739$as_echo "no" >&6; }
10740
10741fi
10742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10744$as_echo_n "checking for kqueue... " >&6; }
10745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010746/* end confdefs.h. */
10747
10748#include <sys/types.h>
10749#include <sys/event.h>
10750
10751int
10752main ()
10753{
10754int x=kqueue()
10755 ;
10756 return 0;
10757}
10758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010759if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010762
Matthias Kloseb159a552010-04-25 21:00:44 +000010763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010764$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010765else
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010768
10769fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10772$as_echo_n "checking for prlimit... " >&6; }
10773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10774/* end confdefs.h. */
10775
10776#include <sys/time.h>
10777#include <sys/resource.h>
10778
10779int
10780main ()
10781{
10782void *x=prlimit
10783 ;
10784 return 0;
10785}
10786_ACEOF
10787if ac_fn_c_try_compile "$LINENO"; then :
10788
10789$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10790
10791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10792$as_echo "yes" >&6; }
10793else
10794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795$as_echo "no" >&6; }
10796
10797fi
10798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10799
Martin v. Löwisd5843682002-11-21 20:41:28 +000010800# On some systems (eg. FreeBSD 5), we would find a definition of the
10801# functions ctermid_r, setgroups in the library, but no prototype
10802# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10803# address to avoid compiler warnings and potential miscompilations
10804# because of the missing prototypes.
10805
Matthias Kloseb9621712010-04-24 17:59:49 +000010806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10807$as_echo_n "checking for ctermid_r... " >&6; }
10808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010809/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010810
Martin v. Löwisd5843682002-11-21 20:41:28 +000010811#include <stdio.h>
10812
Martin v. Löwisd5843682002-11-21 20:41:28 +000010813int
10814main ()
10815{
10816void* p = ctermid_r
10817 ;
10818 return 0;
10819}
10820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010821if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010824
Matthias Kloseb159a552010-04-25 21:00:44 +000010825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010826$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010827else
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10829$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010830
10831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10833
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10835$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010836if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010837 $as_echo_n "(cached) " >&6
10838else
10839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010840/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010841#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010842int
10843main ()
10844{
10845void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010846
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010847 ;
10848 return 0;
10849}
10850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010851if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010852 ac_cv_flock_decl=yes
10853else
10854 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010855
10856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010858
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010859fi
10860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10861$as_echo "$ac_cv_flock_decl" >&6; }
10862if test "x${ac_cv_flock_decl}" = xyes; then
10863 for ac_func in flock
10864do :
10865 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010866if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010867 cat >>confdefs.h <<_ACEOF
10868#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010869_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010870
Antoine Pitroua3000072010-09-07 14:52:42 +000010871else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010873$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010874if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010875 $as_echo_n "(cached) " >&6
10876else
10877 ac_check_lib_save_LIBS=$LIBS
10878LIBS="-lbsd $LIBS"
10879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10880/* end confdefs.h. */
10881
10882/* Override any GCC internal prototype to avoid an error.
10883 Use char because int might match the return type of a GCC
10884 builtin and then its argument prototype would still apply. */
10885#ifdef __cplusplus
10886extern "C"
10887#endif
10888char flock ();
10889int
10890main ()
10891{
10892return flock ();
10893 ;
10894 return 0;
10895}
10896_ACEOF
10897if ac_fn_c_try_link "$LINENO"; then :
10898 ac_cv_lib_bsd_flock=yes
10899else
10900 ac_cv_lib_bsd_flock=no
10901fi
10902rm -f core conftest.err conftest.$ac_objext \
10903 conftest$ac_exeext conftest.$ac_ext
10904LIBS=$ac_check_lib_save_LIBS
10905fi
10906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10907$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010908if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010909 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010910
10911
10912$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10913
10914
10915fi
10916
10917
10918fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010919done
10920
Antoine Pitroua3000072010-09-07 14:52:42 +000010921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10924$as_echo_n "checking for getpagesize... " >&6; }
10925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010926/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010927
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010928#include <unistd.h>
10929
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010930int
10931main ()
10932{
10933void* p = getpagesize
10934 ;
10935 return 0;
10936}
10937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010938if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010941
Matthias Kloseb159a552010-04-25 21:00:44 +000010942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010943$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010944else
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10946$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010947
10948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010950
Victor Stinner984890f2011-11-24 13:53:38 +010010951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10952$as_echo_n "checking for broken unsetenv... " >&6; }
10953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10954/* end confdefs.h. */
10955
10956#include <stdlib.h>
10957
10958int
10959main ()
10960{
10961int res = unsetenv("DUMMY")
10962 ;
10963 return 0;
10964}
10965_ACEOF
10966if ac_fn_c_try_compile "$LINENO"; then :
10967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10968$as_echo "no" >&6; }
10969else
10970
10971$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10972
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10974$as_echo "yes" >&6; }
10975
10976fi
10977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10978
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010979for ac_prog in true
10980do
10981 # Extract the first word of "$ac_prog", so it can be a program name with args.
10982set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10984$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010985if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010986 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010987else
10988 if test -n "$TRUE"; then
10989 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10990else
10991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10992for as_dir in $PATH
10993do
10994 IFS=$as_save_IFS
10995 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010998 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 $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 +000011000 break 2
11001 fi
11002done
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011005
11006fi
11007fi
11008TRUE=$ac_cv_prog_TRUE
11009if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11011$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011012else
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11014$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011015fi
11016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011017
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011018 test -n "$TRUE" && break
11019done
11020test -n "$TRUE" || TRUE="/bin/true"
11021
11022
Matthias Kloseb9621712010-04-24 17:59:49 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11024$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011025if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011027else
11028 ac_check_lib_save_LIBS=$LIBS
11029LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011031/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033/* Override any GCC internal prototype to avoid an error.
11034 Use char because int might match the return type of a GCC
11035 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011036#ifdef __cplusplus
11037extern "C"
11038#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011039char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011040int
11041main ()
11042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011044 ;
11045 return 0;
11046}
11047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011048if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011049 ac_cv_lib_c_inet_aton=yes
11050else
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011053rm -f core conftest.err conftest.$ac_objext \
11054 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011055LIBS=$ac_check_lib_save_LIBS
11056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11058$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011059if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011060 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011061else
Matthias Kloseb9621712010-04-24 17:59:49 +000011062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11063$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011064if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011065 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011066else
11067 ac_check_lib_save_LIBS=$LIBS
11068LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011070/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011072/* Override any GCC internal prototype to avoid an error.
11073 Use char because int might match the return type of a GCC
11074 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011075#ifdef __cplusplus
11076extern "C"
11077#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011078char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011079int
11080main ()
11081{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011082return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011083 ;
11084 return 0;
11085}
11086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011087if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011088 ac_cv_lib_resolv_inet_aton=yes
11089else
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011092rm -f core conftest.err conftest.$ac_objext \
11093 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011094LIBS=$ac_check_lib_save_LIBS
11095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11097$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011098if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011099 cat >>confdefs.h <<_ACEOF
11100#define HAVE_LIBRESOLV 1
11101_ACEOF
11102
11103 LIBS="-lresolv $LIBS"
11104
11105fi
11106
11107
11108fi
11109
11110
Christian Heimesd0764e22007-12-04 15:00:33 +000011111# On Tru64, chflags seems to be present, but calling it will
11112# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11114$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011115if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011116 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011117else
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011119 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011120else
Matthias Kloseb9621712010-04-24 17:59:49 +000011121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011122/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011123
Christian Heimesd0764e22007-12-04 15:00:33 +000011124#include <sys/stat.h>
11125#include <unistd.h>
11126int main(int argc, char*argv[])
11127{
11128 if(chflags(argv[0], 0) != 0)
11129 return 1;
11130 return 0;
11131}
Ned Deily3eb67d52011-06-28 00:00:28 -070011132
Christian Heimesd0764e22007-12-04 15:00:33 +000011133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011134if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011135 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011136else
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11140 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011141fi
11142
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011143
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11146$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011147if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011148 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011149if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011150 ac_cv_have_chflags="yes"
11151else
11152 ac_cv_have_chflags="no"
11153fi
11154
11155fi
11156if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011157
Matthias Kloseb9621712010-04-24 17:59:49 +000011158$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011159
11160fi
11161
Matthias Kloseb9621712010-04-24 17:59:49 +000011162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11163$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011164if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011165 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011166else
Matthias Kloseb9621712010-04-24 17:59:49 +000011167 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011168 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011169else
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011171/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011172
Christian Heimesd0764e22007-12-04 15:00:33 +000011173#include <sys/stat.h>
11174#include <unistd.h>
11175int main(int argc, char*argv[])
11176{
11177 if(lchflags(argv[0], 0) != 0)
11178 return 1;
11179 return 0;
11180}
Ned Deily3eb67d52011-06-28 00:00:28 -070011181
Christian Heimesd0764e22007-12-04 15:00:33 +000011182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011183if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011184 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011185else
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11189 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011190fi
11191
11192
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11195$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011196if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011197 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011198if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011199 ac_cv_have_lchflags="yes"
11200else
11201 ac_cv_have_lchflags="no"
11202fi
11203
11204fi
11205if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011206
Matthias Kloseb9621712010-04-24 17:59:49 +000011207$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011208
11209fi
11210
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011211case $ac_sys_system/$ac_sys_release in
11212Darwin/*)
11213 _CUR_CFLAGS="${CFLAGS}"
11214 _CUR_LDFLAGS="${LDFLAGS}"
11215 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11216 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11217 ;;
11218esac
11219
Matthias Kloseb9621712010-04-24 17:59:49 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11221$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011222if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011223 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011224else
11225 ac_check_lib_save_LIBS=$LIBS
11226LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011228/* end confdefs.h. */
11229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230/* Override any GCC internal prototype to avoid an error.
11231 Use char because int might match the return type of a GCC
11232 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011233#ifdef __cplusplus
11234extern "C"
11235#endif
11236char inflateCopy ();
11237int
11238main ()
11239{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011240return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011241 ;
11242 return 0;
11243}
11244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011245if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011246 ac_cv_lib_z_inflateCopy=yes
11247else
Matthias Kloseb9621712010-04-24 17:59:49 +000011248 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011250rm -f core conftest.err conftest.$ac_objext \
11251 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011252LIBS=$ac_check_lib_save_LIBS
11253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11255$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011256if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011257
Matthias Kloseb9621712010-04-24 17:59:49 +000011258$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011259
11260fi
11261
11262
11263case $ac_sys_system/$ac_sys_release in
11264Darwin/*)
11265 CFLAGS="${_CUR_CFLAGS}"
11266 LDFLAGS="${_CUR_LDFLAGS}"
11267 ;;
11268esac
11269
Matthias Kloseb9621712010-04-24 17:59:49 +000011270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11271$as_echo_n "checking for hstrerror... " >&6; }
11272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011273/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011274
Martin v. Löwise9416172003-05-03 10:12:45 +000011275#include <netdb.h>
11276
Martin v. Löwise9416172003-05-03 10:12:45 +000011277int
11278main ()
11279{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011280void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011281 ;
11282 return 0;
11283}
11284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011285if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011288
Matthias Kloseb159a552010-04-25 21:00:44 +000011289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011291else
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011294
11295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011296rm -f core conftest.err conftest.$ac_objext \
11297 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11300$as_echo_n "checking for inet_aton... " >&6; }
11301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011302/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011303
Martin v. Löwis86d66262006-02-17 08:40:11 +000011304#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011305#include <sys/socket.h>
11306#include <netinet/in.h>
11307#include <arpa/inet.h>
11308
Martin v. Löwise9416172003-05-03 10:12:45 +000011309int
11310main ()
11311{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011312void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011313 ;
11314 return 0;
11315}
11316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011317if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011318
Matthias Kloseb9621712010-04-24 17:59:49 +000011319$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011320
Matthias Kloseb159a552010-04-25 21:00:44 +000011321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011322$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011323else
Matthias Kloseb9621712010-04-24 17:59:49 +000011324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11325$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011326
11327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011328rm -f core conftest.err conftest.$ac_objext \
11329 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011330
Matthias Kloseb9621712010-04-24 17:59:49 +000011331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11332$as_echo_n "checking for inet_pton... " >&6; }
11333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011334/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011335
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011336#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011337#include <sys/socket.h>
11338#include <netinet/in.h>
11339#include <arpa/inet.h>
11340
Martin v. Löwise9416172003-05-03 10:12:45 +000011341int
11342main ()
11343{
11344void* p = inet_pton
11345 ;
11346 return 0;
11347}
11348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011352
Matthias Kloseb159a552010-04-25 21:00:44 +000011353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011354$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011355else
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11357$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011358
11359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011361
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011362# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11364$as_echo_n "checking for setgroups... " >&6; }
11365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011366/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011367
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011368#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011369#ifdef HAVE_GRP_H
11370#include <grp.h>
11371#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011372
Martin v. Löwisd5843682002-11-21 20:41:28 +000011373int
11374main ()
11375{
11376void* p = setgroups
11377 ;
11378 return 0;
11379}
11380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011382
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011384
Matthias Kloseb159a552010-04-25 21:00:44 +000011385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011386$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011387else
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11389$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011390
11391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011393
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011394# check for openpty and forkpty
11395
11396for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011397do :
11398 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011399if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011401#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011402_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011403
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011404else
Matthias Kloseb9621712010-04-24 17:59:49 +000011405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11406$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011407if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011409else
Martin v. Löwis11437992002-04-12 09:54:03 +000011410 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011411LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011415/* Override any GCC internal prototype to avoid an error.
11416 Use char because int might match the return type of a GCC
11417 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011418#ifdef __cplusplus
11419extern "C"
11420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011421char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011422int
11423main ()
11424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011426 ;
11427 return 0;
11428}
11429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011430if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011431 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011432else
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011435rm -f core conftest.err conftest.$ac_objext \
11436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011437LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11440$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011441if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011442 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011443 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011444else
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11446$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011447if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011448 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011449else
11450 ac_check_lib_save_LIBS=$LIBS
11451LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011453/* end confdefs.h. */
11454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455/* Override any GCC internal prototype to avoid an error.
11456 Use char because int might match the return type of a GCC
11457 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011458#ifdef __cplusplus
11459extern "C"
11460#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011461char openpty ();
11462int
11463main ()
11464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011466 ;
11467 return 0;
11468}
11469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011470if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011471 ac_cv_lib_bsd_openpty=yes
11472else
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011475rm -f core conftest.err conftest.$ac_objext \
11476 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011477LIBS=$ac_check_lib_save_LIBS
11478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11480$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011481if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011483 LIBS="$LIBS -lbsd"
11484fi
11485
11486
11487fi
11488
Fred Drake8cef4cf2000-06-28 16:40:38 +000011489
11490fi
11491done
11492
11493for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011494do :
11495 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011496if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011498#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011499_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011500
Fred Drake8cef4cf2000-06-28 16:40:38 +000011501else
Matthias Kloseb9621712010-04-24 17:59:49 +000011502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11503$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011504if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011506else
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011508LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512/* Override any GCC internal prototype to avoid an error.
11513 Use char because int might match the return type of a GCC
11514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011515#ifdef __cplusplus
11516extern "C"
11517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011518char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011519int
11520main ()
11521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 ;
11524 return 0;
11525}
11526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011529else
Matthias Kloseb9621712010-04-24 17:59:49 +000011530 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011532rm -f core conftest.err conftest.$ac_objext \
11533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011534LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11537$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011538if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011539 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011540 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011541else
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11543$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011544if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011545 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011546else
11547 ac_check_lib_save_LIBS=$LIBS
11548LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011550/* end confdefs.h. */
11551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552/* Override any GCC internal prototype to avoid an error.
11553 Use char because int might match the return type of a GCC
11554 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011555#ifdef __cplusplus
11556extern "C"
11557#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011558char forkpty ();
11559int
11560main ()
11561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011563 ;
11564 return 0;
11565}
11566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011567if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011568 ac_cv_lib_bsd_forkpty=yes
11569else
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011572rm -f core conftest.err conftest.$ac_objext \
11573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011574LIBS=$ac_check_lib_save_LIBS
11575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11577$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011578if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011580 LIBS="$LIBS -lbsd"
11581fi
11582
11583
11584fi
11585
Fred Drake8cef4cf2000-06-28 16:40:38 +000011586
11587fi
11588done
11589
Jack Jansendd19cf82001-12-06 22:36:17 +000011590
Christian Heimesb186d002008-03-18 15:15:01 +000011591# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011592for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011593do :
11594 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011595if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011596 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011597#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011598_ACEOF
11599
11600fi
11601done
11602
11603
Michael W. Hudson54241132001-12-07 15:38:26 +000011604# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011605for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011606do :
11607 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11608ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011609if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011611#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011612_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011613
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011614fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011615done
11616
Michael W. Hudson54241132001-12-07 15:38:26 +000011617
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011618ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011619if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011620 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011621
Martin v. Löwis1142de32002-03-29 16:28:31 +000011622else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011624 *" dup2.$ac_objext "* ) ;;
11625 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011626 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011627esac
11628
Martin v. Löwis1142de32002-03-29 16:28:31 +000011629fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011630
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011631ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011632if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011633 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11634
11635else
11636 case " $LIBOBJS " in
11637 *" strdup.$ac_objext "* ) ;;
11638 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11639 ;;
11640esac
11641
11642fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011643
11644
11645for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011646do :
11647 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011648if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011650#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011653/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011654#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011655int
11656main ()
11657{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011658getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011659 ;
11660 return 0;
11661}
11662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011663if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011664
Matthias Kloseb9621712010-04-24 17:59:49 +000011665$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011666
Guido van Rossum627b2d71993-12-24 10:39:16 +000011667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011669
Guido van Rossum627b2d71993-12-24 10:39:16 +000011670fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011671done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011672
Jack Jansen150753c2003-03-29 22:07:47 +000011673for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011674do :
11675 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011676if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011677 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011678#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011681/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011682#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011683int
11684main ()
11685{
11686setpgrp(0,0);
11687 ;
11688 return 0;
11689}
11690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011691if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011692
Matthias Kloseb9621712010-04-24 17:59:49 +000011693$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011694
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011697
11698fi
11699done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011700
Thomas Wouters3a584202000-08-05 23:28:51 +000011701for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011702do :
11703 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011704if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011705 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011709/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011710#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011711int
11712main ()
11713{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011714gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011715 ;
11716 return 0;
11717}
11718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011719if ac_fn_c_try_compile "$LINENO"; then :
11720
Guido van Rossum627b2d71993-12-24 10:39:16 +000011721else
Skip Montanaro6dead952003-09-25 14:50:04 +000011722
Matthias Kloseb9621712010-04-24 17:59:49 +000011723$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011724
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Guido van Rossum627b2d71993-12-24 10:39:16 +000011726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011728
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011729fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011730done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011731
Michael W. Hudson54241132001-12-07 15:38:26 +000011732
Victor Stinnere0be4232011-10-25 13:06:09 +020011733for ac_func in clock_gettime
11734do :
11735 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11736if test "x$ac_cv_func_clock_gettime" = xyes; then :
11737 cat >>confdefs.h <<_ACEOF
11738#define HAVE_CLOCK_GETTIME 1
11739_ACEOF
11740
11741else
11742
11743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11744$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11745if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11746 $as_echo_n "(cached) " >&6
11747else
11748 ac_check_lib_save_LIBS=$LIBS
11749LIBS="-lrt $LIBS"
11750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11751/* end confdefs.h. */
11752
11753/* Override any GCC internal prototype to avoid an error.
11754 Use char because int might match the return type of a GCC
11755 builtin and then its argument prototype would still apply. */
11756#ifdef __cplusplus
11757extern "C"
11758#endif
11759char clock_gettime ();
11760int
11761main ()
11762{
11763return clock_gettime ();
11764 ;
11765 return 0;
11766}
11767_ACEOF
11768if ac_fn_c_try_link "$LINENO"; then :
11769 ac_cv_lib_rt_clock_gettime=yes
11770else
11771 ac_cv_lib_rt_clock_gettime=no
11772fi
11773rm -f core conftest.err conftest.$ac_objext \
11774 conftest$ac_exeext conftest.$ac_ext
11775LIBS=$ac_check_lib_save_LIBS
11776fi
11777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11778$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11779if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11780
11781 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11782
11783
11784$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11785
11786
11787fi
11788
11789
11790fi
11791done
11792
11793
11794for ac_func in clock_getres
11795do :
11796 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11797if test "x$ac_cv_func_clock_getres" = xyes; then :
11798 cat >>confdefs.h <<_ACEOF
11799#define HAVE_CLOCK_GETRES 1
11800_ACEOF
11801
11802else
11803
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11805$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11806if ${ac_cv_lib_rt_clock_getres+:} false; then :
11807 $as_echo_n "(cached) " >&6
11808else
11809 ac_check_lib_save_LIBS=$LIBS
11810LIBS="-lrt $LIBS"
11811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11812/* end confdefs.h. */
11813
11814/* Override any GCC internal prototype to avoid an error.
11815 Use char because int might match the return type of a GCC
11816 builtin and then its argument prototype would still apply. */
11817#ifdef __cplusplus
11818extern "C"
11819#endif
11820char clock_getres ();
11821int
11822main ()
11823{
11824return clock_getres ();
11825 ;
11826 return 0;
11827}
11828_ACEOF
11829if ac_fn_c_try_link "$LINENO"; then :
11830 ac_cv_lib_rt_clock_getres=yes
11831else
11832 ac_cv_lib_rt_clock_getres=no
11833fi
11834rm -f core conftest.err conftest.$ac_objext \
11835 conftest$ac_exeext conftest.$ac_ext
11836LIBS=$ac_check_lib_save_LIBS
11837fi
11838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11839$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11840if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11841
11842 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11843
11844
11845fi
11846
11847
11848fi
11849done
11850
11851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11853$as_echo_n "checking for major... " >&6; }
11854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011855/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011856
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011857#if defined(MAJOR_IN_MKDEV)
11858#include <sys/mkdev.h>
11859#elif defined(MAJOR_IN_SYSMACROS)
11860#include <sys/sysmacros.h>
11861#else
11862#include <sys/types.h>
11863#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011864
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011865int
11866main ()
11867{
11868
11869 makedev(major(0),minor(0));
11870
11871 ;
11872 return 0;
11873}
11874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011875if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011876
11877
Matthias Kloseb9621712010-04-24 17:59:49 +000011878$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011879
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11881$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011882
11883else
Skip Montanaro6dead952003-09-25 14:50:04 +000011884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11886$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011887
11888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011889rm -f core conftest.err conftest.$ac_objext \
11890 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011891
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011892# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011893# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11895$as_echo_n "checking for getaddrinfo... " >&6; }
11896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011897/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011898
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011899#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011900#include <sys/socket.h>
11901#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011902#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011903
Martin v. Löwis11437992002-04-12 09:54:03 +000011904int
11905main ()
11906{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011907getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011908 ;
11909 return 0;
11910}
11911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011912if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011913 have_getaddrinfo=yes
11914else
Matthias Kloseb9621712010-04-24 17:59:49 +000011915 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011917rm -f core conftest.err conftest.$ac_objext \
11918 conftest$ac_exeext conftest.$ac_ext
11919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11920$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011921if test $have_getaddrinfo = yes
11922then
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11924$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011925 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011927else
Matthias Kloseb9621712010-04-24 17:59:49 +000011928 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011929
11930if test "${enable_ipv6+set}" = set; then
11931 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11932else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011933 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011934fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011935else
Matthias Kloseb9621712010-04-24 17:59:49 +000011936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011937/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011938
Stefan Krah19c21392012-11-22 23:47:32 +010011939#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011940#include <sys/types.h>
11941#include <netdb.h>
11942#include <string.h>
11943#include <sys/socket.h>
11944#include <netinet/in.h>
11945
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011946int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011947{
11948 int passive, gaierr, inet4 = 0, inet6 = 0;
11949 struct addrinfo hints, *ai, *aitop;
11950 char straddr[INET6_ADDRSTRLEN], strport[16];
11951
11952 for (passive = 0; passive <= 1; passive++) {
11953 memset(&hints, 0, sizeof(hints));
11954 hints.ai_family = AF_UNSPEC;
11955 hints.ai_flags = passive ? AI_PASSIVE : 0;
11956 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011957 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011958 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11959 (void)gai_strerror(gaierr);
11960 goto bad;
11961 }
11962 for (ai = aitop; ai; ai = ai->ai_next) {
11963 if (ai->ai_addr == NULL ||
11964 ai->ai_addrlen == 0 ||
11965 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11966 straddr, sizeof(straddr), strport, sizeof(strport),
11967 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11968 goto bad;
11969 }
11970 switch (ai->ai_family) {
11971 case AF_INET:
11972 if (strcmp(strport, "54321") != 0) {
11973 goto bad;
11974 }
11975 if (passive) {
11976 if (strcmp(straddr, "0.0.0.0") != 0) {
11977 goto bad;
11978 }
11979 } else {
11980 if (strcmp(straddr, "127.0.0.1") != 0) {
11981 goto bad;
11982 }
11983 }
11984 inet4++;
11985 break;
11986 case AF_INET6:
11987 if (strcmp(strport, "54321") != 0) {
11988 goto bad;
11989 }
11990 if (passive) {
11991 if (strcmp(straddr, "::") != 0) {
11992 goto bad;
11993 }
11994 } else {
11995 if (strcmp(straddr, "::1") != 0) {
11996 goto bad;
11997 }
11998 }
11999 inet6++;
12000 break;
12001 case AF_UNSPEC:
12002 goto bad;
12003 break;
12004 default:
12005 /* another family support? */
12006 break;
12007 }
12008 }
12009 }
12010
12011 if (!(inet4 == 0 || inet4 == 2))
12012 goto bad;
12013 if (!(inet6 == 0 || inet6 == 2))
12014 goto bad;
12015
12016 if (aitop)
12017 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012018 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012019
12020 bad:
12021 if (aitop)
12022 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012023 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012024}
12025
Martin v. Löwis11437992002-04-12 09:54:03 +000012026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012027if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012028 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012029else
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12033 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012035
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012036fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012037
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12041$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12042
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012043if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012044then
12045 if test $ipv6 = yes
12046 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012047 echo 'Fatal: You must get working getaddrinfo() function.'
12048 echo ' or you can specify "--disable-ipv6"'.
12049 exit 1
12050 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012051else
Martin v. Löwis11437992002-04-12 09:54:03 +000012052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012054
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012055fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012056
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012057for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012058do :
12059 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012061 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012062#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012063_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012064
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012065fi
12066done
12067
Michael W. Hudson54241132001-12-07 15:38:26 +000012068
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012069# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12071$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012072if ${ac_cv_header_time+:} 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 <sys/time.h>
12079#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012080
Martin v. Löwis11437992002-04-12 09:54:03 +000012081int
12082main ()
12083{
12084if ((struct tm *) 0)
12085return 0;
12086 ;
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_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012092else
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +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_header_time" >&5
12098$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012099if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012100
Matthias Kloseb9621712010-04-24 17:59:49 +000012101$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012102
12103fi
12104
Matthias Kloseb9621712010-04-24 17:59:49 +000012105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12106$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012107if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012109else
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012111/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012112#include <sys/types.h>
12113#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012114
Martin v. Löwis11437992002-04-12 09:54:03 +000012115int
12116main ()
12117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118struct tm tm;
12119 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012121 ;
12122 return 0;
12123}
12124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012125if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012126 ac_cv_struct_tm=time.h
12127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12133$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012134if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012135
Matthias Kloseb9621712010-04-24 17:59:49 +000012136$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012137
12138fi
12139
Matthias Kloseb9621712010-04-24 17:59:49 +000012140ac_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 +000012141#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012142
Matthias Kloseb9621712010-04-24 17:59:49 +000012143"
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012145
12146cat >>confdefs.h <<_ACEOF
12147#define HAVE_STRUCT_TM_TM_ZONE 1
12148_ACEOF
12149
12150
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012151fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012152
Martin v. Löwis11437992002-04-12 09:54:03 +000012153if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12154
Matthias Kloseb9621712010-04-24 17:59:49 +000012155$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156
12157else
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12159"
Victor Stinnere0be4232011-10-25 13:06:09 +020012160if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162else
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012164fi
12165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012167#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168_ACEOF
12169
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12171$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012172if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012174else
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012176/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012177#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012178#if !HAVE_DECL_TZNAME
12179extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012181
Martin v. Löwis11437992002-04-12 09:54:03 +000012182int
12183main ()
12184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012185return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 ;
12187 return 0;
12188}
12189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012190if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012191 ac_cv_var_tzname=yes
12192else
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012195rm -f core conftest.err conftest.$ac_objext \
12196 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12199$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012200 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012201
Matthias Kloseb9621712010-04-24 17:59:49 +000012202$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012203
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012204 fi
12205fi
12206
Matthias Kloseb9621712010-04-24 17:59:49 +000012207ac_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 +020012208if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012209
12210cat >>confdefs.h <<_ACEOF
12211#define HAVE_STRUCT_STAT_ST_RDEV 1
12212_ACEOF
12213
12214
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012215fi
12216
Matthias Kloseb9621712010-04-24 17:59:49 +000012217ac_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 +020012218if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012219
Martin v. Löwis11437992002-04-12 09:54:03 +000012220cat >>confdefs.h <<_ACEOF
12221#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12222_ACEOF
12223
12224
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012225fi
12226
Matthias Kloseb9621712010-04-24 17:59:49 +000012227ac_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 +020012228if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012229
12230cat >>confdefs.h <<_ACEOF
12231#define HAVE_STRUCT_STAT_ST_FLAGS 1
12232_ACEOF
12233
12234
12235fi
12236
Matthias Kloseb9621712010-04-24 17:59:49 +000012237ac_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 +020012238if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012239
12240cat >>confdefs.h <<_ACEOF
12241#define HAVE_STRUCT_STAT_ST_GEN 1
12242_ACEOF
12243
12244
12245fi
12246
Matthias Kloseb9621712010-04-24 17:59:49 +000012247ac_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 +020012248if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012249
12250cat >>confdefs.h <<_ACEOF
12251#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12252_ACEOF
12253
12254
12255fi
12256
Matthias Kloseb9621712010-04-24 17:59:49 +000012257ac_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 +020012258if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012259
Martin v. Löwis11437992002-04-12 09:54:03 +000012260cat >>confdefs.h <<_ACEOF
12261#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12262_ACEOF
12263
12264
Matthias Kloseb9621712010-04-24 17:59:49 +000012265$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012266
12267else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012269 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12271 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012272esac
12273
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012274fi
12275
Michael W. Hudson54241132001-12-07 15:38:26 +000012276
Martin v. Löwis11437992002-04-12 09:54:03 +000012277
Matthias Kloseb9621712010-04-24 17:59:49 +000012278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12279$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012280if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012282else
Matthias Kloseb159a552010-04-25 21:00:44 +000012283
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012285/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012286#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012287int
12288main ()
12289{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012290return altzone;
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 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012296 ac_cv_header_time_altzone=yes
12297else
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302fi
12303
Matthias Kloseb9621712010-04-24 17:59:49 +000012304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12305$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012306if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
Matthias Kloseb9621712010-04-24 17:59:49 +000012308$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012309
12310fi
12311
Guido van Rossumda88dad1995-01-26 00:46:29 +000012312was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12314$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012316/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012317
12318#include <sys/types.h>
12319#include <sys/select.h>
12320#include <sys/time.h>
12321
Martin v. Löwis11437992002-04-12 09:54:03 +000012322int
12323main ()
12324{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012325;
Martin v. Löwis11437992002-04-12 09:54:03 +000012326 ;
12327 return 0;
12328}
12329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012331
12332
Matthias Kloseb9621712010-04-24 17:59:49 +000012333$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012334
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012335 was_it_defined=yes
12336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12340$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012341
Matthias Kloseb9621712010-04-24 17:59:49 +000012342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12343$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012344if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012346else
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012348/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012349#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012350int
12351main ()
12352{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012353struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 ;
12355 return 0;
12356}
12357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012359 ac_cv_struct_addrinfo=yes
12360else
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12364fi
12365
Matthias Kloseb9621712010-04-24 17:59:49 +000012366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12367$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012368if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012371
12372fi
12373
Matthias Kloseb9621712010-04-24 17:59:49 +000012374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12375$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012376if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012378else
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012380/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012381
12382# include <sys/types.h>
12383# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012384int
12385main ()
12386{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012387struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012388 ;
12389 return 0;
12390}
12391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012392if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012393 ac_cv_struct_sockaddr_storage=yes
12394else
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12398fi
12399
Matthias Kloseb9621712010-04-24 17:59:49 +000012400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12401$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012402if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012403
Matthias Kloseb9621712010-04-24 17:59:49 +000012404$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012405
12406fi
12407
Guido van Rossum627b2d71993-12-24 10:39:16 +000012408# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012409
Matthias Kloseb9621712010-04-24 17:59:49 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12411$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012412if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012414else
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012417$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012418int
12419main ()
12420{
12421static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012422test_array [0] = 0;
12423return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012424
12425 ;
12426 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012427}
Martin v. Löwis11437992002-04-12 09:54:03 +000012428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012429if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012430 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012431else
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12437$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012438if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012440
12441fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012442
Matthias Kloseb9621712010-04-24 17:59:49 +000012443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12444$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012445if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012447else
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012449/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012450
Martin v. Löwis11437992002-04-12 09:54:03 +000012451int
12452main ()
12453{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012454
Martin v. Löwis11437992002-04-12 09:54:03 +000012455#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012456 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012457 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012458 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012459 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012460 char const *const *pcpcc;
12461 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012462 /* NEC SVR4.0.2 mips cc rejects this. */
12463 struct point {int x, y;};
12464 static struct point const zero = {0,0};
12465 /* AIX XL C 1.02.0.0 rejects this.
12466 It does not let you subtract one const X* pointer from another in
12467 an arm of an if-expression whose if-part is not a constant
12468 expression */
12469 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012471 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472 ++pcpcc;
12473 ppc = (char**) pcpcc;
12474 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012475 { /* SCO 3.2v4 cc rejects this sort of thing. */
12476 char tx;
12477 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012478 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012479
Martin v. Löwis11437992002-04-12 09:54:03 +000012480 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012481 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 }
12483 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12484 int x[] = {25, 17};
12485 const int *foo = &x[0];
12486 ++foo;
12487 }
12488 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12489 typedef const int *iptr;
12490 iptr p = 0;
12491 ++p;
12492 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012493 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012494 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012495 struct s { int j; const int *ap[3]; } bx;
12496 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012497 }
12498 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12499 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012501 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012502 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012503#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012504
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 ;
12506 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012507}
Martin v. Löwis11437992002-04-12 09:54:03 +000012508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012509if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012510 ac_cv_c_const=yes
12511else
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12517$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012518if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Matthias Kloseb9621712010-04-24 17:59:49 +000012520$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012521
12522fi
12523
Michael W. Hudson54241132001-12-07 15:38:26 +000012524
Guido van Rossumda88dad1995-01-26 00:46:29 +000012525works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12527$as_echo_n "checking for working volatile... " >&6; }
12528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012529/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012530
Martin v. Löwis11437992002-04-12 09:54:03 +000012531int
12532main ()
12533{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012534volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012535 ;
12536 return 0;
12537}
12538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012539if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012540 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012541else
Skip Montanaro6dead952003-09-25 14:50:04 +000012542
Matthias Kloseb9621712010-04-24 17:59:49 +000012543$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012544
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012545
Guido van Rossum627b2d71993-12-24 10:39:16 +000012546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12549$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012550
Guido van Rossumda88dad1995-01-26 00:46:29 +000012551works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12553$as_echo_n "checking for working signed char... " >&6; }
12554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012555/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012556
Martin v. Löwis11437992002-04-12 09:54:03 +000012557int
12558main ()
12559{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012560signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012561 ;
12562 return 0;
12563}
12564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012565if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012566 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012567else
Skip Montanaro6dead952003-09-25 14:50:04 +000012568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012570
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012571
Guido van Rossum7f43da71994-08-01 12:15:30 +000012572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12575$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012576
Guido van Rossumda88dad1995-01-26 00:46:29 +000012577have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12579$as_echo_n "checking for prototypes... " >&6; }
12580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012581/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012582int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012583int
12584main ()
12585{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012586return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012587 ;
12588 return 0;
12589}
12590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012592
Matthias Kloseb9621712010-04-24 17:59:49 +000012593$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012594
Matthias Kloseb159a552010-04-25 21:00:44 +000012595 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12599$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012600
Guido van Rossumda88dad1995-01-26 00:46:29 +000012601works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12603$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012605/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012606
12607#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012608int foo(int x, ...) {
12609 va_list va;
12610 va_start(va, x);
12611 va_arg(va, int);
12612 va_arg(va, char *);
12613 va_arg(va, double);
12614 return 0;
12615}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012616
Martin v. Löwis11437992002-04-12 09:54:03 +000012617int
12618main ()
12619{
Guido van Rossum90eea071996-08-30 20:58:57 +000012620return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 ;
12622 return 0;
12623}
12624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012626
12627
Matthias Kloseb9621712010-04-24 17:59:49 +000012628$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012629
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012630 works=yes
12631
Guido van Rossum627b2d71993-12-24 10:39:16 +000012632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12635$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012636
Martin v. Löwisd6320502004-08-12 13:45:08 +000012637# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12639$as_echo_n "checking for socketpair... " >&6; }
12640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012641/* end confdefs.h. */
12642
12643#include <sys/types.h>
12644#include <sys/socket.h>
12645
12646int
12647main ()
12648{
12649void *x=socketpair
12650 ;
12651 return 0;
12652}
12653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012654if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012655
Matthias Kloseb9621712010-04-24 17:59:49 +000012656$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012657
Matthias Kloseb159a552010-04-25 21:00:44 +000012658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012659$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012660else
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12662$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012663
12664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012666
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012667# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12669$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012671/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012672#include <sys/types.h>
12673#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012674int
12675main ()
12676{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012677struct sockaddr x;
12678x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 ;
12680 return 0;
12681}
12682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012683if ac_fn_c_try_compile "$LINENO"; then :
12684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12685$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012688
12689else
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12691$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012692
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012695
Guido van Rossumda88dad1995-01-26 00:46:29 +000012696va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12698$as_echo_n "checking whether va_list is an array... " >&6; }
12699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012700/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012701
12702#ifdef HAVE_STDARG_PROTOTYPES
12703#include <stdarg.h>
12704#else
12705#include <varargs.h>
12706#endif
12707
Martin v. Löwis11437992002-04-12 09:54:03 +000012708int
12709main ()
12710{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012711va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 ;
12713 return 0;
12714}
12715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012716if ac_fn_c_try_compile "$LINENO"; then :
12717
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718else
Skip Montanaro6dead952003-09-25 14:50:04 +000012719
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
Matthias Kloseb9621712010-04-24 17:59:49 +000012721$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012722
Guido van Rossumda88dad1995-01-26 00:46:29 +000012723 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012724
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12728$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012730# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012731
12732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012734if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012735
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12739$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012740 OLD_CFLAGS=$CFLAGS
12741 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012743/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012744
12745# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012746
Martin v. Löwis11437992002-04-12 09:54:03 +000012747int
12748main ()
12749{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012750
12751 char *name;
12752 struct hostent *he, *res;
12753 char buffer[2048];
12754 int buflen = 2048;
12755 int h_errnop;
12756
12757 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
12759 ;
12760 return 0;
12761}
12762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012763if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012766
Martin v. Löwis11437992002-04-12 09:54:03 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12771$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012772
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012773else
Skip Montanaro6dead952003-09-25 14:50:04 +000012774
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12776$as_echo "no" >&6; }
12777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12778$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012780/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012781
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012782# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012783
Martin v. Löwis11437992002-04-12 09:54:03 +000012784int
12785main ()
12786{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012787
12788 char *name;
12789 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012790 char buffer[2048];
12791 int buflen = 2048;
12792 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012793
Matthias Kloseb159a552010-04-25 21:00:44 +000012794 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
12796 ;
12797 return 0;
12798}
12799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012800if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012801
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012803
Martin v. Löwis11437992002-04-12 09:54:03 +000012804
Matthias Kloseb159a552010-04-25 21:00:44 +000012805$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012806
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12808$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012809
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012810else
Skip Montanaro6dead952003-09-25 14:50:04 +000012811
Matthias Kloseb9621712010-04-24 17:59:49 +000012812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12813$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12815$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12817/* end confdefs.h. */
12818
12819# include <netdb.h>
12820
12821int
12822main ()
12823{
12824
12825 char *name;
12826 struct hostent *he;
12827 struct hostent_data data;
12828
12829 (void) gethostbyname_r(name, he, &data);
12830
12831 ;
12832 return 0;
12833}
12834_ACEOF
12835if ac_fn_c_try_compile "$LINENO"; then :
12836
12837 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12838
12839
12840$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12841
12842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12843$as_echo "yes" >&6; }
12844
12845else
12846
12847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12848$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012849
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012852
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012855
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012858 CFLAGS=$OLD_CFLAGS
12859
12860else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862 for ac_func in gethostbyname
12863do :
12864 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012865if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012866 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012867#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012868_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012869
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012870fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012871done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012872
Michael W. Hudson54241132001-12-07 15:38:26 +000012873
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012874fi
12875
Michael W. Hudson54241132001-12-07 15:38:26 +000012876
12877
12878
12879
12880
12881
Guido van Rossum627b2d71993-12-24 10:39:16 +000012882# checks for system services
12883# (none yet)
12884
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012885# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012886ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012887if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012888
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012889else
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12891$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012892if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012893 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894else
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012896LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900/* Override any GCC internal prototype to avoid an error.
12901 Use char because int might match the return type of a GCC
12902 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012903#ifdef __cplusplus
12904extern "C"
12905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012906char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012907int
12908main ()
12909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 ;
12912 return 0;
12913}
12914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012915if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012917else
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012920rm -f core conftest.err conftest.$ac_objext \
12921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012922LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12925$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012926if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 cat >>confdefs.h <<_ACEOF
12928#define HAVE_LIBIEEE 1
12929_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012930
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012931 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012932
Guido van Rossum627b2d71993-12-24 10:39:16 +000012933fi
12934
Michael W. Hudson54241132001-12-07 15:38:26 +000012935
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012936fi
12937
Michael W. Hudson54241132001-12-07 15:38:26 +000012938
Guido van Rossum7f253911997-05-09 02:42:48 +000012939# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12941$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012944if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012946if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012947then
12948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012950
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12952$as_echo "yes" >&6; }
12953else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12954$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012955fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012956else
Matthias Kloseb9621712010-04-24 17:59:49 +000012957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12958$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959fi
12960
Guido van Rossum7f253911997-05-09 02:42:48 +000012961
Guido van Rossum7f43da71994-08-01 12:15:30 +000012962# check for --with-libm=...
12963
Guido van Rossum563e7081996-09-10 18:20:48 +000012964case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012965Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012966*) LIBM=-lm
12967esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12969$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012972if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012973 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012974if test "$withval" = no
12975then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12977$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012978elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012979then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12981$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012982else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012983fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012984else
Matthias Kloseb9621712010-04-24 17:59:49 +000012985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12986$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012987fi
12988
Guido van Rossum7f43da71994-08-01 12:15:30 +000012989
12990# check for --with-libc=...
12991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12993$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012996if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012998if test "$withval" = no
12999then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13001$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013002elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013003then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13005$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013006else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013007fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013008else
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13010$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013011fi
13012
Guido van Rossum7f43da71994-08-01 12:15:30 +000013013
Stefan Krah1919b7e2012-03-21 18:25:23 +010013014# **************************************
13015# * Check for gcc x64 inline assembler *
13016# **************************************
13017
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13019$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13021/* end confdefs.h. */
13022
13023int
13024main ()
13025{
13026
13027 __asm__ __volatile__ ("movq %rcx, %rax");
13028
13029 ;
13030 return 0;
13031}
13032_ACEOF
13033if ac_fn_c_try_compile "$LINENO"; then :
13034 have_gcc_asm_for_x64=yes
13035else
13036 have_gcc_asm_for_x64=no
13037fi
13038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13040$as_echo "$have_gcc_asm_for_x64" >&6; }
13041if test "$have_gcc_asm_for_x64" = yes
13042then
13043
13044$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13045
13046fi
13047
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013048# **************************************************
13049# * Check for various properties of floating point *
13050# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13053$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013054if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013056else
13057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013059 ac_cv_little_endian_double=no
13060else
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013062/* end confdefs.h. */
13063
13064#include <string.h>
13065int main() {
13066 double x = 9006104071832581.0;
13067 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13068 return 0;
13069 else
13070 return 1;
13071}
13072
13073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013074if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013075 ac_cv_little_endian_double=yes
13076else
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13080 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013081fi
13082
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013083fi
13084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13086$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013087if test "$ac_cv_little_endian_double" = yes
13088then
13089
Matthias Kloseb9621712010-04-24 17:59:49 +000013090$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013091
13092fi
13093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13095$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013096if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013098else
13099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013101 ac_cv_big_endian_double=no
13102else
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013104/* end confdefs.h. */
13105
13106#include <string.h>
13107int main() {
13108 double x = 9006104071832581.0;
13109 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13110 return 0;
13111 else
13112 return 1;
13113}
13114
13115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013116if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013117 ac_cv_big_endian_double=yes
13118else
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013123fi
13124
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013125fi
13126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13128$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013129if test "$ac_cv_big_endian_double" = yes
13130then
13131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013133
13134fi
13135
13136# Some ARM platforms use a mixed-endian representation for doubles.
13137# While Python doesn't currently have full support for these platforms
13138# (see e.g., issue 1762561), we can at least make sure that float <-> string
13139# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13141$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013142if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013143 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013144else
13145
Matthias Kloseb9621712010-04-24 17:59:49 +000013146if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013147 ac_cv_mixed_endian_double=no
13148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013150/* end confdefs.h. */
13151
13152#include <string.h>
13153int main() {
13154 double x = 9006104071832581.0;
13155 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13156 return 0;
13157 else
13158 return 1;
13159}
13160
13161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013162if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013163 ac_cv_mixed_endian_double=yes
13164else
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13168 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013169fi
13170
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013171fi
13172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13174$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013175if test "$ac_cv_mixed_endian_double" = yes
13176then
13177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013179
13180fi
13181
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013182# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013183# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013184# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013185# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013186# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013187# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013188
13189# This inline assembler syntax may also work for suncc and icc,
13190# so we try it on all platforms.
13191
Matthias Kloseb9621712010-04-24 17:59:49 +000013192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13193$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013195/* end confdefs.h. */
13196
13197int
13198main ()
13199{
13200
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013201 unsigned short cw;
13202 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13203 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013204
13205 ;
13206 return 0;
13207}
13208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013209if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013210 have_gcc_asm_for_x87=yes
13211else
Matthias Kloseb9621712010-04-24 17:59:49 +000013212 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013213fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13216$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013217if test "$have_gcc_asm_for_x87" = yes
13218then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013221
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013223
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13225$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13227/* end confdefs.h. */
13228
13229int
13230main ()
13231{
13232
13233 unsigned int fpcr;
13234 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13235 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13236
13237 ;
13238 return 0;
13239}
13240_ACEOF
13241if ac_fn_c_try_compile "$LINENO"; then :
13242 have_gcc_asm_for_mc68881=yes
13243else
13244 have_gcc_asm_for_mc68881=no
13245fi
13246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13248$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13249if test "$have_gcc_asm_for_mc68881" = yes
13250then
13251
13252$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13253
13254fi
13255
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013256# Detect whether system arithmetic is subject to x87-style double
13257# rounding issues. The result of this test has little meaning on non
13258# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13259# mode is round-to-nearest and double rounding issues are present, and
13260# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13262$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013263# $BASECFLAGS may affect the result
13264ac_save_cc="$CC"
13265CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013266if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013267 ac_cv_x87_double_rounding=no
13268else
Matthias Kloseb9621712010-04-24 17:59:49 +000013269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013270/* end confdefs.h. */
13271
13272#include <stdlib.h>
13273#include <math.h>
13274int main() {
13275 volatile double x, y, z;
13276 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13277 x = 0.99999999999999989; /* 1-2**-53 */
13278 y = 1./x;
13279 if (y != 1.)
13280 exit(0);
13281 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13282 x = 1e16;
13283 y = 2.99999;
13284 z = x + y;
13285 if (z != 1e16+4.)
13286 exit(0);
13287 /* both tests show evidence of double rounding */
13288 exit(1);
13289}
13290
13291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013292if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013293 ac_cv_x87_double_rounding=no
13294else
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13298 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013299fi
13300
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013301CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13303$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013304if test "$ac_cv_x87_double_rounding" = yes
13305then
13306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013308
13309fi
13310
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013311# ************************************
13312# * Check for mathematical functions *
13313# ************************************
13314
13315LIBS_SAVE=$LIBS
13316LIBS="$LIBS $LIBM"
13317
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013318for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13319do :
13320 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13321ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013322if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013323 cat >>confdefs.h <<_ACEOF
13324#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13325_ACEOF
13326
13327fi
13328done
13329
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013330for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013331do :
13332 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13333ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013334if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013335 cat >>confdefs.h <<_ACEOF
13336#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13337_ACEOF
13338
13339fi
13340done
13341
13342ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13343"
Victor Stinnere0be4232011-10-25 13:06:09 +020013344if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013345 ac_have_decl=1
13346else
13347 ac_have_decl=0
13348fi
13349
13350cat >>confdefs.h <<_ACEOF
13351#define HAVE_DECL_ISINF $ac_have_decl
13352_ACEOF
13353ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13354"
Victor Stinnere0be4232011-10-25 13:06:09 +020013355if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013356 ac_have_decl=1
13357else
13358 ac_have_decl=0
13359fi
13360
13361cat >>confdefs.h <<_ACEOF
13362#define HAVE_DECL_ISNAN $ac_have_decl
13363_ACEOF
13364ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13365"
Victor Stinnere0be4232011-10-25 13:06:09 +020013366if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013367 ac_have_decl=1
13368else
13369 ac_have_decl=0
13370fi
13371
13372cat >>confdefs.h <<_ACEOF
13373#define HAVE_DECL_ISFINITE $ac_have_decl
13374_ACEOF
13375
13376
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013377# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13378# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13380$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013381if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013383else
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013386 ac_cv_tanh_preserves_zero_sign=no
13387else
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013389/* end confdefs.h. */
13390
13391#include <math.h>
13392#include <stdlib.h>
13393int main() {
13394 /* return 0 if either negative zeros don't exist
13395 on this platform or if negative zeros exist
13396 and tanh(-0.) == -0. */
13397 if (atan2(0., -1.) == atan2(-0., -1.) ||
13398 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13399 else exit(1);
13400}
13401
13402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013403if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013404 ac_cv_tanh_preserves_zero_sign=yes
13405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13409 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013410fi
13411
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013412fi
13413
Matthias Kloseb9621712010-04-24 17:59:49 +000013414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13415$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013416if test "$ac_cv_tanh_preserves_zero_sign" = yes
13417then
13418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013420
13421fi
13422
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013423if test "$ac_cv_func_log1p" = yes
13424then
13425 # On some versions of AIX, log1p(-0.) returns 0. instead of
13426 # -0. See issue #9920.
13427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13428$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013429 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013430 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013431else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013432
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013433 if test "$cross_compiling" = yes; then :
13434 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013435else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13437/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013438
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013439 #include <math.h>
13440 #include <stdlib.h>
13441 int main() {
13442 /* Fail if the signs of log1p(-0.) and -0. can be
13443 distinguished. */
13444 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13445 return 0;
13446 else
13447 return 1;
13448 }
13449
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013450_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013451if ac_fn_c_try_run "$LINENO"; then :
13452 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013453else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013454 ac_cv_log1p_drops_zero_sign=yes
13455fi
13456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13457 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013458fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013459
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013460fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013461
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13463$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13464fi
13465if test "$ac_cv_log1p_drops_zero_sign" = yes
13466then
13467
13468$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13469
13470fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013471
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013472LIBS=$LIBS_SAVE
13473
Mark Dickinsona614f042009-11-28 12:48:43 +000013474# For multiprocessing module, check that sem_open
13475# actually works. For FreeBSD versions <= 7.2,
13476# the kernel module that provides POSIX semaphores
13477# isn't loaded by default, so an attempt to call
13478# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13480$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013481if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013482 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013483else
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013485 ac_cv_posix_semaphores_enabled=yes
13486else
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013488/* end confdefs.h. */
13489
13490#include <unistd.h>
13491#include <fcntl.h>
13492#include <stdio.h>
13493#include <semaphore.h>
13494#include <sys/stat.h>
13495
13496int main(void) {
13497 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13498 if (a == SEM_FAILED) {
13499 perror("sem_open");
13500 return 1;
13501 }
13502 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013503 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013504 return 0;
13505}
13506
13507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013508if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013509 ac_cv_posix_semaphores_enabled=yes
13510else
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13514 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013515fi
13516
13517
Mark Dickinsona614f042009-11-28 12:48:43 +000013518fi
13519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13521$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013522if test $ac_cv_posix_semaphores_enabled = no
13523then
13524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013526
13527fi
13528
Mark Dickinson10683072009-04-18 21:18:19 +000013529# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13531$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013532if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013534else
Matthias Kloseb9621712010-04-24 17:59:49 +000013535 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013536 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013537else
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013539/* end confdefs.h. */
13540
13541#include <unistd.h>
13542#include <fcntl.h>
13543#include <stdio.h>
13544#include <semaphore.h>
13545#include <sys/stat.h>
13546
13547int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013548 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013549 int count;
13550 int res;
13551 if(a==SEM_FAILED){
13552 perror("sem_open");
13553 return 1;
13554
13555 }
13556 res = sem_getvalue(a, &count);
13557 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013558 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013559 return res==-1 ? 1 : 0;
13560}
13561
Mark Dickinson10683072009-04-18 21:18:19 +000013562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013563if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013564 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013565else
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13569 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013570fi
13571
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013572
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013573fi
13574
Matthias Kloseb9621712010-04-24 17:59:49 +000013575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13576$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013577if test $ac_cv_broken_sem_getvalue = yes
13578then
13579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013581
13582fi
13583
Mark Dickinsonbd792642009-03-18 20:06:12 +000013584# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13586$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013587# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013588if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013589 enableval=$enable_big_digits; case $enable_big_digits in
13590yes)
13591 enable_big_digits=30 ;;
13592no)
13593 enable_big_digits=15 ;;
1359415|30)
13595 ;;
13596*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013597 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 +000013598esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13600$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013601
13602cat >>confdefs.h <<_ACEOF
13603#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13604_ACEOF
13605
13606
13607else
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13609$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013610fi
13611
13612
Guido van Rossumef2255b2000-03-10 22:30:29 +000013613# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013614ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013615if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013616
13617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013619
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013620 wchar_h="yes"
13621
Guido van Rossumef2255b2000-03-10 22:30:29 +000013622else
Martin v. Löwis11437992002-04-12 09:54:03 +000013623 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013624
13625fi
13626
Michael W. Hudson54241132001-12-07 15:38:26 +000013627
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013629# determine wchar_t size
13630if test "$wchar_h" = yes
13631then
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013633# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13634# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13635# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13637$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013638if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013640else
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13642"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013643
Martin v. Löwis11437992002-04-12 09:54:03 +000013644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 if test "$ac_cv_type_wchar_t" = yes; then
13646 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013648as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013649See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013650 else
13651 ac_cv_sizeof_wchar_t=0
13652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013654
Martin v. Löwis11437992002-04-12 09:54:03 +000013655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13657$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013658
13659
13660
Martin v. Löwis11437992002-04-12 09:54:03 +000013661cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013662#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013663_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013664
Michael W. Hudson54241132001-12-07 15:38:26 +000013665
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013666fi
13667
Matthias Kloseb9621712010-04-24 17:59:49 +000013668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13669$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013670have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013672/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013673
13674#include <tcl.h>
13675#if TCL_UTF_MAX != 6
13676# error "NOT UCS4_TCL"
13677#endif
13678int
13679main ()
13680{
13681
13682 ;
13683 return 0;
13684}
13685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013686if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013687
13688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013690
13691 have_ucs4_tcl=yes
13692
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13696$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013697
Skip Montanaro6dead952003-09-25 14:50:04 +000013698# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013699if test "$wchar_h" = yes
13700then
13701 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13703$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013704 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013706else
13707
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013709 ac_cv_wchar_t_signed=yes
13710else
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013712/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013713
13714 #include <wchar.h>
13715 int main()
13716 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013717 /* Success: exit code 0 */
13718 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013719 }
13720
13721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013722if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013723 ac_cv_wchar_t_signed=yes
13724else
Matthias Kloseb9621712010-04-24 17:59:49 +000013725 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013729fi
13730
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013731fi
13732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13734$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013735fi
13736
Georg Brandl52d168a2008-01-07 18:10:24 +000013737# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013738if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013739 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013740then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013741 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013744
Georg Brandl52d168a2008-01-07 18:10:24 +000013745else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013746 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013747fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13749$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013750
13751# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13753$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013754if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013756else
Matthias Kloseb9621712010-04-24 17:59:49 +000013757 ac_cv_c_bigendian=unknown
13758 # See if we're dealing with a universal compiler.
13759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13760/* end confdefs.h. */
13761#ifndef __APPLE_CC__
13762 not a universal capable compiler
13763 #endif
13764 typedef int dummy;
13765
Skip Montanaro6dead952003-09-25 14:50:04 +000013766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013767if ac_fn_c_try_compile "$LINENO"; then :
13768
13769 # Check for potential -arch flags. It is not universal unless
13770 # there are at least two -arch flags with different values.
13771 ac_arch=
13772 ac_prev=
13773 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13774 if test -n "$ac_prev"; then
13775 case $ac_word in
13776 i?86 | x86_64 | ppc | ppc64)
13777 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13778 ac_arch=$ac_word
13779 else
13780 ac_cv_c_bigendian=universal
13781 break
13782 fi
13783 ;;
13784 esac
13785 ac_prev=
13786 elif test "x$ac_word" = "x-arch"; then
13787 ac_prev=arch
13788 fi
13789 done
13790fi
13791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13792 if test $ac_cv_c_bigendian = unknown; then
13793 # See if sys/param.h defines the BYTE_ORDER macro.
13794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013795/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013796#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013798
Martin v. Löwis11437992002-04-12 09:54:03 +000013799int
13800main ()
13801{
Matthias Kloseb9621712010-04-24 17:59:49 +000013802#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13803 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13804 && LITTLE_ENDIAN)
13805 bogus endian macros
13806 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013807
13808 ;
13809 return 0;
13810}
13811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013812if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013813 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013815/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013816#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013817 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013818
Martin v. Löwis11437992002-04-12 09:54:03 +000013819int
13820main ()
13821{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013822#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 not big endian
13824 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013825
13826 ;
13827 return 0;
13828}
13829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013830if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013831 ac_cv_c_bigendian=yes
13832else
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013836fi
13837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13838 fi
13839 if test $ac_cv_c_bigendian = unknown; then
13840 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013842/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013843#include <limits.h>
13844
Martin v. Löwis11437992002-04-12 09:54:03 +000013845int
13846main ()
13847{
Matthias Kloseb9621712010-04-24 17:59:49 +000013848#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13849 bogus endian macros
13850 #endif
13851
Martin v. Löwis11437992002-04-12 09:54:03 +000013852 ;
13853 return 0;
13854}
13855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013856if ac_fn_c_try_compile "$LINENO"; then :
13857 # It does; now see whether it defined to _BIG_ENDIAN or not.
13858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13859/* end confdefs.h. */
13860#include <limits.h>
13861
13862int
13863main ()
13864{
13865#ifndef _BIG_ENDIAN
13866 not big endian
13867 #endif
13868
13869 ;
13870 return 0;
13871}
13872_ACEOF
13873if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013874 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013875else
Matthias Kloseb9621712010-04-24 17:59:49 +000013876 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13879fi
13880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13881 fi
13882 if test $ac_cv_c_bigendian = unknown; then
13883 # Compile a test program.
13884 if test "$cross_compiling" = yes; then :
13885 # Try to guess by grepping values from an object file.
13886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887/* end confdefs.h. */
13888short int ascii_mm[] =
13889 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13890 short int ascii_ii[] =
13891 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13892 int use_ascii (int i) {
13893 return ascii_mm[i] + ascii_ii[i];
13894 }
13895 short int ebcdic_ii[] =
13896 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13897 short int ebcdic_mm[] =
13898 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13899 int use_ebcdic (int i) {
13900 return ebcdic_mm[i] + ebcdic_ii[i];
13901 }
13902 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903
Matthias Kloseb9621712010-04-24 17:59:49 +000013904int
13905main ()
13906{
13907return use_ascii (foo) == use_ebcdic (foo);
13908 ;
13909 return 0;
13910}
13911_ACEOF
13912if ac_fn_c_try_compile "$LINENO"; then :
13913 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13914 ac_cv_c_bigendian=yes
13915 fi
13916 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13917 if test "$ac_cv_c_bigendian" = unknown; then
13918 ac_cv_c_bigendian=no
13919 else
13920 # finding both strings is unlikely to happen, but who knows?
13921 ac_cv_c_bigendian=unknown
13922 fi
13923 fi
13924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013926else
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013928/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013930int
13931main ()
13932{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 /* Are we little or big endian? From Harbison&Steele. */
13935 union
13936 {
13937 long int l;
13938 char c[sizeof (long int)];
13939 } u;
13940 u.l = 1;
13941 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942
13943 ;
13944 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013945}
Martin v. Löwis11437992002-04-12 09:54:03 +000013946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013947if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013948 ac_cv_c_bigendian=no
13949else
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013951fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13959$as_echo "$ac_cv_c_bigendian" >&6; }
13960 case $ac_cv_c_bigendian in #(
13961 yes)
13962 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13963;; #(
13964 no)
13965 ;; #(
13966 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013969
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 ;; #(
13971 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013972 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013973 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013975
Michael W. Hudson54241132001-12-07 15:38:26 +000013976
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013977# ABI version string for Python extension modules. This appears between the
13978# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13979# from the following attributes which affect the ABI of this Python build (in
13980# this order):
13981#
13982# * The Python implementation (always 'cpython-' for us)
13983# * The major and minor version numbers
13984# * --with-pydebug (adds a 'd')
13985# * --with-pymalloc (adds a 'm')
13986# * --with-wide-unicode (adds a 'u')
13987#
13988# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013989# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13990# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013991
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13993$as_echo_n "checking ABIFLAGS... " >&6; }
13994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13995$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13997$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013998SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14000$as_echo "$SOABI" >&6; }
14001
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014002
14003case $ac_sys_system in
14004 Linux*|GNU*)
14005 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14006 *)
14007 EXT_SUFFIX=${SHLIB_SUFFIX};;
14008esac
14009
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14011$as_echo_n "checking LDVERSION... " >&6; }
14012LDVERSION='$(VERSION)$(ABIFLAGS)'
14013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14014$as_echo "$LDVERSION" >&6; }
14015
doko@python.org87421192013-01-26 11:39:31 +010014016
14017LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14018
14019
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014020# Check whether right shifting a negative integer extends the sign bit
14021# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14023$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014024if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014026else
Martin v. Löwis11437992002-04-12 09:54:03 +000014027
Matthias Kloseb9621712010-04-24 17:59:49 +000014028if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014029 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014030else
Matthias Kloseb9621712010-04-24 17:59:49 +000014031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014032/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014033
14034int main()
14035{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014036 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014037}
14038
Martin v. Löwis11437992002-04-12 09:54:03 +000014039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014040if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014041 ac_cv_rshift_extends_sign=yes
14042else
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14046 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014047fi
14048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014049fi
14050
Matthias Kloseb9621712010-04-24 17:59:49 +000014051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14052$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014053if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014054then
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
Matthias Kloseb9621712010-04-24 17:59:49 +000014056$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014057
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014058fi
14059
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014060# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14062$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014063if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014065else
Martin v. Löwis11437992002-04-12 09:54:03 +000014066
Matthias Kloseb9621712010-04-24 17:59:49 +000014067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014068/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014069#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014070int
14071main ()
14072{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014073
14074 FILE *f = fopen("/dev/null", "r");
14075 flockfile(f);
14076 getc_unlocked(f);
14077 funlockfile(f);
14078
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 ;
14080 return 0;
14081}
14082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014083if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014084 ac_cv_have_getc_unlocked=yes
14085else
Matthias Kloseb9621712010-04-24 17:59:49 +000014086 ac_cv_have_getc_unlocked=no
14087fi
14088rm -f core conftest.err conftest.$ac_objext \
14089 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091
Matthias Kloseb9621712010-04-24 17:59:49 +000014092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14093$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014094if test "$ac_cv_have_getc_unlocked" = yes
14095then
Martin v. Löwis11437992002-04-12 09:54:03 +000014096
Matthias Kloseb9621712010-04-24 17:59:49 +000014097$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014098
14099fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014100
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014101# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014102# save the value of LIBS so we don't actually link Python with readline
14103LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014104
Gregory P. Smith18820942008-09-07 06:24:49 +000014105# On some systems we need to link readline to a termcap compatible
14106# library. NOTE: Keep the precedence of listed libraries synchronised
14107# with setup.py.
14108py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14110$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014111for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014112 if test -z "$py_libtermcap"; then
14113 READLINE_LIBS="-lreadline"
14114 else
14115 READLINE_LIBS="-lreadline -l$py_libtermcap"
14116 fi
14117 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014119/* end confdefs.h. */
14120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121/* Override any GCC internal prototype to avoid an error.
14122 Use char because int might match the return type of a GCC
14123 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014124#ifdef __cplusplus
14125extern "C"
14126#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014127char readline ();
14128int
14129main ()
14130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014131return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014132 ;
14133 return 0;
14134}
14135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014136if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014137 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014139rm -f core conftest.err conftest.$ac_objext \
14140 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014141 if test $py_cv_lib_readline = yes; then
14142 break
14143 fi
14144done
14145# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14146#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014147if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14149$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014150else
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14152$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014155
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014156fi
14157
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014158# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14160$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014161if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014163else
14164 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014165LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014167/* end confdefs.h. */
14168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014169/* Override any GCC internal prototype to avoid an error.
14170 Use char because int might match the return type of a GCC
14171 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014172#ifdef __cplusplus
14173extern "C"
14174#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014175char rl_callback_handler_install ();
14176int
14177main ()
14178{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014180 ;
14181 return 0;
14182}
14183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014184if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014185 ac_cv_lib_readline_rl_callback_handler_install=yes
14186else
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014189rm -f core conftest.err conftest.$ac_objext \
14190 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014191LIBS=$ac_check_lib_save_LIBS
14192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14194$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014195if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014196
Matthias Kloseb9621712010-04-24 17:59:49 +000014197$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014198
14199fi
14200
14201
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014202# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014204/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014205#include <readline/readline.h>
14206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014207if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014208 have_readline=yes
14209else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014210 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014211
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014212fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014213rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014214if test $have_readline = yes
14215then
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014217/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014218#include <readline/readline.h>
14219
14220_ACEOF
14221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014222 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014223
Matthias Kloseb9621712010-04-24 17:59:49 +000014224$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014225
14226fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014227rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014228
Matthias Kloseb9621712010-04-24 17:59:49 +000014229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014230/* end confdefs.h. */
14231#include <readline/readline.h>
14232
14233_ACEOF
14234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014238
14239fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014240rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014241
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014242fi
14243
Martin v. Löwis0daad592001-09-30 21:09:59 +000014244# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14246$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014247if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014249else
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014251LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255/* Override any GCC internal prototype to avoid an error.
14256 Use char because int might match the return type of a GCC
14257 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014258#ifdef __cplusplus
14259extern "C"
14260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014261char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014262int
14263main ()
14264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014266 ;
14267 return 0;
14268}
14269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014270if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014271 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014272else
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014275rm -f core conftest.err conftest.$ac_objext \
14276 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014277LIBS=$ac_check_lib_save_LIBS
14278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14280$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014281if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014284
Martin v. Löwis0daad592001-09-30 21:09:59 +000014285fi
14286
Michael W. Hudson54241132001-12-07 15:38:26 +000014287
Thomas Wouters89d996e2007-09-08 17:39:28 +000014288# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14290$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014291if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014293else
14294 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014295LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014297/* end confdefs.h. */
14298
14299/* Override any GCC internal prototype to avoid an error.
14300 Use char because int might match the return type of a GCC
14301 builtin and then its argument prototype would still apply. */
14302#ifdef __cplusplus
14303extern "C"
14304#endif
14305char rl_completion_display_matches_hook ();
14306int
14307main ()
14308{
14309return rl_completion_display_matches_hook ();
14310 ;
14311 return 0;
14312}
14313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014314if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014315 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14316else
Matthias Kloseb9621712010-04-24 17:59:49 +000014317 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014319rm -f core conftest.err conftest.$ac_objext \
14320 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014321LIBS=$ac_check_lib_save_LIBS
14322fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14324$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014325if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014328
14329fi
14330
14331
Martin v. Löwis0daad592001-09-30 21:09:59 +000014332# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14334$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014335if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014336 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014337else
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014339LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343/* Override any GCC internal prototype to avoid an error.
14344 Use char because int might match the return type of a GCC
14345 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014346#ifdef __cplusplus
14347extern "C"
14348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014349char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014350int
14351main ()
14352{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 ;
14355 return 0;
14356}
14357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014358if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014359 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014360else
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014363rm -f core conftest.err conftest.$ac_objext \
14364 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014365LIBS=$ac_check_lib_save_LIBS
14366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14368$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014369if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014370
Matthias Kloseb9621712010-04-24 17:59:49 +000014371$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014372
Guido van Rossum353ae582001-07-10 16:45:32 +000014373fi
14374
Jack Jansendd19cf82001-12-06 22:36:17 +000014375
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014376# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014378/* end confdefs.h. */
14379#include <readline/readline.h>
14380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014381if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014382 have_readline=yes
14383else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014384 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014385
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014386fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014387rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014388if test $have_readline = yes
14389then
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014391/* end confdefs.h. */
14392#include <readline/readline.h>
14393
14394_ACEOF
14395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014397
Matthias Kloseb9621712010-04-24 17:59:49 +000014398$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014399
14400fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014401rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014402
14403fi
14404
Martin v. Löwis82bca632006-02-10 20:49:30 +000014405# End of readline checks: restore LIBS
14406LIBS=$LIBS_no_readline
14407
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14409$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014410if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014412else
Martin v. Löwis11437992002-04-12 09:54:03 +000014413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014415 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014416else
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014418/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014419
14420int main()
14421{
14422 int val1 = nice(1);
14423 if (val1 != -1 && val1 == nice(2))
14424 exit(0);
14425 exit(1);
14426}
14427
Martin v. Löwis11437992002-04-12 09:54:03 +000014428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014429if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014430 ac_cv_broken_nice=yes
14431else
Matthias Kloseb9621712010-04-24 17:59:49 +000014432 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14435 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014436fi
14437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438fi
14439
Matthias Kloseb9621712010-04-24 17:59:49 +000014440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14441$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014442if test "$ac_cv_broken_nice" = yes
14443then
Martin v. Löwis11437992002-04-12 09:54:03 +000014444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014446
14447fi
14448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14450$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014451if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014453else
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014455 ac_cv_broken_poll=no
14456else
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014458/* end confdefs.h. */
14459
14460#include <poll.h>
14461
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014462int main()
14463{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014464 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014465 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014466
14467 close (42);
14468
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014469 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014470 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014471 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014472 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014473 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014474 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014475 return 1;
14476}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014477
14478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014479if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014480 ac_cv_broken_poll=yes
14481else
Matthias Kloseb9621712010-04-24 17:59:49 +000014482 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14485 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014488fi
14489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14491$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014492if test "$ac_cv_broken_poll" = yes
14493then
14494
Matthias Kloseb9621712010-04-24 17:59:49 +000014495$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014496
14497fi
14498
Brett Cannon43802422005-02-10 20:48:03 +000014499# 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 +000014500# (which is not required by ISO C or UNIX spec) and/or if we support
14501# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014502ac_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 +000014503#include <$ac_cv_struct_tm>
14504
Matthias Kloseb9621712010-04-24 17:59:49 +000014505"
Victor Stinnere0be4232011-10-25 13:06:09 +020014506if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014507
14508cat >>confdefs.h <<_ACEOF
14509#define HAVE_STRUCT_TM_TM_ZONE 1
14510_ACEOF
14511
14512
14513fi
14514
14515if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14516
Matthias Kloseb9621712010-04-24 17:59:49 +000014517$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014518
14519else
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14521"
Victor Stinnere0be4232011-10-25 13:06:09 +020014522if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524else
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526fi
14527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014529#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530_ACEOF
14531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14533$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014534if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536else
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014538/* end confdefs.h. */
14539#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540#if !HAVE_DECL_TZNAME
14541extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014542#endif
14543
14544int
14545main ()
14546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014547return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014548 ;
14549 return 0;
14550}
14551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014552if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014553 ac_cv_var_tzname=yes
14554else
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014557rm -f core conftest.err conftest.$ac_objext \
14558 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14561$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014562 if test $ac_cv_var_tzname = yes; then
14563
Matthias Kloseb9621712010-04-24 17:59:49 +000014564$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014565
14566 fi
14567fi
14568
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014569
Martin v. Löwis1d459062005-03-14 21:23:33 +000014570# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14572$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014573if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014575else
14576
Matthias Kloseb9621712010-04-24 17:59:49 +000014577if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014578 ac_cv_working_tzset=no
14579else
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014581/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014582
14583#include <stdlib.h>
14584#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014585#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014586
14587#if HAVE_TZNAME
14588extern char *tzname[];
14589#endif
14590
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014591int main()
14592{
Brett Cannon18367812003-09-19 00:59:16 +000014593 /* Note that we need to ensure that not only does tzset(3)
14594 do 'something' with localtime, but it works as documented
14595 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014596 This includes making sure that tzname is set properly if
14597 tm->tm_zone does not exist since it is the alternative way
14598 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014599
14600 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014601 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014602 */
14603
Martin v. Löwis1d459062005-03-14 21:23:33 +000014604 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014605 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14606
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014607 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014608 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014609 if (localtime(&groundhogday)->tm_hour != 0)
14610 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014611#if HAVE_TZNAME
14612 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14613 if (strcmp(tzname[0], "UTC") ||
14614 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14615 exit(1);
14616#endif
Brett Cannon18367812003-09-19 00:59:16 +000014617
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014618 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014619 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014620 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014621 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014622#if HAVE_TZNAME
14623 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14624 exit(1);
14625#endif
Brett Cannon18367812003-09-19 00:59:16 +000014626
14627 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14628 tzset();
14629 if (localtime(&groundhogday)->tm_hour != 11)
14630 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014631#if HAVE_TZNAME
14632 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14633 exit(1);
14634#endif
14635
14636#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014637 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14638 exit(1);
14639 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14640 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014641#endif
Brett Cannon18367812003-09-19 00:59:16 +000014642
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014643 exit(0);
14644}
14645
14646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014647if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014648 ac_cv_working_tzset=yes
14649else
Matthias Kloseb9621712010-04-24 17:59:49 +000014650 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14653 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014654fi
14655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656fi
14657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14659$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014660if test "$ac_cv_working_tzset" = yes
14661then
14662
Matthias Kloseb9621712010-04-24 17:59:49 +000014663$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014664
14665fi
14666
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014667# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14669$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014670if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014672else
Matthias Kloseb9621712010-04-24 17:59:49 +000014673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014674/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014675#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014676int
14677main ()
14678{
14679
14680struct stat st;
14681st.st_mtim.tv_nsec = 1;
14682
14683 ;
14684 return 0;
14685}
14686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014687if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014688 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014689else
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14693fi
14694
Matthias Kloseb9621712010-04-24 17:59:49 +000014695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14696$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014697if test "$ac_cv_stat_tv_nsec" = yes
14698then
14699
Matthias Kloseb9621712010-04-24 17:59:49 +000014700$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014701
14702fi
14703
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014704# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14706$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014707if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014709else
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014711/* end confdefs.h. */
14712#include <sys/stat.h>
14713int
14714main ()
14715{
14716
14717struct stat st;
14718st.st_mtimespec.tv_nsec = 1;
14719
14720 ;
14721 return 0;
14722}
14723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014725 ac_cv_stat_tv_nsec2=yes
14726else
Matthias Kloseb9621712010-04-24 17:59:49 +000014727 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14730fi
14731
Matthias Kloseb9621712010-04-24 17:59:49 +000014732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14733$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014734if test "$ac_cv_stat_tv_nsec2" = yes
14735then
14736
Matthias Kloseb9621712010-04-24 17:59:49 +000014737$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014738
14739fi
14740
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014741# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014742ac_save_cppflags="$CPPFLAGS"
14743CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014744
14745for ac_header in curses.h ncurses.h
14746do :
14747 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14748ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14749if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14750 cat >>confdefs.h <<_ACEOF
14751#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14752_ACEOF
14753
14754fi
14755
14756done
14757
14758
14759# On Solaris, term.h requires curses.h
14760for ac_header in term.h
14761do :
14762 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14763#ifdef HAVE_CURSES_H
14764#include <curses.h>
14765#endif
14766
14767"
14768if test "x$ac_cv_header_term_h" = xyes; then :
14769 cat >>confdefs.h <<_ACEOF
14770#define HAVE_TERM_H 1
14771_ACEOF
14772
14773fi
14774
14775done
14776
14777
Jack Jansen666b1e72001-10-31 12:11:48 +000014778# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14780$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014781if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014783else
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014785/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014786#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014787int
14788main ()
14789{
Jack Jansen666b1e72001-10-31 12:11:48 +000014790
14791 int rtn;
14792 rtn = mvwdelch(0,0,0);
14793
Martin v. Löwis11437992002-04-12 09:54:03 +000014794 ;
14795 return 0;
14796}
14797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014798if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014799 ac_cv_mvwdelch_is_expression=yes
14800else
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14804fi
14805
Matthias Kloseb9621712010-04-24 17:59:49 +000014806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14807$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014808
14809if test "$ac_cv_mvwdelch_is_expression" = yes
14810then
Martin v. Löwis11437992002-04-12 09:54:03 +000014811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014813
14814fi
14815
Matthias Kloseb9621712010-04-24 17:59:49 +000014816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14817$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014818if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014819 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014820else
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014822/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014823#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014824int
14825main ()
14826{
Jack Jansen666b1e72001-10-31 12:11:48 +000014827
14828 WINDOW *w;
14829 w->_flags = 0;
14830
Martin v. Löwis11437992002-04-12 09:54:03 +000014831 ;
14832 return 0;
14833}
14834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014835if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014836 ac_cv_window_has_flags=yes
14837else
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14841fi
14842
Matthias Kloseb9621712010-04-24 17:59:49 +000014843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14844$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014845
Jack Jansen666b1e72001-10-31 12:11:48 +000014846
14847if test "$ac_cv_window_has_flags" = yes
14848then
Martin v. Löwis11437992002-04-12 09:54:03 +000014849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014851
14852fi
14853
Matthias Kloseb9621712010-04-24 17:59:49 +000014854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14855$as_echo_n "checking for is_term_resized... " >&6; }
14856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014857/* end confdefs.h. */
14858#include <curses.h>
14859int
14860main ()
14861{
14862void *x=is_term_resized
14863 ;
14864 return 0;
14865}
14866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014867if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014868
Matthias Kloseb9621712010-04-24 17:59:49 +000014869$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014870
Matthias Kloseb159a552010-04-25 21:00:44 +000014871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014872$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014873else
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14875$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014876
14877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14879
Matthias Kloseb9621712010-04-24 17:59:49 +000014880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14881$as_echo_n "checking for resize_term... " >&6; }
14882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014883/* end confdefs.h. */
14884#include <curses.h>
14885int
14886main ()
14887{
14888void *x=resize_term
14889 ;
14890 return 0;
14891}
14892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014893if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014894
Matthias Kloseb9621712010-04-24 17:59:49 +000014895$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014896
Matthias Kloseb159a552010-04-25 21:00:44 +000014897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014898$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014899else
Matthias Kloseb9621712010-04-24 17:59:49 +000014900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14901$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014902
14903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14905
Matthias Kloseb9621712010-04-24 17:59:49 +000014906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14907$as_echo_n "checking for resizeterm... " >&6; }
14908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014909/* end confdefs.h. */
14910#include <curses.h>
14911int
14912main ()
14913{
14914void *x=resizeterm
14915 ;
14916 return 0;
14917}
14918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014919if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014920
Matthias Kloseb9621712010-04-24 17:59:49 +000014921$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014922
Matthias Kloseb159a552010-04-25 21:00:44 +000014923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014924$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014925else
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14927$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014928
14929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014931# last curses configure check
14932CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14935$as_echo "$as_me: checking for device files" >&6;}
14936
14937if test "x$cross_compiling" = xyes; then
14938 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14940$as_echo_n "checking for /dev/ptmx... " >&6; }
14941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14942$as_echo "not set" >&6; }
14943 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14944 fi
14945 if test "${ac_cv_file__dev_ptc+set}" != set; then
14946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14947$as_echo_n "checking for /dev/ptc... " >&6; }
14948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14949$as_echo "not set" >&6; }
14950 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14951 fi
14952fi
14953
Matthias Kloseb9621712010-04-24 17:59:49 +000014954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14955$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014956if ${ac_cv_file__dev_ptmx+:} false; then :
14957 $as_echo_n "(cached) " >&6
14958else
14959 test "$cross_compiling" = yes &&
14960 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14961if test -r "/dev/ptmx"; then
14962 ac_cv_file__dev_ptmx=yes
14963else
14964 ac_cv_file__dev_ptmx=no
14965fi
14966fi
14967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14968$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14969if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014970
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014971fi
14972
14973if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014974
Matthias Kloseb9621712010-04-24 17:59:49 +000014975$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014976
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14979$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014980if ${ac_cv_file__dev_ptc+:} false; then :
14981 $as_echo_n "(cached) " >&6
14982else
14983 test "$cross_compiling" = yes &&
14984 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14985if test -r "/dev/ptc"; then
14986 ac_cv_file__dev_ptc=yes
14987else
14988 ac_cv_file__dev_ptc=no
14989fi
14990fi
14991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14992$as_echo "$ac_cv_file__dev_ptc" >&6; }
14993if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014994
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014995fi
14996
14997if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014998
Matthias Kloseb9621712010-04-24 17:59:49 +000014999$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015000
Neal Norwitz865400f2003-03-21 01:42:58 +000015001fi
15002
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015003if test "$have_long_long" = yes
15004then
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15006$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015007 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015009else
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015011 ac_cv_have_long_long_format="cross -- assuming no"
15012 if test x$GCC = xyes; then
15013 save_CFLAGS=$CFLAGS
15014 CFLAGS="$CFLAGS -Werror -Wformat"
15015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15016/* end confdefs.h. */
15017
15018 #include <stdio.h>
15019 #include <stddef.h>
15020
15021int
15022main ()
15023{
15024
15025 char *buffer;
15026 sprintf(buffer, "%lld", (long long)123);
15027 sprintf(buffer, "%lld", (long long)-123);
15028 sprintf(buffer, "%llu", (unsigned long long)123);
15029
15030 ;
15031 return 0;
15032}
15033_ACEOF
15034if ac_fn_c_try_compile "$LINENO"; then :
15035 ac_cv_have_long_long_format=yes
15036
15037fi
15038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15039 CFLAGS=$save_CFLAGS
15040 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015041else
Matthias Kloseb9621712010-04-24 17:59:49 +000015042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015043/* end confdefs.h. */
15044
15045 #include <stdio.h>
15046 #include <stddef.h>
15047 #include <string.h>
15048
15049 #ifdef HAVE_SYS_TYPES_H
15050 #include <sys/types.h>
15051 #endif
15052
15053 int main()
15054 {
15055 char buffer[256];
15056
15057 if (sprintf(buffer, "%lld", (long long)123) < 0)
15058 return 1;
15059 if (strcmp(buffer, "123"))
15060 return 1;
15061
15062 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15063 return 1;
15064 if (strcmp(buffer, "-123"))
15065 return 1;
15066
15067 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15068 return 1;
15069 if (strcmp(buffer, "123"))
15070 return 1;
15071
15072 return 0;
15073 }
15074
15075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015076if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015077 ac_cv_have_long_long_format=yes
15078else
Matthias Kloseb9621712010-04-24 17:59:49 +000015079 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15082 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015083fi
15084
15085
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015086fi
15087
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15089$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015090fi
15091
Mark Dickinson89d7d412009-12-31 20:50:59 +000015092if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015093then
15094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015096
15097fi
15098
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015099if test $ac_sys_system = Darwin
15100then
15101 LIBS="$LIBS -framework CoreFoundation"
15102fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015103
Matthias Kloseb9621712010-04-24 17:59:49 +000015104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15105$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015106if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015107 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015108else
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015110 ac_cv_have_size_t_format="cross -- assuming yes"
15111
Thomas Wouters477c8d52006-05-27 19:21:47 +000015112else
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015114/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015115
Thomas Wouters477c8d52006-05-27 19:21:47 +000015116#include <stdio.h>
15117#include <stddef.h>
15118#include <string.h>
15119
Christian Heimes2c181612007-12-17 20:04:13 +000015120#ifdef HAVE_SYS_TYPES_H
15121#include <sys/types.h>
15122#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015123
15124#ifdef HAVE_SSIZE_T
15125typedef ssize_t Py_ssize_t;
15126#elif SIZEOF_VOID_P == SIZEOF_LONG
15127typedef long Py_ssize_t;
15128#else
15129typedef int Py_ssize_t;
15130#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015131
Christian Heimes2c181612007-12-17 20:04:13 +000015132int main()
15133{
15134 char buffer[256];
15135
Thomas Wouters477c8d52006-05-27 19:21:47 +000015136 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15137 return 1;
15138
Thomas Wouters89f507f2006-12-13 04:49:30 +000015139 if (strcmp(buffer, "123"))
15140 return 1;
15141
15142 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15143 return 1;
15144
15145 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015146 return 1;
15147
15148 return 0;
15149}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015150
Thomas Wouters477c8d52006-05-27 19:21:47 +000015151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015152if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015153 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015154else
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15158 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015159fi
15160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15163$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015164if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015165
Matthias Kloseb9621712010-04-24 17:59:49 +000015166$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015167
15168fi
15169
Matthias Kloseb9621712010-04-24 17:59:49 +000015170ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015171#ifdef HAVE_SYS_TYPES_H
15172#include <sys/types.h>
15173#endif
15174#ifdef HAVE_SYS_SOCKET_H
15175#include <sys/socket.h>
15176#endif
15177
Matthias Kloseb9621712010-04-24 17:59:49 +000015178"
Victor Stinnere0be4232011-10-25 13:06:09 +020015179if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015180
Martin v. Löwis11437992002-04-12 09:54:03 +000015181else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015182
Matthias Kloseb9621712010-04-24 17:59:49 +000015183$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015184
15185fi
15186
Michael W. Hudson54241132001-12-07 15:38:26 +000015187
Matthias Kloseb9621712010-04-24 17:59:49 +000015188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15189$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015190if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015191 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015192else
Matthias Kloseb9621712010-04-24 17:59:49 +000015193 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015194 ac_cv_broken_mbstowcs=no
15195else
Matthias Kloseb9621712010-04-24 17:59:49 +000015196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015197/* end confdefs.h. */
15198
Stefan Krah19c21392012-11-22 23:47:32 +010015199#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015200#include<stdlib.h>
15201int main() {
15202 size_t len = -1;
15203 const char *str = "text";
15204 len = mbstowcs(NULL, str, 0);
15205 return (len != 4);
15206}
15207
15208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015209if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015210 ac_cv_broken_mbstowcs=no
15211else
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015216fi
15217
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015218fi
15219
Matthias Kloseb9621712010-04-24 17:59:49 +000015220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15221$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015222if test "$ac_cv_broken_mbstowcs" = yes
15223then
15224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015226
15227fi
15228
Antoine Pitroub52ec782009-01-25 16:34:23 +000015229# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15231$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015232
15233# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015234if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015235 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015236if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015237then
15238
Matthias Kloseb9621712010-04-24 17:59:49 +000015239$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015240
Matthias Kloseb9621712010-04-24 17:59:49 +000015241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15242$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015243fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015244if test "$withval" = no
15245then
15246
15247$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15248
Matthias Kloseb9621712010-04-24 17:59:49 +000015249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15250$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015251fi
15252
Antoine Pitrou042b1282010-08-13 21:15:58 +000015253else
15254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15255$as_echo "no value specified" >&6; }
15256fi
15257
Antoine Pitroub52ec782009-01-25 16:34:23 +000015258
Matthias Kloseb17289e2012-03-15 19:51:34 +010015259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15260$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15261if ${ac_cv_computed_gotos+:} false; then :
15262 $as_echo_n "(cached) " >&6
15263else
15264 if test "$cross_compiling" = yes; then :
15265 if test "${with_computed_gotos+set}" = set; then
15266 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15267 else
15268 ac_cv_computed_gotos=no
15269 fi
15270else
15271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15272/* end confdefs.h. */
15273
15274int main(int argc, char **argv)
15275{
15276 static void *targets[1] = { &&LABEL1 };
15277 goto LABEL2;
15278LABEL1:
15279 return 0;
15280LABEL2:
15281 goto *targets[0];
15282 return 1;
15283}
15284
15285_ACEOF
15286if ac_fn_c_try_run "$LINENO"; then :
15287 ac_cv_computed_gotos=yes
15288else
15289 ac_cv_computed_gotos=no
15290fi
15291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15292 conftest.$ac_objext conftest.beam conftest.$ac_ext
15293fi
15294
15295fi
15296
15297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15298$as_echo "$ac_cv_computed_gotos" >&6; }
15299case "$ac_cv_computed_gotos" in yes*)
15300
15301$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15302
15303esac
15304
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015305case $ac_sys_system in
15306AIX*)
15307
15308$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15309 ;;
15310esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015311
Michael W. Hudson54241132001-12-07 15:38:26 +000015312
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015313
15314
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015315for h in `(cd $srcdir;echo Python/thread_*.h)`
15316do
15317 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15318done
15319
Michael W. Hudson54241132001-12-07 15:38:26 +000015320
Neal Norwitzd24499d2005-12-18 21:36:39 +000015321SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15323$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015324for dir in $SRCDIRS; do
15325 if test ! -d $dir; then
15326 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015327 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015328done
Matthias Kloseb9621712010-04-24 17:59:49 +000015329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15330$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015331
Stefan Krah1919b7e2012-03-21 18:25:23 +010015332# Availability of -O2:
15333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15334$as_echo_n "checking for -O2... " >&6; }
15335saved_cflags="$CFLAGS"
15336CFLAGS="-O2"
15337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15338/* end confdefs.h. */
15339
15340int
15341main ()
15342{
15343
15344
15345 ;
15346 return 0;
15347}
15348_ACEOF
15349if ac_fn_c_try_compile "$LINENO"; then :
15350 have_O2=yes
15351else
15352 have_O2=no
15353fi
15354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15356$as_echo "$have_O2" >&6; }
15357CFLAGS="$saved_cflags"
15358
15359# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15360# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15362$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15363saved_cflags="$CFLAGS"
15364CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15365if test "$have_O2" = no; then
15366 CFLAGS=""
15367fi
15368if test "$cross_compiling" = yes; then :
15369 have_glibc_memmove_bug=undefined
15370else
15371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15372/* end confdefs.h. */
15373
15374#include <stdio.h>
15375#include <stdlib.h>
15376#include <string.h>
15377void foo(void *p, void *q) { memmove(p, q, 19); }
15378int main() {
15379 char a[32] = "123456789000000000";
15380 foo(&a[9], a);
15381 if (strcmp(a, "123456789123456789000000000") != 0)
15382 return 1;
15383 foo(a, &a[9]);
15384 if (strcmp(a, "123456789000000000") != 0)
15385 return 1;
15386 return 0;
15387}
15388
15389_ACEOF
15390if ac_fn_c_try_run "$LINENO"; then :
15391 have_glibc_memmove_bug=no
15392else
15393 have_glibc_memmove_bug=yes
15394fi
15395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15396 conftest.$ac_objext conftest.beam conftest.$ac_ext
15397fi
15398
15399CFLAGS="$saved_cflags"
15400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15401$as_echo "$have_glibc_memmove_bug" >&6; }
15402if test "$have_glibc_memmove_bug" = yes; then
15403
15404$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15405
15406fi
15407
15408if test "$have_gcc_asm_for_x87" = yes; then
15409 # Some versions of gcc miscompile inline asm:
15410 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15411 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15412 case $CC in
15413 *gcc*)
15414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15415$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15416 saved_cflags="$CFLAGS"
15417 CFLAGS="-O2"
15418 if test "$cross_compiling" = yes; then :
15419 have_ipa_pure_const_bug=undefined
15420else
15421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15422/* end confdefs.h. */
15423
15424 __attribute__((noinline)) int
15425 foo(int *p) {
15426 int r;
15427 asm ( "movl \$6, (%1)\n\t"
15428 "xorl %0, %0\n\t"
15429 : "=r" (r) : "r" (p) : "memory"
15430 );
15431 return r;
15432 }
15433 int main() {
15434 int p = 8;
15435 if ((foo(&p) ? : p) != 6)
15436 return 1;
15437 return 0;
15438 }
15439
15440_ACEOF
15441if ac_fn_c_try_run "$LINENO"; then :
15442 have_ipa_pure_const_bug=no
15443else
15444 have_ipa_pure_const_bug=yes
15445fi
15446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15447 conftest.$ac_objext conftest.beam conftest.$ac_ext
15448fi
15449
15450 CFLAGS="$saved_cflags"
15451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15452$as_echo "$have_ipa_pure_const_bug" >&6; }
15453 if test "$have_ipa_pure_const_bug" = yes; then
15454
15455$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15456
15457 fi
15458 ;;
15459 esac
15460fi
15461
Ned Deily322f5ba2013-11-21 23:01:59 -080015462# ensurepip option
15463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15464$as_echo_n "checking for ensurepip... " >&6; }
15465
15466# Check whether --with-ensurepip was given.
15467if test "${with_ensurepip+set}" = set; then :
15468 withval=$with_ensurepip;
15469else
15470 with_ensurepip=upgrade
15471fi
15472
15473case $with_ensurepip in #(
15474 yes|upgrade) :
15475 ENSUREPIP=upgrade ;; #(
15476 install) :
15477 ENSUREPIP=install ;; #(
15478 no) :
15479 ENSUREPIP=no ;; #(
15480 *) :
15481 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15482esac
15483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15484$as_echo "$ENSUREPIP" >&6; }
15485
15486
Guido van Rossum627b2d71993-12-24 10:39:16 +000015487# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015488ac_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 +000015489
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015490ac_config_files="$ac_config_files Modules/ld_so_aix"
15491
Martin v. Löwis11437992002-04-12 09:54:03 +000015492cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015493# This file is a shell script that caches the results of configure
15494# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015495# scripts and configure runs, see configure's option --config-cache.
15496# It is not useful on other systems. If it contains results you don't
15497# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015498#
Martin v. Löwis11437992002-04-12 09:54:03 +000015499# config.status only pays attention to the cache file if you give it
15500# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015501#
Skip Montanaro6dead952003-09-25 14:50:04 +000015502# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015503# loading this file, other *unset* `ac_cv_foo' will be assigned the
15504# following values.
15505
15506_ACEOF
15507
Guido van Rossumf78abae1997-01-21 22:02:36 +000015508# The following way of writing the cache mishandles newlines in values,
15509# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015510# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015511# Ultrix sh set writes to stderr and can't be redirected directly,
15512# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015513(
15514 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15515 eval ac_val=\$$ac_var
15516 case $ac_val in #(
15517 *${as_nl}*)
15518 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015519 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15520$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015521 esac
15522 case $ac_var in #(
15523 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015524 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15525 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526 esac ;;
15527 esac
15528 done
15529
Martin v. Löwis11437992002-04-12 09:54:03 +000015530 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015531 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15532 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015533 # `set' does not quote correctly, so add quotes: double-quote
15534 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015535 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015536 "s/'/'\\\\''/g;
15537 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015539 *)
15540 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015541 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015542 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015543 esac |
15544 sort
15545) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015546 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015548 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015549 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15551 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015552 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15553 :end' >>confcache
15554if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15555 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015556 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15558$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015559 if test ! -f "$cache_file" || test -h "$cache_file"; then
15560 cat confcache >"$cache_file"
15561 else
15562 case $cache_file in #(
15563 */* | ?:*)
15564 mv -f confcache "$cache_file"$$ &&
15565 mv -f "$cache_file"$$ "$cache_file" ;; #(
15566 *)
15567 mv -f confcache "$cache_file" ;;
15568 esac
15569 fi
15570 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015571 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015572 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15573$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015574 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015575fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015576rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015577
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015578test "x$prefix" = xNONE && prefix=$ac_default_prefix
15579# Let make expand exec_prefix.
15580test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015581
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015582DEFS=-DHAVE_CONFIG_H
15583
Skip Montanaro6dead952003-09-25 14:50:04 +000015584ac_libobjs=
15585ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015586U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015587for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15588 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015589 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15592 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015593 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15594 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015595done
15596LIBOBJS=$ac_libobjs
15597
15598LTLIBOBJS=$ac_ltlibobjs
15599
15600
Martin v. Löwis11437992002-04-12 09:54:03 +000015601
Matthias Kloseb9621712010-04-24 17:59:49 +000015602
Victor Stinnere0be4232011-10-25 13:06:09 +020015603: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015604ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015605ac_clean_files_save=$ac_clean_files
15606ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015607{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15608$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15609as_write_fail=0
15610cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015611#! $SHELL
15612# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015613# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015614# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015615# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015616
Martin v. Löwis11437992002-04-12 09:54:03 +000015617debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015618ac_cs_recheck=false
15619ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015620
Matthias Kloseb9621712010-04-24 17:59:49 +000015621SHELL=\${CONFIG_SHELL-$SHELL}
15622export SHELL
15623_ASEOF
15624cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15625## -------------------- ##
15626## M4sh Initialization. ##
15627## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015629# Be more Bourne compatible
15630DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015631if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015632 emulate sh
15633 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015634 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015635 # is contrary to our usage. Disable this feature.
15636 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015638else
Matthias Kloseb9621712010-04-24 17:59:49 +000015639 case `(set -o) 2>/dev/null` in #(
15640 *posix*) :
15641 set -o posix ;; #(
15642 *) :
15643 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015644esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015645fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015646
15647
Matthias Kloseb9621712010-04-24 17:59:49 +000015648as_nl='
15649'
15650export as_nl
15651# Printing a long string crashes Solaris 7 /usr/bin/printf.
15652as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15653as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15654as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15655# Prefer a ksh shell builtin over an external printf program on Solaris,
15656# but without wasting forks for bash or zsh.
15657if test -z "$BASH_VERSION$ZSH_VERSION" \
15658 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15659 as_echo='print -r --'
15660 as_echo_n='print -rn --'
15661elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15662 as_echo='printf %s\n'
15663 as_echo_n='printf %s'
15664else
15665 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15666 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15667 as_echo_n='/usr/ucb/echo -n'
15668 else
15669 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15670 as_echo_n_body='eval
15671 arg=$1;
15672 case $arg in #(
15673 *"$as_nl"*)
15674 expr "X$arg" : "X\\(.*\\)$as_nl";
15675 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15676 esac;
15677 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15678 '
15679 export as_echo_n_body
15680 as_echo_n='sh -c $as_echo_n_body as_echo'
15681 fi
15682 export as_echo_body
15683 as_echo='sh -c $as_echo_body as_echo'
15684fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015685
15686# The user is always right.
15687if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015688 PATH_SEPARATOR=:
15689 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15690 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15691 PATH_SEPARATOR=';'
15692 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015693fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015695
15696# IFS
15697# We need space, tab and new line, in precisely that order. Quoting is
15698# there to prevent editors from complaining about space-tab.
15699# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15700# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701IFS=" "" $as_nl"
15702
15703# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015704as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015705case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015706 *[\\/]* ) as_myself=$0 ;;
15707 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015708for as_dir in $PATH
15709do
15710 IFS=$as_save_IFS
15711 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015712 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15713 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015716 ;;
15717esac
15718# We did not find ourselves, most probably we were run as `sh COMMAND'
15719# in which case we are not to be found in the path.
15720if test "x$as_myself" = x; then
15721 as_myself=$0
15722fi
15723if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15725 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726fi
15727
Matthias Kloseb9621712010-04-24 17:59:49 +000015728# Unset variables that we do not need and which cause bugs (e.g. in
15729# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15730# suppresses any "Segmentation fault" message there. '((' could
15731# trigger a bug in pdksh 5.2.14.
15732for as_var in BASH_ENV ENV MAIL MAILPATH
15733do eval test x\${$as_var+set} = xset \
15734 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015735done
15736PS1='$ '
15737PS2='> '
15738PS4='+ '
15739
15740# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015741LC_ALL=C
15742export LC_ALL
15743LANGUAGE=C
15744export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745
Matthias Kloseb9621712010-04-24 17:59:49 +000015746# CDPATH.
15747(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15748
15749
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015750# as_fn_error STATUS ERROR [LINENO LOG_FD]
15751# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015752# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15753# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015754# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015755as_fn_error ()
15756{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015757 as_status=$1; test $as_status -eq 0 && as_status=1
15758 if test "$4"; then
15759 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15760 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015762 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 as_fn_exit $as_status
15764} # as_fn_error
15765
15766
15767# as_fn_set_status STATUS
15768# -----------------------
15769# Set $? to STATUS, without forking.
15770as_fn_set_status ()
15771{
15772 return $1
15773} # as_fn_set_status
15774
15775# as_fn_exit STATUS
15776# -----------------
15777# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15778as_fn_exit ()
15779{
15780 set +e
15781 as_fn_set_status $1
15782 exit $1
15783} # as_fn_exit
15784
15785# as_fn_unset VAR
15786# ---------------
15787# Portably unset VAR.
15788as_fn_unset ()
15789{
15790 { eval $1=; unset $1;}
15791}
15792as_unset=as_fn_unset
15793# as_fn_append VAR VALUE
15794# ----------------------
15795# Append the text in VALUE to the end of the definition contained in VAR. Take
15796# advantage of any shell optimizations that allow amortized linear growth over
15797# repeated appends, instead of the typical quadratic growth present in naive
15798# implementations.
15799if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15800 eval 'as_fn_append ()
15801 {
15802 eval $1+=\$2
15803 }'
15804else
15805 as_fn_append ()
15806 {
15807 eval $1=\$$1\$2
15808 }
15809fi # as_fn_append
15810
15811# as_fn_arith ARG...
15812# ------------------
15813# Perform arithmetic evaluation on the ARGs, and store the result in the
15814# global $as_val. Take advantage of shells that can avoid forks. The arguments
15815# must be portable across $(()) and expr.
15816if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15817 eval 'as_fn_arith ()
15818 {
15819 as_val=$(( $* ))
15820 }'
15821else
15822 as_fn_arith ()
15823 {
15824 as_val=`expr "$@" || test $? -eq 1`
15825 }
15826fi # as_fn_arith
15827
15828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829if expr a : '\(a\)' >/dev/null 2>&1 &&
15830 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15831 as_expr=expr
15832else
15833 as_expr=false
15834fi
15835
15836if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15837 as_basename=basename
15838else
15839 as_basename=false
15840fi
15841
Matthias Kloseb9621712010-04-24 17:59:49 +000015842if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15843 as_dirname=dirname
15844else
15845 as_dirname=false
15846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015848as_me=`$as_basename -- "$0" ||
15849$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15850 X"$0" : 'X\(//\)$' \| \
15851 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015852$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015853 sed '/^.*\/\([^/][^/]*\)\/*$/{
15854 s//\1/
15855 q
15856 }
15857 /^X\/\(\/\/\)$/{
15858 s//\1/
15859 q
15860 }
15861 /^X\/\(\/\).*/{
15862 s//\1/
15863 q
15864 }
15865 s/.*/./; q'`
15866
Matthias Kloseb9621712010-04-24 17:59:49 +000015867# Avoid depending upon Character Ranges.
15868as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15869as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15870as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15871as_cr_digits='0123456789'
15872as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015873
15874ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015875case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015876-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015877 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015878 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015879 xy) ECHO_C='\c';;
15880 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15881 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015882 esac;;
15883*)
15884 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015885esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015886
Martin v. Löwis11437992002-04-12 09:54:03 +000015887rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015888if test -d conf$$.dir; then
15889 rm -f conf$$.dir/conf$$.file
15890else
15891 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015892 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015894if (echo >conf$$.file) 2>/dev/null; then
15895 if ln -s conf$$.file conf$$ 2>/dev/null; then
15896 as_ln_s='ln -s'
15897 # ... but there are two gotchas:
15898 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15899 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015900 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015901 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015902 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015903 elif ln conf$$.file conf$$ 2>/dev/null; then
15904 as_ln_s=ln
15905 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015906 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015907 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015908else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015909 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015911rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15912rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015913
Matthias Kloseb9621712010-04-24 17:59:49 +000015914
15915# as_fn_mkdir_p
15916# -------------
15917# Create "$as_dir" as a directory, including parents if necessary.
15918as_fn_mkdir_p ()
15919{
15920
15921 case $as_dir in #(
15922 -*) as_dir=./$as_dir;;
15923 esac
15924 test -d "$as_dir" || eval $as_mkdir_p || {
15925 as_dirs=
15926 while :; do
15927 case $as_dir in #(
15928 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15929 *) as_qdir=$as_dir;;
15930 esac
15931 as_dirs="'$as_qdir' $as_dirs"
15932 as_dir=`$as_dirname -- "$as_dir" ||
15933$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15934 X"$as_dir" : 'X\(//\)[^/]' \| \
15935 X"$as_dir" : 'X\(//\)$' \| \
15936 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15937$as_echo X"$as_dir" |
15938 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15939 s//\1/
15940 q
15941 }
15942 /^X\(\/\/\)[^/].*/{
15943 s//\1/
15944 q
15945 }
15946 /^X\(\/\/\)$/{
15947 s//\1/
15948 q
15949 }
15950 /^X\(\/\).*/{
15951 s//\1/
15952 q
15953 }
15954 s/.*/./; q'`
15955 test -d "$as_dir" && break
15956 done
15957 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015958 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015959
15960
15961} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015962if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015963 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015964else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015965 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015966 as_mkdir_p=false
15967fi
15968
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015969
15970# as_fn_executable_p FILE
15971# -----------------------
15972# Test if FILE is an executable regular file.
15973as_fn_executable_p ()
15974{
15975 test -f "$1" && test -x "$1"
15976} # as_fn_executable_p
15977as_test_x='test -x'
15978as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015979
15980# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015981as_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 +000015982
15983# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015984as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015985
15986
Martin v. Löwis11437992002-04-12 09:54:03 +000015987exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015988## ----------------------------------- ##
15989## Main body of $CONFIG_STATUS script. ##
15990## ----------------------------------- ##
15991_ASEOF
15992test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015993
Matthias Kloseb9621712010-04-24 17:59:49 +000015994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15995# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015996# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015997# values after options handling.
15998ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070015999This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016000generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016001
16002 CONFIG_FILES = $CONFIG_FILES
16003 CONFIG_HEADERS = $CONFIG_HEADERS
16004 CONFIG_LINKS = $CONFIG_LINKS
16005 CONFIG_COMMANDS = $CONFIG_COMMANDS
16006 $ $0 $@
16007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008on `(hostname || uname -n) 2>/dev/null | sed 1q`
16009"
16010
Martin v. Löwis11437992002-04-12 09:54:03 +000016011_ACEOF
16012
Matthias Kloseb9621712010-04-24 17:59:49 +000016013case $ac_config_files in *"
16014"*) set x $ac_config_files; shift; ac_config_files=$*;;
16015esac
16016
16017case $ac_config_headers in *"
16018"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16019esac
16020
16021
16022cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016023# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016024config_files="$ac_config_files"
16025config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016027_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016028
Matthias Kloseb9621712010-04-24 17:59:49 +000016029cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016030ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016031\`$as_me' instantiates files and other configuration actions
16032from templates according to the current configuration. Unless the files
16033and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016034
Matthias Kloseb9621712010-04-24 17:59:49 +000016035Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016036
16037 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016038 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016039 --config print configuration, then exit
16040 -q, --quiet, --silent
16041 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016042 -d, --debug don't remove temporary files
16043 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016044 --file=FILE[:TEMPLATE]
16045 instantiate the configuration file FILE
16046 --header=FILE[:TEMPLATE]
16047 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016048
16049Configuration files:
16050$config_files
16051
16052Configuration headers:
16053$config_headers
16054
Matthias Kloseb9621712010-04-24 17:59:49 +000016055Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016058cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16059ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016060ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016061python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016062configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016063 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016064
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016065Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016066This config.status script is free software; the Free Software Foundation
16067gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016068
16069ac_pwd='$ac_pwd'
16070srcdir='$srcdir'
16071INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016072MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016073test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016074_ACEOF
16075
Matthias Kloseb9621712010-04-24 17:59:49 +000016076cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16077# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016078ac_need_defaults=:
16079while test $# != 0
16080do
16081 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016082 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016083 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16084 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016085 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016086 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016087 --*=)
16088 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16089 ac_optarg=
16090 ac_shift=:
16091 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016092 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016093 ac_option=$1
16094 ac_optarg=$2
16095 ac_shift=shift
16096 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016097 esac
16098
Skip Montanaro6dead952003-09-25 14:50:04 +000016099 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016100 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016101 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16102 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016104 $as_echo "$ac_cs_version"; exit ;;
16105 --config | --confi | --conf | --con | --co | --c )
16106 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016107 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016108 debug=: ;;
16109 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016110 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016111 case $ac_optarg in
16112 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016113 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016114 esac
16115 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016116 ac_need_defaults=false;;
16117 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016118 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016119 case $ac_optarg in
16120 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16121 esac
16122 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016123 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016124 --he | --h)
16125 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016126 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016127Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016128 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016129 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016130 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16131 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16132 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016133
16134 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016135 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016136Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016137
Matthias Kloseb9621712010-04-24 17:59:49 +000016138 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016139 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016140
16141 esac
16142 shift
16143done
16144
Skip Montanaro6dead952003-09-25 14:50:04 +000016145ac_configure_extra_args=
16146
16147if $ac_cs_silent; then
16148 exec 6>/dev/null
16149 ac_configure_extra_args="$ac_configure_extra_args --silent"
16150fi
16151
16152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016153cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016154if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016155 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016156 shift
16157 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16158 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016159 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016160 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016161fi
16162
Martin v. Löwis11437992002-04-12 09:54:03 +000016163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016164cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165exec 5>>config.log
16166{
16167 echo
16168 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16169## Running $as_me. ##
16170_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016171 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016172} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016175cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016176_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016177
Matthias Kloseb9621712010-04-24 17:59:49 +000016178cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016179
16180# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016181for ac_config_target in $ac_config_targets
16182do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016183 case $ac_config_target in
16184 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16185 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16186 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016187 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16188 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016189 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16190 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016191 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016192 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016193 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016194
Victor Stinnere0be4232011-10-25 13:06:09 +020016195 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 esac
16197done
16198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016199
Martin v. Löwis11437992002-04-12 09:54:03 +000016200# If the user did not use the arguments to specify the items to instantiate,
16201# then the envvar interface is used. Set only those that are not.
16202# We use the long form for the default assignment because of an extremely
16203# bizarre bug on SunOS 4.1.3.
16204if $ac_need_defaults; then
16205 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16206 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16207fi
16208
Skip Montanaro6dead952003-09-25 14:50:04 +000016209# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016210# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016211# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212# Hook for its removal unless debugging.
16213# Note that there is a small window in which the directory will not be cleaned:
16214# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016215$debug ||
16216{
Victor Stinnere0be4232011-10-25 13:06:09 +020016217 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016219 : "${ac_tmp:=$tmp}"
16220 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016222 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016223}
Martin v. Löwis11437992002-04-12 09:54:03 +000016224# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016225
Martin v. Löwis11437992002-04-12 09:54:03 +000016226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016228 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016229} ||
16230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016231 tmp=./conf$$-$RANDOM
16232 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016233} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016234ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016235
Matthias Kloseb9621712010-04-24 17:59:49 +000016236# Set up the scripts for CONFIG_FILES section.
16237# No need to generate them if there are no CONFIG_FILES.
16238# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016240
Matthias Kloseb9621712010-04-24 17:59:49 +000016241
16242ac_cr=`echo X | tr X '\015'`
16243# On cygwin, bash can eat \r inside `` if the user requested igncr.
16244# But we know of no other shell where ac_cr would be empty at this
16245# point, so we can use a bashism as a fallback.
16246if test "x$ac_cr" = x; then
16247 eval ac_cr=\$\'\\r\'
16248fi
16249ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16250if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016251 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016252else
16253 ac_cs_awk_cr=$ac_cr
16254fi
16255
Victor Stinnere0be4232011-10-25 13:06:09 +020016256echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016257_ACEOF
16258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259
Matthias Kloseb9621712010-04-24 17:59:49 +000016260{
16261 echo "cat >conf$$subs.awk <<_ACEOF" &&
16262 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16263 echo "_ACEOF"
16264} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016265 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16266ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267ac_delim='%!_!# '
16268for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016269 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016270 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271
Matthias Kloseb9621712010-04-24 17:59:49 +000016272 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16273 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016274 break
16275 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016276 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016277 else
16278 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280done
Matthias Kloseb9621712010-04-24 17:59:49 +000016281rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282
Matthias Kloseb9621712010-04-24 17:59:49 +000016283cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016284cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016286sed -n '
16287h
16288s/^/S["/; s/!.*/"]=/
16289p
16290g
16291s/^[^!]*!//
16292:repl
16293t repl
16294s/'"$ac_delim"'$//
16295t delim
16296:nl
16297h
16298s/\(.\{148\}\)..*/\1/
16299t more1
16300s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16301p
16302n
16303b repl
16304:more1
16305s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16306p
16307g
16308s/.\{148\}//
16309t nl
16310:delim
16311h
16312s/\(.\{148\}\)..*/\1/
16313t more2
16314s/["\\]/\\&/g; s/^/"/; s/$/"/
16315p
16316b
16317:more2
16318s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16319p
16320g
16321s/.\{148\}//
16322t delim
16323' <conf$$subs.awk | sed '
16324/^[^""]/{
16325 N
16326 s/\n//
16327}
16328' >>$CONFIG_STATUS || ac_write_fail=1
16329rm -f conf$$subs.awk
16330cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16331_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016332cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016333 for (key in S) S_is_set[key] = 1
16334 FS = ""
16335
16336}
16337{
16338 line = $ 0
16339 nfields = split(line, field, "@")
16340 substed = 0
16341 len = length(field[1])
16342 for (i = 2; i < nfields; i++) {
16343 key = field[i]
16344 keylen = length(key)
16345 if (S_is_set[key]) {
16346 value = S[key]
16347 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16348 len += length(value) + length(field[++i])
16349 substed = 1
16350 } else
16351 len += 1 + keylen
16352 }
16353
16354 print line
16355}
16356
16357_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016359cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16360if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16361 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16362else
16363 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016364fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016365 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016366_ACEOF
16367
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016368# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16369# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016370# trailing colons and then remove the whole line if VPATH becomes empty
16371# (actually we leave an empty line to preserve line numbers).
16372if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016373 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16374h
16375s///
16376s/^/:/
16377s/[ ]*$/:/
16378s/:\$(srcdir):/:/g
16379s/:\${srcdir}:/:/g
16380s/:@srcdir@:/:/g
16381s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016382s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016383x
16384s/\(=[ ]*\).*/\1/
16385G
16386s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016387s/^[^=]*=[ ]*$//
16388}'
16389fi
16390
Matthias Kloseb9621712010-04-24 17:59:49 +000016391cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016392fi # test -n "$CONFIG_FILES"
16393
Matthias Kloseb9621712010-04-24 17:59:49 +000016394# Set up the scripts for CONFIG_HEADERS section.
16395# No need to generate them if there are no CONFIG_HEADERS.
16396# This happens for instance with `./config.status Makefile'.
16397if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016398cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016399BEGIN {
16400_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016401
Matthias Kloseb9621712010-04-24 17:59:49 +000016402# Transform confdefs.h into an awk script `defines.awk', embedded as
16403# here-document in config.status, that substitutes the proper values into
16404# config.h.in to produce config.h.
16405
16406# Create a delimiter string that does not exist in confdefs.h, to ease
16407# handling of long lines.
16408ac_delim='%!_!# '
16409for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016410 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16411 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016412 break
16413 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016414 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016415 else
16416 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16417 fi
16418done
16419
16420# For the awk script, D is an array of macro values keyed by name,
16421# likewise P contains macro parameters if any. Preserve backslash
16422# newline sequences.
16423
16424ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16425sed -n '
16426s/.\{148\}/&'"$ac_delim"'/g
16427t rset
16428:rset
16429s/^[ ]*#[ ]*define[ ][ ]*/ /
16430t def
16431d
16432:def
16433s/\\$//
16434t bsnl
16435s/["\\]/\\&/g
16436s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16437D["\1"]=" \3"/p
16438s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16439d
16440:bsnl
16441s/["\\]/\\&/g
16442s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16443D["\1"]=" \3\\\\\\n"\\/p
16444t cont
16445s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16446t cont
16447d
16448:cont
16449n
16450s/.\{148\}/&'"$ac_delim"'/g
16451t clear
16452:clear
16453s/\\$//
16454t bsnlc
16455s/["\\]/\\&/g; s/^/"/; s/$/"/p
16456d
16457:bsnlc
16458s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16459b cont
16460' <confdefs.h | sed '
16461s/'"$ac_delim"'/"\\\
16462"/g' >>$CONFIG_STATUS || ac_write_fail=1
16463
16464cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16465 for (key in D) D_is_set[key] = 1
16466 FS = ""
16467}
16468/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16469 line = \$ 0
16470 split(line, arg, " ")
16471 if (arg[1] == "#") {
16472 defundef = arg[2]
16473 mac1 = arg[3]
16474 } else {
16475 defundef = substr(arg[1], 2)
16476 mac1 = arg[2]
16477 }
16478 split(mac1, mac2, "(") #)
16479 macro = mac2[1]
16480 prefix = substr(line, 1, index(line, defundef) - 1)
16481 if (D_is_set[macro]) {
16482 # Preserve the white space surrounding the "#".
16483 print prefix "define", macro P[macro] D[macro]
16484 next
16485 } else {
16486 # Replace #undef with comments. This is necessary, for example,
16487 # in the case of _POSIX_SOURCE, which is predefined and required
16488 # on some systems where configure will not decide to define it.
16489 if (defundef == "undef") {
16490 print "/*", prefix defundef, macro, "*/"
16491 next
16492 }
16493 }
16494}
16495{ print }
16496_ACAWK
16497_ACEOF
16498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016499 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016500fi # test -n "$CONFIG_HEADERS"
16501
16502
16503eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16504shift
16505for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506do
16507 case $ac_tag in
16508 :[FHLC]) ac_mode=$ac_tag; continue;;
16509 esac
16510 case $ac_mode$ac_tag in
16511 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016512 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513 :[FH]-) ac_tag=-:-;;
16514 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16515 esac
16516 ac_save_IFS=$IFS
16517 IFS=:
16518 set x $ac_tag
16519 IFS=$ac_save_IFS
16520 shift
16521 ac_file=$1
16522 shift
16523
16524 case $ac_mode in
16525 :L) ac_source=$1;;
16526 :[FH])
16527 ac_file_inputs=
16528 for ac_f
16529 do
16530 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016531 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016532 *) # Look for the file first in the build tree, then in the source tree
16533 # (if the path is not absolute). The absolute path cannot be DOS-style,
16534 # because $ac_f cannot contain `:'.
16535 test -f "$ac_f" ||
16536 case $ac_f in
16537 [\\/$]*) false;;
16538 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16539 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016540 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016541 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016542 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16543 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 done
16545
16546 # Let's still pretend it is `configure' which instantiates (i.e., don't
16547 # use $as_me), people would be surprised to read:
16548 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016549 configure_input='Generated from '`
16550 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16551 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552 if test x"$ac_file" != x-; then
16553 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016554 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16555$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016557 # Neutralize special characters interpreted by sed in replacement strings.
16558 case $configure_input in #(
16559 *\&* | *\|* | *\\* )
16560 ac_sed_conf_input=`$as_echo "$configure_input" |
16561 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16562 *) ac_sed_conf_input=$configure_input;;
16563 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564
16565 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016566 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16567 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 esac
16569 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016570 esac
16571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016572 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016573$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016574 X"$ac_file" : 'X\(//\)[^/]' \| \
16575 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016576 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016577$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16579 s//\1/
16580 q
16581 }
16582 /^X\(\/\/\)[^/].*/{
16583 s//\1/
16584 q
16585 }
16586 /^X\(\/\/\)$/{
16587 s//\1/
16588 q
16589 }
16590 /^X\(\/\).*/{
16591 s//\1/
16592 q
16593 }
16594 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016595 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016596 ac_builddir=.
16597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598case "$ac_dir" in
16599.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16600*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016601 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016602 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016603 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016604 case $ac_top_builddir_sub in
16605 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16606 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16607 esac ;;
16608esac
16609ac_abs_top_builddir=$ac_pwd
16610ac_abs_builddir=$ac_pwd$ac_dir_suffix
16611# for backward compatibility:
16612ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016613
16614case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016616 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016617 ac_top_srcdir=$ac_top_builddir_sub
16618 ac_abs_top_srcdir=$ac_pwd ;;
16619 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016620 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016621 ac_top_srcdir=$srcdir
16622 ac_abs_top_srcdir=$srcdir ;;
16623 *) # Relative name.
16624 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16625 ac_top_srcdir=$ac_top_build_prefix$srcdir
16626 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016627esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016628ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016629
Martin v. Löwis11437992002-04-12 09:54:03 +000016630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631 case $ac_mode in
16632 :F)
16633 #
16634 # CONFIG_FILE
16635 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016636
16637 case $INSTALL in
16638 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016640 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016641 ac_MKDIR_P=$MKDIR_P
16642 case $MKDIR_P in
16643 [\\/$]* | ?:[\\/]* ) ;;
16644 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16645 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016646_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647
Matthias Kloseb9621712010-04-24 17:59:49 +000016648cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649# If the template does not know about datarootdir, expand it.
16650# FIXME: This hack should be removed a few years after 2.60.
16651ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016652ac_sed_dataroot='
16653/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654 p
16655 q
16656}
16657/@datadir@/p
16658/@docdir@/p
16659/@infodir@/p
16660/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016661/@mandir@/p'
16662case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663*datarootdir*) ac_datarootdir_seen=yes;;
16664*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16666$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016668cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016669 ac_datarootdir_hack='
16670 s&@datadir@&$datadir&g
16671 s&@docdir@&$docdir&g
16672 s&@infodir@&$infodir&g
16673 s&@localedir@&$localedir&g
16674 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016675 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016676esac
16677_ACEOF
16678
16679# Neutralize VPATH when `$srcdir' = `.'.
16680# Shell code in configure.ac might set extrasub.
16681# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016682cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16683ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016684$extrasub
16685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016686cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016687:t
16688/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016689s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016690s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016691s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692s&@srcdir@&$ac_srcdir&;t t
16693s&@abs_srcdir@&$ac_abs_srcdir&;t t
16694s&@top_srcdir@&$ac_top_srcdir&;t t
16695s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16696s&@builddir@&$ac_builddir&;t t
16697s&@abs_builddir@&$ac_abs_builddir&;t t
16698s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16699s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016700s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016702"
Victor Stinnere0be4232011-10-25 13:06:09 +020016703eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16704 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016707 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16708 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16709 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016710 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016711which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016712$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016713which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016714
Victor Stinnere0be4232011-10-25 13:06:09 +020016715 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016716 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016717 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16718 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016719 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016720 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721 ;;
16722 :H)
16723 #
16724 # CONFIG_HEADER
16725 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016726 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016727 {
16728 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016729 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16730 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016731 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016732 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016733 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16734$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016735 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016736 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016737 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016738 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016739 fi
16740 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016741 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016742 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016743 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747
16748 esac
16749
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016750
16751 case $ac_file$ac_mode in
16752 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16753
16754 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016755done # for ac_tag
16756
Guido van Rossum627b2d71993-12-24 10:39:16 +000016757
Matthias Kloseb9621712010-04-24 17:59:49 +000016758as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016759_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016760ac_clean_files=$ac_clean_files_save
16761
Matthias Kloseb9621712010-04-24 17:59:49 +000016762test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016763 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016764
Martin v. Löwis11437992002-04-12 09:54:03 +000016765
16766# configure is writing to config.log, and then calls config.status.
16767# config.status does its own redirection, appending to config.log.
16768# Unfortunately, on DOS this fails, as config.log is still kept open
16769# by configure, so config.status won't be able to write to it; its
16770# output is simply discarded. So we exec the FD to /dev/null,
16771# effectively closing config.log, so it can be properly (re)opened and
16772# appended to by config.status. When coming back to configure, we
16773# need to make the FD available again.
16774if test "$no_create" != yes; then
16775 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016776 ac_config_status_args=
16777 test "$silent" = yes &&
16778 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016779 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016780 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016781 exec 5>>config.log
16782 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16783 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016784 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016785fi
16786if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16788$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016789fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016790
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016791
Christian Heimes75ed8902013-11-20 01:11:18 +010016792echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016793if test ! -f Modules/Setup
16794then
16795 cp $srcdir/Modules/Setup.dist Modules/Setup
16796fi
16797
Christian Heimes75ed8902013-11-20 01:11:18 +010016798echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016799if test ! -f Modules/Setup.local
16800then
16801 echo "# Edit this file for local setup changes" >Modules/Setup.local
16802fi
16803
Christian Heimes75ed8902013-11-20 01:11:18 +010016804echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016805$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16806 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016807 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016808mv config.c Modules