blob: 473f6b25ce4562b2ace3bd8e84ee2ac678e8243e [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
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000670ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100672MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000673INSTALL_DATA
674INSTALL_SCRIPT
675INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530676OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200677PYTHON
678ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200679ac_ct_READELF
680READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000681ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200682ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000683AR
684RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000685USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000686GNULD
687LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000689RUNSHARED
690INSTSONAME
691LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000692PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000693BLDLIBRARY
694DLLLIBRARY
695LDLIBRARY
696LIBRARY
697BUILDEXEEXT
698EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200699NO_AS_NEEDED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200700PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200701PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200702MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200703ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000704MAINCC
705CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200706GREP
707CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000708OBJEXT
709EXEEXT
710ac_ct_CC
711CPPFLAGS
712LDFLAGS
713CFLAGS
714CC
715EXPORT_MACOSX_DEPLOYMENT_TARGET
716CONFIGURE_MACOSX_DEPLOYMENT_TARGET
717SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200718_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000719MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000720FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000721FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800722FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000723FRAMEWORKALTINSTALLLAST
724FRAMEWORKALTINSTALLFIRST
725FRAMEWORKINSTALLLAST
726FRAMEWORKINSTALLFIRST
727PYTHONFRAMEWORKINSTALLDIR
728PYTHONFRAMEWORKPREFIX
729PYTHONFRAMEWORKDIR
730PYTHONFRAMEWORKIDENTIFIER
731PYTHONFRAMEWORK
732LIPO_32BIT_FLAGS
733ARCH_RUN_32BIT
734UNIVERSALSDK
735CONFIG_ARGS
736SOVERSION
737VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200738PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100739host_os
740host_vendor
741host_cpu
742host
743build_os
744build_vendor
745build_cpu
746build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500747HAS_HG
748HGBRANCH
749HGTAG
750HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400751BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000752target_alias
753host_alias
754build_alias
755LIBS
756ECHO_T
757ECHO_N
758ECHO_C
759DEFS
760mandir
761localedir
762libdir
763psdir
764pdfdir
765dvidir
766htmldir
767infodir
768docdir
769oldincludedir
770includedir
771localstatedir
772sharedstatedir
773sysconfdir
774datadir
775datarootdir
776libexecdir
777sbindir
778bindir
779program_transform_name
780prefix
781exec_prefix
782PACKAGE_URL
783PACKAGE_BUGREPORT
784PACKAGE_STRING
785PACKAGE_VERSION
786PACKAGE_TARNAME
787PACKAGE_NAME
788PATH_SEPARATOR
789SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000790ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000791ac_user_opts='
792enable_option_checking
793enable_universalsdk
794with_universal_archs
795with_framework_name
796enable_framework
797with_gcc
798with_cxx_main
799with_suffix
800enable_shared
801enable_profiling
802with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100803with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100804with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000805with_libs
806with_system_expat
807with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100808with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000809enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700810with_tcltk_includes
811with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_dbmliborder
813with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_threads
815with_thread
816enable_ipv6
817with_doc_strings
818with_tsc
819with_pymalloc
820with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_fpectl
822with_libm
823with_libc
824enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800826with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000827'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828 ac_precious_vars='build_alias
829host_alias
830target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100831MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832CC
833CFLAGS
834LDFLAGS
835LIBS
836CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100837CPP
838PKG_CONFIG
839PKG_CONFIG_PATH
840PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841
Guido van Rossum627b2d71993-12-24 10:39:16 +0000842
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000844ac_init_help=
845ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000846ac_unrecognized_opts=
847ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848# The variables have the same names as the options, with
849# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000850cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853no_recursion=
854prefix=NONE
855program_prefix=NONE
856program_suffix=NONE
857program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862x_includes=NONE
863x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000864
865# Installation directory options.
866# These are left unexpanded so users can "make install exec_prefix=/foo"
867# and all the variables that are supposed to be based on exec_prefix
868# by default will actually change.
869# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871bindir='${exec_prefix}/bin'
872sbindir='${exec_prefix}/sbin'
873libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874datarootdir='${prefix}/share'
875datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876sysconfdir='${prefix}/etc'
877sharedstatedir='${prefix}/com'
878localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879includedir='${prefix}/include'
880oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
882infodir='${datarootdir}/info'
883htmldir='${docdir}'
884dvidir='${docdir}'
885pdfdir='${docdir}'
886psdir='${docdir}'
887libdir='${exec_prefix}/lib'
888localedir='${datarootdir}/locale'
889mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000894do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895 # If the previous option needs an argument, assign it.
896 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 ac_prev=
899 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000900 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200903 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
904 *=) ac_optarg= ;;
905 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908 # Accept the important Cygnus configure options, so we can diagnose typos.
909
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910 case $ac_dashdash$ac_option in
911 --)
912 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 -bindir | --bindir | --bindi | --bind | --bin | --bi)
915 ac_prev=bindir ;;
916 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 -cache-file | --cache-file | --cache-fil | --cache-fi \
925 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
926 ac_prev=cache_file ;;
927 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
928 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 cache_file=$ac_optarg ;;
930
931 --config-cache | -C)
932 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
940 | --dataroo | --dataro | --datar)
941 ac_prev=datarootdir ;;
942 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
943 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
944 datarootdir=$ac_optarg ;;
945
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000947 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000949 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200950 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000951 ac_useropt_orig=$ac_useropt
952 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
953 case $ac_user_opts in
954 *"
955"enable_$ac_useropt"
956"*) ;;
957 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
958 ac_unrecognized_sep=', ';;
959 esac
960 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961
962 -docdir | --docdir | --docdi | --doc | --do)
963 ac_prev=docdir ;;
964 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
965 docdir=$ac_optarg ;;
966
967 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
968 ac_prev=dvidir ;;
969 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
970 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971
972 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000974 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000975 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200976 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000977 ac_useropt_orig=$ac_useropt
978 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
979 case $ac_user_opts in
980 *"
981"enable_$ac_useropt"
982"*) ;;
983 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
984 ac_unrecognized_sep=', ';;
985 esac
986 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
989 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
990 | --exec | --exe | --ex)
991 ac_prev=exec_prefix ;;
992 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
993 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
994 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998 # Obsolete; use --with-gas.
999 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 -help | --help | --hel | --he | -h)
1002 ac_init_help=long ;;
1003 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1004 ac_init_help=recursive ;;
1005 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1006 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001013 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1014 ac_prev=htmldir ;;
1015 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1016 | --ht=*)
1017 htmldir=$ac_optarg ;;
1018
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019 -includedir | --includedir | --includedi | --included | --include \
1020 | --includ | --inclu | --incl | --inc)
1021 ac_prev=includedir ;;
1022 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1023 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -infodir | --infodir | --infodi | --infod | --info | --inf)
1027 ac_prev=infodir ;;
1028 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030
1031 -libdir | --libdir | --libdi | --libd)
1032 ac_prev=libdir ;;
1033 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1037 | --libexe | --libex | --libe)
1038 ac_prev=libexecdir ;;
1039 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1040 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001043 -localedir | --localedir | --localedi | --localed | --locale)
1044 ac_prev=localedir ;;
1045 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1046 localedir=$ac_optarg ;;
1047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001049 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 ac_prev=localstatedir ;;
1051 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001052 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1056 ac_prev=mandir ;;
1057 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061 # Obsolete; use --without-fp.
1062 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066 no_create=yes ;;
1067
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1069 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1070 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1073 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1074 | --oldin | --oldi | --old | --ol | --o)
1075 ac_prev=oldincludedir ;;
1076 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1077 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1078 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1082 ac_prev=prefix ;;
1083 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1087 | --program-pre | --program-pr | --program-p)
1088 ac_prev=program_prefix ;;
1089 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1090 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1094 | --program-suf | --program-su | --program-s)
1095 ac_prev=program_suffix ;;
1096 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1097 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-transform-name | --program-transform-name \
1101 | --program-transform-nam | --program-transform-na \
1102 | --program-transform-n | --program-transform- \
1103 | --program-transform | --program-transfor \
1104 | --program-transfo | --program-transf \
1105 | --program-trans | --program-tran \
1106 | --progr-tra | --program-tr | --program-t)
1107 ac_prev=program_transform_name ;;
1108 -program-transform-name=* | --program-transform-name=* \
1109 | --program-transform-nam=* | --program-transform-na=* \
1110 | --program-transform-n=* | --program-transform-=* \
1111 | --program-transform=* | --program-transfor=* \
1112 | --program-transfo=* | --program-transf=* \
1113 | --program-trans=* | --program-tran=* \
1114 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001117 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1118 ac_prev=pdfdir ;;
1119 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1120 pdfdir=$ac_optarg ;;
1121
1122 -psdir | --psdir | --psdi | --psd | --ps)
1123 ac_prev=psdir ;;
1124 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1125 psdir=$ac_optarg ;;
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1128 | -silent | --silent | --silen | --sile | --sil)
1129 silent=yes ;;
1130
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001131 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1132 ac_prev=sbindir ;;
1133 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1134 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001136
1137 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1138 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1139 | --sharedst | --shareds | --shared | --share | --shar \
1140 | --sha | --sh)
1141 ac_prev=sharedstatedir ;;
1142 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1143 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1144 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1145 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 -site | --site | --sit)
1149 ac_prev=site ;;
1150 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1154 ac_prev=srcdir ;;
1155 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1159 | --syscon | --sysco | --sysc | --sys | --sy)
1160 ac_prev=sysconfdir ;;
1161 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1162 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
1170 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1171 verbose=yes ;;
1172
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 -version | --version | --versio | --versi | --vers | -V)
1174 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
1176 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001180 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 ac_useropt_orig=$ac_useropt
1182 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1183 case $ac_user_opts in
1184 *"
1185"with_$ac_useropt"
1186"*) ;;
1187 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1188 ac_unrecognized_sep=', ';;
1189 esac
1190 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001196 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt_orig=$ac_useropt
1198 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199 case $ac_user_opts in
1200 *"
1201"with_$ac_useropt"
1202"*) ;;
1203 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1204 ac_unrecognized_sep=', ';;
1205 esac
1206 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 --x)
1209 # Obsolete; use --with-x.
1210 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1213 | --x-incl | --x-inc | --x-in | --x-i)
1214 ac_prev=x_includes ;;
1215 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1216 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
1219 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1220 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1221 ac_prev=x_libraries ;;
1222 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1223 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1227Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228 ;;
1229
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 *=*)
1231 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1232 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001233 case $ac_envvar in #(
1234 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001235 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 export $ac_envvar ;;
1239
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001240 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001244 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001245 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
1248 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249done
1250
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254fi
1255
Matthias Kloseb9621712010-04-24 17:59:49 +00001256if test -n "$ac_unrecognized_opts"; then
1257 case $enable_option_checking in
1258 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1261 esac
1262fi
1263
1264# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1266 datadir sysconfdir sharedstatedir localstatedir includedir \
1267 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1268 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 # Remove trailing slashes.
1272 case $ac_val in
1273 */ )
1274 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1275 eval $ac_var=\$ac_val;;
1276 esac
1277 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 [\\/$]* | ?:[\\/]* ) continue;;
1280 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001283done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284
Martin v. Löwis11437992002-04-12 09:54:03 +00001285# There might be people who depend on the old broken behavior: `$host'
1286# used to hold the argument of --host etc.
1287# FIXME: To remove some day.
1288build=$build_alias
1289host=$host_alias
1290target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291
Martin v. Löwis11437992002-04-12 09:54:03 +00001292# FIXME: To remove some day.
1293if test "x$host_alias" != x; then
1294 if test "x$build_alias" = x; then
1295 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 elif test "x$build_alias" != "x$host_alias"; then
1297 cross_compiling=yes
1298 fi
1299fi
1300
1301ac_tool_prefix=
1302test -n "$host_alias" && ac_tool_prefix=$host_alias-
1303
1304test "$silent" = yes && exec 6>/dev/null
1305
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307ac_pwd=`pwd` && test -n "$ac_pwd" &&
1308ac_ls_di=`ls -di .` &&
1309ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001312 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313
1314
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315# Find the source files, if location was not specified.
1316if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001317 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001318 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001319 ac_confdir=`$as_dirname -- "$as_myself" ||
1320$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1321 X"$as_myself" : 'X\(//\)[^/]' \| \
1322 X"$as_myself" : 'X\(//\)$' \| \
1323 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1324$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\/\)[^/].*/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\/\)$/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\).*/{
1338 s//\1/
1339 q
1340 }
1341 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001342 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344 srcdir=..
1345 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346else
1347 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349if test ! -r "$srcdir/$ac_unique_file"; then
1350 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001351 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1354ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001355 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001356 pwd)`
1357# When building in place, set srcdir=.
1358if test "$ac_abs_confdir" = "$ac_pwd"; then
1359 srcdir=.
1360fi
1361# Remove unnecessary trailing slashes from srcdir.
1362# Double slashes in file names in object file debugging info
1363# mess up M-x gdb in Emacs.
1364case $srcdir in
1365*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1366esac
1367for ac_var in $ac_precious_vars; do
1368 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1369 eval ac_env_${ac_var}_value=\$${ac_var}
1370 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1371 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1372done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373
Martin v. Löwis11437992002-04-12 09:54:03 +00001374#
1375# Report the --help message.
1376#
1377if test "$ac_init_help" = "long"; then
1378 # Omit some internal or obsolete options to make the list less imposing.
1379 # This message is too long to be a string in the A/UX 3.1 sh.
1380 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001381\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382
1383Usage: $0 [OPTION]... [VAR=VALUE]...
1384
1385To assign environment variables (e.g., CC, CFLAGS...), specify them as
1386VAR=VALUE. See below for descriptions of some of the useful variables.
1387
1388Defaults for the options are specified in brackets.
1389
1390Configuration:
1391 -h, --help display this help and exit
1392 --help=short display options specific to this package
1393 --help=recursive display the short help of all the included packages
1394 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001395 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 --cache-file=FILE cache test results in FILE [disabled]
1397 -C, --config-cache alias for \`--cache-file=config.cache'
1398 -n, --no-create do not create output files
1399 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1400
Martin v. Löwis11437992002-04-12 09:54:03 +00001401Installation directories:
1402 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001403 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001405 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407By default, \`make install' will install all the files in
1408\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1409an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1410for instance \`--prefix=\$HOME'.
1411
1412For better control, use the options below.
1413
1414Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001415 --bindir=DIR user executables [EPREFIX/bin]
1416 --sbindir=DIR system admin executables [EPREFIX/sbin]
1417 --libexecdir=DIR program executables [EPREFIX/libexec]
1418 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1419 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1420 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1421 --libdir=DIR object code libraries [EPREFIX/lib]
1422 --includedir=DIR C header files [PREFIX/include]
1423 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1424 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1425 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1426 --infodir=DIR info documentation [DATAROOTDIR/info]
1427 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1428 --mandir=DIR man documentation [DATAROOTDIR/man]
1429 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1430 --htmldir=DIR html documentation [DOCDIR]
1431 --dvidir=DIR dvi documentation [DOCDIR]
1432 --pdfdir=DIR pdf documentation [DOCDIR]
1433 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434_ACEOF
1435
1436 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001437
1438System types:
1439 --build=BUILD configure for building on BUILD [guessed]
1440 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001441_ACEOF
1442fi
1443
1444if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001445 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001446 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001447 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 cat <<\_ACEOF
1449
1450Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001452 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1453 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001454 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001455 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --enable-framework[=INSTALLDIR]
1457 Build (MacOSX|Darwin) framework
1458 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001459 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001460 --enable-loadable-sqlite-extensions
1461 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --enable-ipv6 Enable ipv6 (with ipv4) support
1463 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001464 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
1467Optional Packages:
1468 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1469 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001470 --with-universal-archs=ARCH
1471 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001472 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001473 --with-framework-name=FRAMEWORK
1474 specify an alternate name of the framework built
1475 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001477 --with-cxx-main=<compiler>
1478 compile main() and link python executable with C++
1479 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --with-suffix=.exe set executable suffix
1481 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001482 --with-hash-algorithm=[fnv|siphash24]
1483 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001484 --with-address-sanitizer
1485 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001487 --with-system-expat build pyexpat module using an installed expat
1488 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001489 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001490 --with-system-libmpdec build _decimal module using an installed libmpdec
1491 library
Ned Deilyd819b932013-09-06 01:07:05 -07001492 --with-tcltk-includes='-I...'
1493 override search for Tcl and Tk include files
1494 --with-tcltk-libs='-L...'
1495 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001496 --with-dbmliborder=db1:db2:...
1497 order to check db backends for dbm. Valid value is a
1498 colon separated string with the backend names
1499 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with(out)-threads[=DIRECTORY]
1502 disable/enable thread support
1503 --with(out)-thread[=DIRECTORY]
1504 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001506 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001508 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-fpectl enable SIGFPE catching
1510 --with-libm=STRING math library
1511 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001512 --with(out)-computed-gotos
1513 Use computed gotos in evaluation loop (enabled by
1514 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001515 --with(out)-ensurepip=[=upgrade]
1516 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001517
1518Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001519 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 CC C compiler command
1521 CFLAGS C compiler flags
1522 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1523 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001524 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001525 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001528 PKG_CONFIG path to pkg-config utility
1529 PKG_CONFIG_PATH
1530 directories to add to pkg-config's search path
1531 PKG_CONFIG_LIBDIR
1532 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001533
1534Use these variables to override the choices made by `configure' or to help
1535it to find libraries and programs with nonstandard names/locations.
1536
Georg Brandle2e15612009-05-20 18:25:10 +00001537Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001538_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001540fi
1541
1542if test "$ac_init_help" = "recursive"; then
1543 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001545 test -d "$ac_dir" ||
1546 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1547 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 ac_builddir=.
1549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550case "$ac_dir" in
1551.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1552*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001553 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001555 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 case $ac_top_builddir_sub in
1557 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1558 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1559 esac ;;
1560esac
1561ac_abs_top_builddir=$ac_pwd
1562ac_abs_builddir=$ac_pwd$ac_dir_suffix
1563# for backward compatibility:
1564ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001565
1566case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 ac_top_srcdir=$ac_top_builddir_sub
1570 ac_abs_top_srcdir=$ac_pwd ;;
1571 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573 ac_top_srcdir=$srcdir
1574 ac_abs_top_srcdir=$srcdir ;;
1575 *) # Relative name.
1576 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1577 ac_top_srcdir=$ac_top_build_prefix$srcdir
1578 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001579esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 cd "$ac_dir" || { ac_status=$?; continue; }
1583 # Check for guested configure.
1584 if test -f "$ac_srcdir/configure.gnu"; then
1585 echo &&
1586 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1587 elif test -f "$ac_srcdir/configure"; then
1588 echo &&
1589 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001591 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 fi || ac_status=$?
1593 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 done
1595fi
1596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001598if $ac_init_version; then
1599 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001600python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001601generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001602
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001603Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001604This configure script is free software; the Free Software Foundation
1605gives unlimited permission to copy, distribute and modify it.
1606_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001609
1610## ------------------------ ##
1611## Autoconf initialization. ##
1612## ------------------------ ##
1613
1614# ac_fn_c_try_compile LINENO
1615# --------------------------
1616# Try to compile conftest.$ac_ext, and return whether this succeeded.
1617ac_fn_c_try_compile ()
1618{
1619 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1620 rm -f conftest.$ac_objext
1621 if { { ac_try="$ac_compile"
1622case "(($ac_try" in
1623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1624 *) ac_try_echo=$ac_try;;
1625esac
1626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1627$as_echo "$ac_try_echo"; } >&5
1628 (eval "$ac_compile") 2>conftest.err
1629 ac_status=$?
1630 if test -s conftest.err; then
1631 grep -v '^ *+' conftest.err >conftest.er1
1632 cat conftest.er1 >&5
1633 mv -f conftest.er1 conftest.err
1634 fi
1635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1636 test $ac_status = 0; } && {
1637 test -z "$ac_c_werror_flag" ||
1638 test ! -s conftest.err
1639 } && test -s conftest.$ac_objext; then :
1640 ac_retval=0
1641else
1642 $as_echo "$as_me: failed program was:" >&5
1643sed 's/^/| /' conftest.$ac_ext >&5
1644
1645 ac_retval=1
1646fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001647 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001648 as_fn_set_status $ac_retval
1649
1650} # ac_fn_c_try_compile
1651
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001652# ac_fn_c_try_cpp LINENO
1653# ----------------------
1654# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1655ac_fn_c_try_cpp ()
1656{
1657 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658 if { { ac_try="$ac_cpp conftest.$ac_ext"
1659case "(($ac_try" in
1660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1661 *) ac_try_echo=$ac_try;;
1662esac
1663eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1664$as_echo "$ac_try_echo"; } >&5
1665 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1666 ac_status=$?
1667 if test -s conftest.err; then
1668 grep -v '^ *+' conftest.err >conftest.er1
1669 cat conftest.er1 >&5
1670 mv -f conftest.er1 conftest.err
1671 fi
1672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1673 test $ac_status = 0; } > conftest.i && {
1674 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1675 test ! -s conftest.err
1676 }; then :
1677 ac_retval=0
1678else
1679 $as_echo "$as_me: failed program was:" >&5
1680sed 's/^/| /' conftest.$ac_ext >&5
1681
1682 ac_retval=1
1683fi
1684 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1685 as_fn_set_status $ac_retval
1686
1687} # ac_fn_c_try_cpp
1688
Matthias Kloseb9621712010-04-24 17:59:49 +00001689# ac_fn_c_try_link LINENO
1690# -----------------------
1691# Try to link conftest.$ac_ext, and return whether this succeeded.
1692ac_fn_c_try_link ()
1693{
1694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1695 rm -f conftest.$ac_objext conftest$ac_exeext
1696 if { { ac_try="$ac_link"
1697case "(($ac_try" in
1698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699 *) ac_try_echo=$ac_try;;
1700esac
1701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702$as_echo "$ac_try_echo"; } >&5
1703 (eval "$ac_link") 2>conftest.err
1704 ac_status=$?
1705 if test -s conftest.err; then
1706 grep -v '^ *+' conftest.err >conftest.er1
1707 cat conftest.er1 >&5
1708 mv -f conftest.er1 conftest.err
1709 fi
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; } && {
1712 test -z "$ac_c_werror_flag" ||
1713 test ! -s conftest.err
1714 } && test -s conftest$ac_exeext && {
1715 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001716 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001717 }; then :
1718 ac_retval=0
1719else
1720 $as_echo "$as_me: failed program was:" >&5
1721sed 's/^/| /' conftest.$ac_ext >&5
1722
1723 ac_retval=1
1724fi
1725 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1726 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1727 # interfere with the next link command; also delete a directory that is
1728 # left behind by Apple's compiler. We do this before executing the actions.
1729 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001730 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 as_fn_set_status $ac_retval
1732
1733} # ac_fn_c_try_link
1734
Matthias Kloseb9621712010-04-24 17:59:49 +00001735# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1736# -------------------------------------------------------
1737# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1738# the include files in INCLUDES and setting the cache variable VAR
1739# accordingly.
1740ac_fn_c_check_header_mongrel ()
1741{
1742 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001743 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1745$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001746if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001747 $as_echo_n "(cached) " >&6
1748fi
1749eval ac_res=\$$3
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1751$as_echo "$ac_res" >&6; }
1752else
1753 # Is the header compilable?
1754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1755$as_echo_n "checking $2 usability... " >&6; }
1756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1757/* end confdefs.h. */
1758$4
1759#include <$2>
1760_ACEOF
1761if ac_fn_c_try_compile "$LINENO"; then :
1762 ac_header_compiler=yes
1763else
1764 ac_header_compiler=no
1765fi
1766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1768$as_echo "$ac_header_compiler" >&6; }
1769
1770# Is the header present?
1771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1772$as_echo_n "checking $2 presence... " >&6; }
1773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1774/* end confdefs.h. */
1775#include <$2>
1776_ACEOF
1777if ac_fn_c_try_cpp "$LINENO"; then :
1778 ac_header_preproc=yes
1779else
1780 ac_header_preproc=no
1781fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001782rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1784$as_echo "$ac_header_preproc" >&6; }
1785
1786# So? What about this header?
1787case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1788 yes:no: )
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1790$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1792$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1793 ;;
1794 no:yes:* )
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1796$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1798$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1800$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1802$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1804$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001806## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001807## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001808 ) | sed "s/^/$as_me: WARNING: /" >&2
1809 ;;
1810esac
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001813if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 $as_echo_n "(cached) " >&6
1815else
1816 eval "$3=\$ac_header_compiler"
1817fi
1818eval ac_res=\$$3
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1820$as_echo "$ac_res" >&6; }
1821fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001822 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001823
1824} # ac_fn_c_check_header_mongrel
1825
1826# ac_fn_c_try_run LINENO
1827# ----------------------
1828# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1829# that executables *can* be run.
1830ac_fn_c_try_run ()
1831{
1832 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1833 if { { ac_try="$ac_link"
1834case "(($ac_try" in
1835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1836 *) ac_try_echo=$ac_try;;
1837esac
1838eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1839$as_echo "$ac_try_echo"; } >&5
1840 (eval "$ac_link") 2>&5
1841 ac_status=$?
1842 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1843 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1844 { { case "(($ac_try" in
1845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1846 *) ac_try_echo=$ac_try;;
1847esac
1848eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1849$as_echo "$ac_try_echo"; } >&5
1850 (eval "$ac_try") 2>&5
1851 ac_status=$?
1852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1853 test $ac_status = 0; }; }; then :
1854 ac_retval=0
1855else
1856 $as_echo "$as_me: program exited with status $ac_status" >&5
1857 $as_echo "$as_me: failed program was:" >&5
1858sed 's/^/| /' conftest.$ac_ext >&5
1859
1860 ac_retval=$ac_status
1861fi
1862 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001864 as_fn_set_status $ac_retval
1865
1866} # ac_fn_c_try_run
1867
1868# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1869# -------------------------------------------------------
1870# Tests whether HEADER exists and can be compiled using the include files in
1871# INCLUDES, setting the cache variable VAR accordingly.
1872ac_fn_c_check_header_compile ()
1873{
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1876$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001877if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001878 $as_echo_n "(cached) " >&6
1879else
1880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1881/* end confdefs.h. */
1882$4
1883#include <$2>
1884_ACEOF
1885if ac_fn_c_try_compile "$LINENO"; then :
1886 eval "$3=yes"
1887else
1888 eval "$3=no"
1889fi
1890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1891fi
1892eval ac_res=\$$3
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1894$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001896
1897} # ac_fn_c_check_header_compile
1898
Matthias Kloseb9621712010-04-24 17:59:49 +00001899# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1900# -------------------------------------------
1901# Tests whether TYPE exists after having included INCLUDES, setting cache
1902# variable VAR accordingly.
1903ac_fn_c_check_type ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1907$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 $as_echo_n "(cached) " >&6
1910else
1911 eval "$3=no"
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$4
1915int
1916main ()
1917{
1918if (sizeof ($2))
1919 return 0;
1920 ;
1921 return 0;
1922}
1923_ACEOF
1924if ac_fn_c_try_compile "$LINENO"; then :
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$4
1928int
1929main ()
1930{
1931if (sizeof (($2)))
1932 return 0;
1933 ;
1934 return 0;
1935}
1936_ACEOF
1937if ac_fn_c_try_compile "$LINENO"; then :
1938
1939else
1940 eval "$3=yes"
1941fi
1942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1943fi
1944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1945fi
1946eval ac_res=\$$3
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001949 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001950
1951} # ac_fn_c_check_type
1952
1953# ac_fn_c_find_uintX_t LINENO BITS VAR
1954# ------------------------------------
1955# Finds an unsigned integer type with width BITS, setting cache variable VAR
1956# accordingly.
1957ac_fn_c_find_uintX_t ()
1958{
1959 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1961$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001962if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001963 $as_echo_n "(cached) " >&6
1964else
1965 eval "$3=no"
1966 # Order is important - never check a type that is potentially smaller
1967 # than half of the expected target width.
1968 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1969 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$ac_includes_default
1973int
1974main ()
1975{
1976static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001977test_array [0] = 0;
1978return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980 ;
1981 return 0;
1982}
1983_ACEOF
1984if ac_fn_c_try_compile "$LINENO"; then :
1985 case $ac_type in #(
1986 uint$2_t) :
1987 eval "$3=yes" ;; #(
1988 *) :
1989 eval "$3=\$ac_type" ;;
1990esac
1991fi
1992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001993 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001994
1995else
1996 break
1997fi
1998 done
1999fi
2000eval ac_res=\$$3
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002003 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002004
2005} # ac_fn_c_find_uintX_t
2006
2007# ac_fn_c_find_intX_t LINENO BITS VAR
2008# -----------------------------------
2009# Finds a signed integer type with width BITS, setting cache variable VAR
2010# accordingly.
2011ac_fn_c_find_intX_t ()
2012{
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2015$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002016if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002017 $as_echo_n "(cached) " >&6
2018else
2019 eval "$3=no"
2020 # Order is important - never check a type that is potentially smaller
2021 # than half of the expected target width.
2022 for ac_type in int$2_t 'int' 'long int' \
2023 'long long int' 'short int' 'signed char'; do
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 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002032test_array [0] = 0;
2033return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002043 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002044int
2045main ()
2046{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002047static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002048 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057
2058else
2059 case $ac_type in #(
2060 int$2_t) :
2061 eval "$3=yes" ;; #(
2062 *) :
2063 eval "$3=\$ac_type" ;;
2064esac
2065fi
2066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2067fi
2068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002069 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002070
2071else
2072 break
2073fi
2074 done
2075fi
2076eval ac_res=\$$3
2077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2078$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002079 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081} # ac_fn_c_find_intX_t
2082
2083# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2084# --------------------------------------------
2085# Tries to find the compile-time value of EXPR in a program that includes
2086# INCLUDES, setting VAR accordingly. Returns whether the value could be
2087# computed
2088ac_fn_c_compute_int ()
2089{
2090 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2091 if test "$cross_compiling" = yes; then
2092 # Depending upon the size, compute the lo and hi bounds.
2093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_lo=0 ac_mid=0
2109 while :; do
2110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111/* end confdefs.h. */
2112$4
2113int
2114main ()
2115{
2116static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002117test_array [0] = 0;
2118return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002119
2120 ;
2121 return 0;
2122}
2123_ACEOF
2124if ac_fn_c_try_compile "$LINENO"; then :
2125 ac_hi=$ac_mid; break
2126else
2127 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2128 if test $ac_lo -le $ac_mid; then
2129 ac_lo= ac_hi=
2130 break
2131 fi
2132 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2133fi
2134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135 done
2136else
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138/* end confdefs.h. */
2139$4
2140int
2141main ()
2142{
2143static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002144test_array [0] = 0;
2145return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_compile "$LINENO"; then :
2152 ac_hi=-1 ac_mid=-1
2153 while :; do
2154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155/* end confdefs.h. */
2156$4
2157int
2158main ()
2159{
2160static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002161test_array [0] = 0;
2162return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002163
2164 ;
2165 return 0;
2166}
2167_ACEOF
2168if ac_fn_c_try_compile "$LINENO"; then :
2169 ac_lo=$ac_mid; break
2170else
2171 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2172 if test $ac_mid -le $ac_hi; then
2173 ac_lo= ac_hi=
2174 break
2175 fi
2176 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2177fi
2178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179 done
2180else
2181 ac_lo= ac_hi=
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184fi
2185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186# Binary search between lo and hi bounds.
2187while test "x$ac_lo" != "x$ac_hi"; do
2188 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191$4
2192int
2193main ()
2194{
2195static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002196test_array [0] = 0;
2197return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002198
2199 ;
2200 return 0;
2201}
2202_ACEOF
2203if ac_fn_c_try_compile "$LINENO"; then :
2204 ac_hi=$ac_mid
2205else
2206 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2207fi
2208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2209done
2210case $ac_lo in #((
2211?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2212'') ac_retval=1 ;;
2213esac
2214 else
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217$4
2218static long int longval () { return $2; }
2219static unsigned long int ulongval () { return $2; }
2220#include <stdio.h>
2221#include <stdlib.h>
2222int
2223main ()
2224{
2225
2226 FILE *f = fopen ("conftest.val", "w");
2227 if (! f)
2228 return 1;
2229 if (($2) < 0)
2230 {
2231 long int i = longval ();
2232 if (i != ($2))
2233 return 1;
2234 fprintf (f, "%ld", i);
2235 }
2236 else
2237 {
2238 unsigned long int i = ulongval ();
2239 if (i != ($2))
2240 return 1;
2241 fprintf (f, "%lu", i);
2242 }
2243 /* Do not output a trailing newline, as this causes \r\n confusion
2244 on some platforms. */
2245 return ferror (f) || fclose (f) != 0;
2246
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251if ac_fn_c_try_run "$LINENO"; then :
2252 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2253else
2254 ac_retval=1
2255fi
2256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2257 conftest.$ac_objext conftest.beam conftest.$ac_ext
2258rm -f conftest.val
2259
2260 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002261 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002262 as_fn_set_status $ac_retval
2263
2264} # ac_fn_c_compute_int
2265
2266# ac_fn_c_check_func LINENO FUNC VAR
2267# ----------------------------------
2268# Tests whether FUNC exists, setting the cache variable VAR accordingly
2269ac_fn_c_check_func ()
2270{
2271 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2273$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002274if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002275 $as_echo_n "(cached) " >&6
2276else
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h. */
2279/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2280 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2281#define $2 innocuous_$2
2282
2283/* System header to define __stub macros and hopefully few prototypes,
2284 which can conflict with char $2 (); below.
2285 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2286 <limits.h> exists even on freestanding compilers. */
2287
2288#ifdef __STDC__
2289# include <limits.h>
2290#else
2291# include <assert.h>
2292#endif
2293
2294#undef $2
2295
2296/* Override any GCC internal prototype to avoid an error.
2297 Use char because int might match the return type of a GCC
2298 builtin and then its argument prototype would still apply. */
2299#ifdef __cplusplus
2300extern "C"
2301#endif
2302char $2 ();
2303/* The GNU C library defines this for functions which it implements
2304 to always fail with ENOSYS. Some functions are actually named
2305 something starting with __ and the normal name is an alias. */
2306#if defined __stub_$2 || defined __stub___$2
2307choke me
2308#endif
2309
2310int
2311main ()
2312{
2313return $2 ();
2314 ;
2315 return 0;
2316}
2317_ACEOF
2318if ac_fn_c_try_link "$LINENO"; then :
2319 eval "$3=yes"
2320else
2321 eval "$3=no"
2322fi
2323rm -f core conftest.err conftest.$ac_objext \
2324 conftest$ac_exeext conftest.$ac_ext
2325fi
2326eval ac_res=\$$3
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2328$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002329 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002330
2331} # ac_fn_c_check_func
2332
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002333# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2334# ---------------------------------------------
2335# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2336# accordingly.
2337ac_fn_c_check_decl ()
2338{
2339 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2340 as_decl_name=`echo $2|sed 's/ *(.*//'`
2341 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2343$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2344if eval \${$3+:} false; then :
2345 $as_echo_n "(cached) " >&6
2346else
2347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h. */
2349$4
2350int
2351main ()
2352{
2353#ifndef $as_decl_name
2354#ifdef __cplusplus
2355 (void) $as_decl_use;
2356#else
2357 (void) $as_decl_name;
2358#endif
2359#endif
2360
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365if ac_fn_c_try_compile "$LINENO"; then :
2366 eval "$3=yes"
2367else
2368 eval "$3=no"
2369fi
2370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371fi
2372eval ac_res=\$$3
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2374$as_echo "$ac_res" >&6; }
2375 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2376
2377} # ac_fn_c_check_decl
2378
Matthias Kloseb9621712010-04-24 17:59:49 +00002379# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2380# ----------------------------------------------------
2381# Tries to find if the field MEMBER exists in type AGGR, after including
2382# INCLUDES, setting cache variable VAR accordingly.
2383ac_fn_c_check_member ()
2384{
2385 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2387$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002388if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002389 $as_echo_n "(cached) " >&6
2390else
2391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h. */
2393$5
2394int
2395main ()
2396{
2397static $2 ac_aggr;
2398if (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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2408/* end confdefs.h. */
2409$5
2410int
2411main ()
2412{
2413static $2 ac_aggr;
2414if (sizeof ac_aggr.$3)
2415return 0;
2416 ;
2417 return 0;
2418}
2419_ACEOF
2420if ac_fn_c_try_compile "$LINENO"; then :
2421 eval "$4=yes"
2422else
2423 eval "$4=no"
2424fi
2425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2426fi
2427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2428fi
2429eval ac_res=\$$4
2430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2431$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002432 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002433
2434} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002436This file contains any messages produced by compilers while
2437running configure, to aid debugging if configure makes a mistake.
2438
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002439It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002440generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442 $ $0 $@
2443
2444_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002446{
2447cat <<_ASUNAME
2448## --------- ##
2449## Platform. ##
2450## --------- ##
2451
2452hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2453uname -m = `(uname -m) 2>/dev/null || echo unknown`
2454uname -r = `(uname -r) 2>/dev/null || echo unknown`
2455uname -s = `(uname -s) 2>/dev/null || echo unknown`
2456uname -v = `(uname -v) 2>/dev/null || echo unknown`
2457
2458/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2459/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2460
2461/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2462/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2463/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002465/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2466/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2467/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2468
2469_ASUNAME
2470
2471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2472for as_dir in $PATH
2473do
2474 IFS=$as_save_IFS
2475 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 $as_echo "PATH: $as_dir"
2477 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002479
2480} >&5
2481
2482cat >&5 <<_ACEOF
2483
2484
2485## ----------- ##
2486## Core tests. ##
2487## ----------- ##
2488
2489_ACEOF
2490
2491
2492# Keep a trace of the command line.
2493# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002494# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002495# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002496# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002497ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002498ac_configure_args0=
2499ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002500ac_must_keep_next=false
2501for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002502do
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 for ac_arg
2504 do
2505 case $ac_arg in
2506 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2507 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2508 | -silent | --silent | --silen | --sile | --sil)
2509 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 esac
2513 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002518 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002520 case $ac_arg in
2521 *=* | --config-cache | -C | -disable-* | --disable-* \
2522 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2523 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2524 | -with-* | --with-* | -without-* | --without-* | --x)
2525 case "$ac_configure_args0 " in
2526 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2527 esac
2528 ;;
2529 -* ) ac_must_keep_next=true ;;
2530 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002533 ;;
2534 esac
2535 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002536done
Matthias Kloseb9621712010-04-24 17:59:49 +00002537{ ac_configure_args0=; unset ac_configure_args0;}
2538{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
2540# When interrupted or exit'd, cleanup temporary files, and complete
2541# config.log. We remove comments because anyway the quotes in there
2542# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543# WARNING: Use '\'' to represent an apostrophe within the trap.
2544# 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 +00002545trap 'exit_status=$?
2546 # Save into config.log some information that might help in debugging.
2547 {
2548 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002549
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002551## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 echo
2554 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555(
2556 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2557 eval ac_val=\$$ac_var
2558 case $ac_val in #(
2559 *${as_nl}*)
2560 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002561 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2562$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 esac
2564 case $ac_var in #(
2565 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002566 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2567 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac ;;
2569 esac
2570 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2573 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 "s/'\''/'\''\\\\'\'''\''/g;
2576 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2577 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002578 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002580 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581 esac |
2582 sort
2583)
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002585
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002587## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002589 echo
2590 for ac_var in $ac_subst_vars
2591 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 eval ac_val=\$$ac_var
2593 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002597 done | sort
2598 echo
2599
2600 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002603## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002604 echo
2605 for ac_var in $ac_subst_files
2606 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 eval ac_val=\$$ac_var
2608 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002612 done | sort
2613 echo
2614 fi
2615
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002617 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002618## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002619## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 echo
2623 fi
2624 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 $as_echo "$as_me: caught signal $ac_signal"
2626 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 rm -f core *.core core.conftest.* &&
2629 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002632for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002634done
2635ac_signal=0
2636
2637# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002639
Matthias Kloseb9621712010-04-24 17:59:49 +00002640$as_echo "/* confdefs.h */" > confdefs.h
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642# Predefined preprocessor variables.
2643
2644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_NAME "$PACKAGE_NAME"
2646_ACEOF
2647
Martin v. Löwis11437992002-04-12 09:54:03 +00002648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2650_ACEOF
2651
Martin v. Löwis11437992002-04-12 09:54:03 +00002652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_VERSION "$PACKAGE_VERSION"
2654_ACEOF
2655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_STRING "$PACKAGE_STRING"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2662_ACEOF
2663
Matthias Kloseb9621712010-04-24 17:59:49 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_URL "$PACKAGE_URL"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668
2669# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670# Prefer an explicitly selected file to automatically selected ones.
2671ac_site_file1=NONE
2672ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002674 # We do not want a PATH search for config.site.
2675 case $CONFIG_SITE in #((
2676 -*) ac_site_file1=./$CONFIG_SITE;;
2677 */*) ac_site_file1=$CONFIG_SITE;;
2678 *) ac_site_file1=./$CONFIG_SITE;;
2679 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 ac_site_file1=$prefix/share/config.site
2682 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683else
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 ac_site_file1=$ac_default_prefix/share/config.site
2685 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002687for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688do
Matthias Kloseb9621712010-04-24 17:59:49 +00002689 test "x$ac_site_file" = xNONE && continue
2690 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2692$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002694 . "$ac_site_file" \
2695 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2697as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002698See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699 fi
2700done
2701
2702if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002703 # Some versions of bash will fail to source /dev/null (special files
2704 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2705 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2707$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2710 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 esac
2712 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002713else
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2715$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 >$cache_file
2717fi
2718
2719# Check that the precious variables saved in the cache have kept the same
2720# value.
2721ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002722for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2724 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2726 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 case $ac_old_set,$ac_new_set in
2728 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002729 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2730$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 +00002731 ac_cache_corrupted=: ;;
2732 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2734$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 ac_cache_corrupted=: ;;
2736 ,);;
2737 *)
2738 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002739 # differences in whitespace do not lead to failure.
2740 ac_old_val_w=`echo x $ac_old_val`
2741 ac_new_val_w=`echo x $ac_new_val`
2742 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2744$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2745 ac_cache_corrupted=:
2746 else
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2748$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2749 eval $ac_var=\$ac_old_val
2750 fi
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2752$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2754$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 fi;;
2756 esac
2757 # Pass precious variables to config.status.
2758 if test "$ac_new_set" = set; then
2759 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002760 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 *) ac_arg=$ac_var=$ac_new_val ;;
2762 esac
2763 case " $ac_configure_args " in
2764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 esac
2767 fi
2768done
2769if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002770 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2771$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2773$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002774 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002776## -------------------- ##
2777## Main body of script. ##
2778## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002779
Guido van Rossum7f43da71994-08-01 12:15:30 +00002780ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002781ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002782ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2783ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2784ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002785
Guido van Rossum627b2d71993-12-24 10:39:16 +00002786
Michael W. Hudson54241132001-12-07 15:38:26 +00002787
Trent Nelson4d4ec652012-10-16 08:51:24 -04002788
Trent Nelson5595ab52012-10-17 04:47:31 -04002789if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002790 # If we're building out-of-tree, we need to make sure the following
2791 # resources get picked up before their $srcdir counterparts.
2792 # Objects/ -> typeslots.inc
2793 # Include/ -> Python-ast.h, graminit.h
2794 # Python/ -> importlib.h
2795 # (A side effect of this is that these resources will automatically be
2796 # regenerated when building out-of-tree, regardless of whether or not
2797 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2798 # off.)
2799 BASECPPFLAGS="-IObjects -IInclude -IPython"
2800else
2801 BASECPPFLAGS=""
2802fi
2803
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804
2805
2806
2807
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002808if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002809then
2810# Extract the first word of "hg", so it can be a program name with args.
2811set dummy hg; ac_word=$2
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2813$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002814if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002815 $as_echo_n "(cached) " >&6
2816else
2817 if test -n "$HAS_HG"; then
2818 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2819else
2820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2821for as_dir in $PATH
2822do
2823 IFS=$as_save_IFS
2824 test -z "$as_dir" && as_dir=.
2825 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827 ac_cv_prog_HAS_HG="found"
2828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2829 break 2
2830 fi
2831done
2832 done
2833IFS=$as_save_IFS
2834
2835 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2836fi
2837fi
2838HAS_HG=$ac_cv_prog_HAS_HG
2839if test -n "$HAS_HG"; then
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2841$as_echo "$HAS_HG" >&6; }
2842else
2843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2844$as_echo "no" >&6; }
2845fi
2846
2847
2848else
2849HAS_HG=no-repository
2850fi
2851if test $HAS_HG = found
2852then
2853 HGVERSION="hg id -i \$(srcdir)"
2854 HGTAG="hg id -t \$(srcdir)"
2855 HGBRANCH="hg id -b \$(srcdir)"
2856else
2857 HGVERSION=""
2858 HGTAG=""
2859 HGBRANCH=""
2860fi
2861
2862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002863ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002864
2865
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002866ac_aux_dir=
2867for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2868 if test -f "$ac_dir/install-sh"; then
2869 ac_aux_dir=$ac_dir
2870 ac_install_sh="$ac_aux_dir/install-sh -c"
2871 break
2872 elif test -f "$ac_dir/install.sh"; then
2873 ac_aux_dir=$ac_dir
2874 ac_install_sh="$ac_aux_dir/install.sh -c"
2875 break
2876 elif test -f "$ac_dir/shtool"; then
2877 ac_aux_dir=$ac_dir
2878 ac_install_sh="$ac_aux_dir/shtool install -c"
2879 break
2880 fi
2881done
2882if test -z "$ac_aux_dir"; then
2883 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2884fi
2885
2886# These three variables are undocumented and unsupported,
2887# and are intended to be withdrawn in a future Autoconf release.
2888# They can cause serious problems if a builder's source tree is in a directory
2889# whose full name contains unusual characters.
2890ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2891ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2892ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2893
2894
2895# Make sure we can run config.sub.
2896$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2897 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2898
2899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2900$as_echo_n "checking build system type... " >&6; }
2901if ${ac_cv_build+:} false; then :
2902 $as_echo_n "(cached) " >&6
2903else
2904 ac_build_alias=$build_alias
2905test "x$ac_build_alias" = x &&
2906 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2907test "x$ac_build_alias" = x &&
2908 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2909ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2910 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2911
2912fi
2913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2914$as_echo "$ac_cv_build" >&6; }
2915case $ac_cv_build in
2916*-*-*) ;;
2917*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2918esac
2919build=$ac_cv_build
2920ac_save_IFS=$IFS; IFS='-'
2921set x $ac_cv_build
2922shift
2923build_cpu=$1
2924build_vendor=$2
2925shift; shift
2926# Remember, the first character of IFS is used to create $*,
2927# except with old shells:
2928build_os=$*
2929IFS=$ac_save_IFS
2930case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2931
2932
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2934$as_echo_n "checking host system type... " >&6; }
2935if ${ac_cv_host+:} false; then :
2936 $as_echo_n "(cached) " >&6
2937else
2938 if test "x$host_alias" = x; then
2939 ac_cv_host=$ac_cv_build
2940else
2941 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2942 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2943fi
2944
2945fi
2946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2947$as_echo "$ac_cv_host" >&6; }
2948case $ac_cv_host in
2949*-*-*) ;;
2950*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2951esac
2952host=$ac_cv_host
2953ac_save_IFS=$IFS; IFS='-'
2954set x $ac_cv_host
2955shift
2956host_cpu=$1
2957host_vendor=$2
2958shift; shift
2959# Remember, the first character of IFS is used to create $*,
2960# except with old shells:
2961host_os=$*
2962IFS=$ac_save_IFS
2963case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2964
2965
2966
doko@python.orga10e4a92013-01-25 18:45:12 +01002967
2968
Ned Deilyfcbc2462014-08-22 13:32:49 -07002969# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2970rm -f pybuilddir.txt
2971
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002972if test "$cross_compiling" = yes; then
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2974$as_echo_n "checking for python interpreter for cross build... " >&6; }
2975 if test -z "$PYTHON_FOR_BUILD"; then
2976 for interp in python$PACKAGE_VERSION python3 python; do
2977 which $interp >/dev/null 2>&1 || continue
2978 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2979 break
2980 fi
2981 interp=
2982 done
2983 if test x$interp = x; then
2984 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2985 fi
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2987$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002988 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 +02002989 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002990elif test "$cross_compiling" = maybe; then
2991 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002992else
2993 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2994fi
2995
2996
Martin v. Löwis11437992002-04-12 09:54:03 +00002997
Benjamin Petersond23f8222009-04-05 19:13:16 +00002998if test "$prefix" != "/"; then
2999 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3000fi
3001
3002
Martin v. Löwis11437992002-04-12 09:54:03 +00003003
3004
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003005# We don't use PACKAGE_ variables, and they cause conflicts
3006# with other autoconf-based packages that include Python.h
3007grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3008rm confdefs.h
3009mv confdefs.h.new confdefs.h
3010
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003011
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003012VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003013
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003014# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003015
3016SOVERSION=1.0
3017
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003018# The later defininition of _XOPEN_SOURCE disables certain features
3019# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003022
3023
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003024# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3025# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3026# them.
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003029
3030
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003031# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3032# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3033# them.
3034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003036
3037
Martin v. Löwisd6320502004-08-12 13:45:08 +00003038# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3039# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3040
Matthias Kloseb9621712010-04-24 17:59:49 +00003041$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003042
3043
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003044# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3045# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3046# them.
3047
Matthias Kloseb9621712010-04-24 17:59:49 +00003048$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003049
3050
3051
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003052define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003053
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003054# Arguments passed to configure.
3055
3056CONFIG_ARGS="$ac_configure_args"
3057
Matthias Kloseb9621712010-04-24 17:59:49 +00003058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3059$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003061if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003063 case $enableval in
3064 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065 # Locate the best usable SDK, see Mac/README.txt for more
3066 # information
3067 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003068 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003070 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3071 if test ! -d "${enableval}"
3072 then
3073 enableval=/
3074 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003075 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003076 ;;
3077 esac
3078 case $enableval in
3079 no)
3080 UNIVERSALSDK=
3081 enable_universalsdk=
3082 ;;
3083 *)
3084 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085 if test ! -d "${UNIVERSALSDK}"
3086 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003087 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089 ;;
3090 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003091
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003092
Thomas Wouters477c8d52006-05-27 19:21:47 +00003093else
3094
3095 UNIVERSALSDK=
3096 enable_universalsdk=
3097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003098fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003099
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003100if test -n "${UNIVERSALSDK}"
3101then
Matthias Kloseb9621712010-04-24 17:59:49 +00003102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3103$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003104else
Matthias Kloseb9621712010-04-24 17:59:49 +00003105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3106$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003107fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003110
Ned Deily87adb6e2013-10-18 21:09:56 -07003111ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003112
Ned Deilycbfb9a52012-06-23 16:02:19 -07003113# For backward compatibility reasons we prefer to select '32-bit' if available,
3114# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003115UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003116if test "`uname -s`" = "Darwin"
3117then
3118 if test -n "${UNIVERSALSDK}"
3119 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003120 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003121 then
3122 UNIVERSAL_ARCHS="intel"
3123 fi
3124 fi
3125fi
3126
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003127
Matthias Kloseb9621712010-04-24 17:59:49 +00003128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3129$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003130
3131# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003132if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003133 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134 UNIVERSAL_ARCHS="$withval"
3135
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003136fi
3137
Ned Deily87adb6e2013-10-18 21:09:56 -07003138if test -n "${UNIVERSALSDK}"
3139then
3140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3141$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3142else
3143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3144$as_echo "no" >&6; }
3145fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003146
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003147
3148# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003149if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003150 withval=$with_framework_name;
3151 PYTHONFRAMEWORK=${withval}
3152 PYTHONFRAMEWORKDIR=${withval}.framework
3153 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3154
3155else
3156
3157 PYTHONFRAMEWORK=Python
3158 PYTHONFRAMEWORKDIR=Python.framework
3159 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3160
3161fi
3162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003164if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003165 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003166 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003167 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003168 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003169 esac
3170 case $enableval in
3171 no)
3172 PYTHONFRAMEWORK=
3173 PYTHONFRAMEWORKDIR=no-framework
3174 PYTHONFRAMEWORKPREFIX=
3175 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003176 FRAMEWORKINSTALLFIRST=
3177 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003178 FRAMEWORKALTINSTALLFIRST=
3179 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003180 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003181 if test "x${prefix}" = "xNONE"; then
3182 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3183 else
3184 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3185 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003187 ;;
3188 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003189 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003190 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003192 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003193 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3194 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003195 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003196 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003197
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003198 if test "x${prefix}" = "xNONE" ; then
3199 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003200
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003201 else
3202 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3203 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003204
3205 case "${enableval}" in
3206 /System*)
3207 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3208 if test "${prefix}" = "NONE" ; then
3209 # See below
3210 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3211 fi
3212 ;;
3213
3214 /Library*)
3215 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3216 ;;
3217
3218 */Library/Frameworks)
3219 MDIR="`dirname "${enableval}"`"
3220 MDIR="`dirname "${MDIR}"`"
3221 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3222
3223 if test "${prefix}" = "NONE"; then
3224 # User hasn't specified the
3225 # --prefix option, but wants to install
3226 # the framework in a non-default location,
3227 # ensure that the compatibility links get
3228 # installed relative to that prefix as well
3229 # instead of in /usr/local.
3230 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3231 fi
3232 ;;
3233
3234 *)
3235 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3236 ;;
3237 esac
3238
Jack Jansen127e56e2001-09-11 14:41:54 +00003239 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003241 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003242 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003245 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003246
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003247 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3248
3249 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3250
Jack Jansene578a632001-08-15 01:27:14 +00003251 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003252
Guido van Rossum563e7081996-09-10 18:20:48 +00003253else
Martin v. Löwis11437992002-04-12 09:54:03 +00003254
Jack Jansene578a632001-08-15 01:27:14 +00003255 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003256 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003257 PYTHONFRAMEWORKPREFIX=
3258 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003259 FRAMEWORKINSTALLFIRST=
3260 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003261 FRAMEWORKALTINSTALLFIRST=
3262 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003263 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003264 if test "x${prefix}" = "xNONE" ; then
3265 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3266 else
3267 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3268 fi
Jack Jansene578a632001-08-15 01:27:14 +00003269 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272fi
3273
Thomas Wouters477c8d52006-05-27 19:21:47 +00003274
3275
Michael W. Hudson54241132001-12-07 15:38:26 +00003276
3277
3278
3279
Jack Jansene578a632001-08-15 01:27:14 +00003280
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003281
3282
3283
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003284
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003285
Ned Deilyb8f944f2013-11-21 22:42:25 -08003286
Jack Jansene578a632001-08-15 01:27:14 +00003287##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003288## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003289## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003290##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291# Set name for machine-dependent library files
3292
Matthias Kloseb9621712010-04-24 17:59:49 +00003293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3294$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003295if test -z "$MACHDEP"
3296then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 # avoid using uname for cross builds
3298 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003299 # ac_sys_system and ac_sys_release are used for setting
3300 # a lot of different things including 'define_xopen_source'
3301 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003302 case "$host" in
3303 *-*-linux*)
3304 ac_sys_system=Linux
3305 ;;
3306 *-*-cygwin*)
3307 ac_sys_system=Cygwin
3308 ;;
3309 *)
3310 # for now, limit cross builds to known configurations
3311 MACHDEP="unknown"
3312 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3313 esac
3314 ac_sys_release=
3315 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003316 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003317 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003318 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003319 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003320 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003321 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003322 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003323 fi
3324 ac_md_system=`echo $ac_sys_system |
3325 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3326 ac_md_release=`echo $ac_sys_release |
3327 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3328 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003329
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003330 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003331 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003332 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003333 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003334 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003335 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003336 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003337fi
Guido van Rossum91922671997-10-09 20:24:13 +00003338
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003339
3340if test "$cross_compiling" = yes; then
3341 case "$host" in
3342 *-*-linux*)
3343 case "$host_cpu" in
3344 arm*)
3345 _host_cpu=arm
3346 ;;
3347 *)
3348 _host_cpu=$host_cpu
3349 esac
3350 ;;
3351 *-*-cygwin*)
3352 _host_cpu=
3353 ;;
3354 *)
3355 # for now, limit cross builds to known configurations
3356 MACHDEP="unknown"
3357 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3358 esac
3359 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3360fi
3361
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003362# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3363# disable features if it is defined, without any means to access these
3364# features as extensions. For these systems, we skip the definition of
3365# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3366# some feature, make sure there is no alternative way to access this
3367# feature. Also, when using wildcards, make sure you have verified the
3368# need for not defining _XOPEN_SOURCE on all systems matching the
3369# wildcard, and that the wildcard does not include future systems
3370# (which may remove their limitations).
3371case $ac_sys_system/$ac_sys_release in
3372 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3373 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003374 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003375 # In addition, Stefan Krah confirms that issue #1244610 exists through
3376 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003377 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003378 define_xopen_source=no
3379 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3380 # also defined. This can be overridden by defining _BSD_SOURCE
3381 # As this has a different meaning on Linux, only define it on OpenBSD
3382
Matthias Kloseb9621712010-04-24 17:59:49 +00003383$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003384
3385 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003386 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003387 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3388 # also defined. This can be overridden by defining _BSD_SOURCE
3389 # As this has a different meaning on Linux, only define it on OpenBSD
3390
Matthias Kloseb9621712010-04-24 17:59:49 +00003391$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003392
3393 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003394 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3395 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3396 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003397 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 +00003398 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003399 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3400 # request to enable features supported by the standard as a request
3401 # to disable features not supported by the standard. The best way
3402 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3403 # entirely and define __EXTENSIONS__ instead.
3404 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003405 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003406 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3407 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003408 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003409 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003410 define_xopen_source=no;;
3411 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003412 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003413 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003414 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003415 # On FreeBSD 4, the math functions C89 does not cover are never defined
3416 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3417 FreeBSD/4.*)
3418 define_xopen_source=no;;
3419 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3420 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3421 # identifies itself as Darwin/7.*
3422 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3423 # disables platform specific features beyond repair.
3424 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3425 # has no effect, don't bother defining them
3426 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003427 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003428 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003429 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003430 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3431 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3432 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003433 AIX/4)
3434 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003435 AIX/5)
3436 if test `uname -r` -eq 1; then
3437 define_xopen_source=no
3438 fi
3439 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003440 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3441 # defining NI_NUMERICHOST.
3442 QNX/6.3.2)
3443 define_xopen_source=no
3444 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003445
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003446esac
3447
3448if test $define_xopen_source = yes
3449then
Victor Stinner14d098d2011-09-07 22:29:43 +02003450 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003451
Victor Stinner14d098d2011-09-07 22:29:43 +02003452$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003453
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003454
3455 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3456 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3457 # several APIs are not declared. Since this is also needed in some
3458 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
Matthias Kloseb9621712010-04-24 17:59:49 +00003460$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003461
3462
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003463
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003464$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003466fi
3467
Christian Heimes647cd872013-12-07 23:39:33 +01003468# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3469case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003470 hp*|HP*)
3471 define_stdc_a1=yes;;
3472 *)
3473 define_stdc_a1=no;;
3474esac
3475
3476if test $define_stdc_a1 = yes
3477then
Christian Heimes647cd872013-12-07 23:39:33 +01003478
3479$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3480
Christian Heimesb02bcae2013-12-08 15:21:08 +01003481fi
Christian Heimes647cd872013-12-07 23:39:33 +01003482
Guido van Rossum91922671997-10-09 20:24:13 +00003483#
3484# SGI compilers allow the specification of the both the ABI and the
3485# ISA on the command line. Depending on the values of these switches,
3486# different and often incompatable code will be generated.
3487#
3488# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3489# thus supply support for various ABI/ISA combinations. The MACHDEP
3490# variable is also adjusted.
3491#
3492
3493if test ! -z "$SGI_ABI"
3494then
3495 CC="cc $SGI_ABI"
3496 LDFLAGS="$SGI_ABI $LDFLAGS"
3497 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3500$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003501
Jack Jansen6b08a402004-06-03 12:41:45 +00003502# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3503# it may influence the way we can build extensions, so distutils
3504# needs to check it
3505
Thomas Wouters477c8d52006-05-27 19:21:47 +00003506
Jack Jansen6b08a402004-06-03 12:41:45 +00003507CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003508EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003509
Guido van Rossum627b2d71993-12-24 10:39:16 +00003510# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003511
3512# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3513# for debug/optimization stuff. BASECFLAGS is for flags that are required
3514# just to get things to compile and link. Users are free to override OPT
3515# when running configure or make. The build should not break if they do.
3516# BASECFLAGS should generally not be messed with, however.
3517
3518# XXX shouldn't some/most/all of this code be merged with the stuff later
3519# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3521$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003524if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003526 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003527 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003528 without_gcc=yes;;
3529 yes) CC=gcc
3530 without_gcc=no;;
3531 *) CC=$withval
3532 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003533 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003534else
Martin v. Löwis11437992002-04-12 09:54:03 +00003535
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003536 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003537 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003538 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003539 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003540 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541fi
3542
Matthias Kloseb9621712010-04-24 17:59:49 +00003543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3544$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003545
Guido van Rossum8b131c51995-03-09 14:10:13 +00003546# If the user switches compilers, we can't believe the cache
3547if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3548then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003549 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003550(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003551fi
3552
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003553# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3554# when the compiler supports them, but we don't always want -O2, and
3555# we set -g later.
3556if test -z "$CFLAGS"; then
3557 CFLAGS=
3558fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003559
3560if test "$ac_sys_system" = "Darwin"
3561then
3562 # Compiler selection on MacOSX is more complicated than
3563 # AC_PROG_CC can handle, see Mac/README.txt for more
3564 # information
3565 if test -z "${CC}"
3566 then
3567 found_gcc=
3568 found_clang=
3569 as_save_IFS=$IFS; IFS=:
3570 for as_dir in $PATH
3571 do
3572 IFS=$as_save_IFS
3573 if test -x $as_dir/gcc; then
3574 if test -z "${found_gcc}"; then
3575 found_gcc=$as_dir/gcc
3576 fi
3577 fi
3578 if test -x $as_dir/clang; then
3579 if test -z "${found_clang}"; then
3580 found_clang=$as_dir/clang
3581 fi
3582 fi
3583 done
3584 IFS=$as_save_IFS
3585
3586 if test -n "$found_gcc" -a -n "$found_clang"
3587 then
3588 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3589 then
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3591$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3592 CC="$found_clang"
3593 CXX="$found_clang++"
3594 fi
3595
3596
3597 elif test -z "$found_gcc" -a -n "$found_clang"
3598 then
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3600$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3601 CC="$found_clang"
3602 CXX="$found_clang++"
3603
3604 elif test -z "$found_gcc" -a -z "$found_clang"
3605 then
3606 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3607 if test -n "${found_clang}"
3608 then
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3610$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3611 CC="${found_clang}"
3612 CXX="`/usr/bin/xcrun -find clang++`"
3613
3614 # else: use default behaviour
3615 fi
3616 fi
3617 fi
3618fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003619ac_ext=c
3620ac_cpp='$CPP $CPPFLAGS'
3621ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3622ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3623ac_compiler_gnu=$ac_cv_c_compiler_gnu
3624if test -n "$ac_tool_prefix"; then
3625 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3626set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3628$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003629if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003631else
3632 if test -n "$CC"; then
3633 ac_cv_prog_CC="$CC" # Let the user override the test.
3634else
Martin v. Löwis11437992002-04-12 09:54:03 +00003635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3636for as_dir in $PATH
3637do
3638 IFS=$as_save_IFS
3639 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 $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 +00003644 break 2
3645 fi
3646done
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003649
Jack Jansendd19cf82001-12-06 22:36:17 +00003650fi
3651fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003652CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003653if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3655$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003656else
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3658$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659fi
3660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661
Martin v. Löwis11437992002-04-12 09:54:03 +00003662fi
3663if test -z "$ac_cv_prog_CC"; then
3664 ac_ct_CC=$CC
3665 # Extract the first word of "gcc", so it can be a program name with args.
3666set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3668$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003669if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003671else
3672 if test -n "$ac_ct_CC"; then
3673 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3674else
3675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3676for as_dir in $PATH
3677do
3678 IFS=$as_save_IFS
3679 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003681 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 $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 +00003684 break 2
3685 fi
3686done
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003689
3690fi
3691fi
3692ac_ct_CC=$ac_cv_prog_ac_ct_CC
3693if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3695$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3698$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003699fi
3700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test "x$ac_ct_CC" = x; then
3702 CC=""
3703 else
3704 case $cross_compiling:$ac_tool_warned in
3705yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003706{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3707$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708ac_tool_warned=yes ;;
3709esac
3710 CC=$ac_ct_CC
3711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003712else
3713 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003714fi
3715
Jack Jansendd19cf82001-12-06 22:36:17 +00003716if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717 if test -n "$ac_tool_prefix"; then
3718 # 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 +00003719set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3721$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003722if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003724else
3725 if test -n "$CC"; then
3726 ac_cv_prog_CC="$CC" # Let the user override the test.
3727else
Martin v. Löwis11437992002-04-12 09:54:03 +00003728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729for as_dir in $PATH
3730do
3731 IFS=$as_save_IFS
3732 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $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 +00003737 break 2
3738 fi
3739done
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003742
3743fi
3744fi
3745CC=$ac_cv_prog_CC
3746if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3748$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749else
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
3753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003756fi
3757if test -z "$CC"; then
3758 # Extract the first word of "cc", so it can be a program name with args.
3759set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3761$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003762if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003764else
3765 if test -n "$CC"; then
3766 ac_cv_prog_CC="$CC" # Let the user override the test.
3767else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3770for as_dir in $PATH
3771do
3772 IFS=$as_save_IFS
3773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3777 ac_prog_rejected=yes
3778 continue
3779 fi
3780 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $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 +00003782 break 2
3783 fi
3784done
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003787
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788if test $ac_prog_rejected = yes; then
3789 # We found a bogon in the path, so make sure we never use it.
3790 set dummy $ac_cv_prog_CC
3791 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793 # We chose a different compiler from the bogus one.
3794 # However, it has the same basename, so the bogon will be chosen
3795 # first if we set CC to just the basename; use the full file name.
3796 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003797 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003798 fi
3799fi
3800fi
3801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003803if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3805$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003809fi
3810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811
Martin v. Löwis11437992002-04-12 09:54:03 +00003812fi
3813if test -z "$CC"; then
3814 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 do
3817 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3818set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003821if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003823else
3824 if test -n "$CC"; then
3825 ac_cv_prog_CC="$CC" # Let the user override the test.
3826else
Martin v. Löwis11437992002-04-12 09:54:03 +00003827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3828for as_dir in $PATH
3829do
3830 IFS=$as_save_IFS
3831 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003833 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003834 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 $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 +00003836 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003837 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003838done
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003841
3842fi
3843fi
3844CC=$ac_cv_prog_CC
3845if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3847$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848else
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3850$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003851fi
3852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 test -n "$CC" && break
3855 done
3856fi
3857if test -z "$CC"; then
3858 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003860do
3861 # Extract the first word of "$ac_prog", so it can be a program name with args.
3862set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3864$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003865if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003867else
3868 if test -n "$ac_ct_CC"; then
3869 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3870else
3871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3872for as_dir in $PATH
3873do
3874 IFS=$as_save_IFS
3875 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003876 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003878 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003879 $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 +00003880 break 2
3881 fi
3882done
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886fi
3887fi
3888ac_ct_CC=$ac_cv_prog_ac_ct_CC
3889if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3891$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003892else
Matthias Kloseb9621712010-04-24 17:59:49 +00003893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3894$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003895fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 test -n "$ac_ct_CC" && break
3899done
Michael W. Hudson54241132001-12-07 15:38:26 +00003900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 if test "x$ac_ct_CC" = x; then
3902 CC=""
3903 else
3904 case $cross_compiling:$ac_tool_warned in
3905yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003906{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3907$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908ac_tool_warned=yes ;;
3909esac
3910 CC=$ac_ct_CC
3911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003912fi
3913
3914fi
3915
3916
Matthias Kloseb9621712010-04-24 17:59:49 +00003917test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003919as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003920See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003921
3922# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003923$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3924set X $ac_compile
3925ac_compiler=$2
3926for ac_option in --version -v -V -qversion; do
3927 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928case "(($ac_try" in
3929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3930 *) ac_try_echo=$ac_try;;
3931esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003932eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3933$as_echo "$ac_try_echo"; } >&5
3934 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 if test -s conftest.err; then
3937 sed '10a\
3938... rest of stderr output deleted ...
3939 10q' conftest.err >conftest.er1
3940 cat conftest.er1 >&5
3941 fi
3942 rm -f conftest.er1 conftest.err
3943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3944 test $ac_status = 0; }
3945done
Martin v. Löwis11437992002-04-12 09:54:03 +00003946
Matthias Kloseb9621712010-04-24 17:59:49 +00003947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003948/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003949
Martin v. Löwis11437992002-04-12 09:54:03 +00003950int
3951main ()
3952{
3953
3954 ;
3955 return 0;
3956}
3957_ACEOF
3958ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003959ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003960# Try to create an executable without -o first, disregard a.out.
3961# It will help us diagnose broken compilers, and finding out an intuition
3962# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3964$as_echo_n "checking whether the C compiler works... " >&6; }
3965ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3966
3967# The possible output files:
3968ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970ac_rmfiles=
3971for ac_file in $ac_files
3972do
3973 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3976 esac
3977done
3978rm -f $ac_rmfiles
3979
Matthias Kloseb9621712010-04-24 17:59:49 +00003980if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981case "(($ac_try" in
3982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3983 *) ac_try_echo=$ac_try;;
3984esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003985eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3986$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003988 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3990 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3992# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3993# in a Makefile. We should not override ac_cv_exeext if it was cached,
3994# so that the user can short-circuit this test for compilers unknown to
3995# Autoconf.
3996for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003997do
3998 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003999 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004000 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001 ;;
4002 [ab].out )
4003 # We found the default executable, but exeext='' is most
4004 # certainly right.
4005 break;;
4006 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 then :; else
4009 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4010 fi
4011 # We set ac_cv_exeext here because the later test for it is not
4012 # safe: cross compilers may not add the suffix if given an `-o'
4013 # argument, so we may need to know it at that point already.
4014 # Even if this section looks crufty: it has the advantage of
4015 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016 break;;
4017 * )
4018 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 esac
4020done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021test "$ac_cv_exeext" = no && ac_cv_exeext=
4022
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004023else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024 ac_file=''
4025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004026if test -z "$ac_file"; then :
4027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4028$as_echo "no" >&6; }
4029$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004030sed 's/^/| /' conftest.$ac_ext >&5
4031
Matthias Kloseb9621712010-04-24 17:59:49 +00004032{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004034as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004035See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004036else
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4038$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4041$as_echo_n "checking for C compiler default output file name... " >&6; }
4042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4043$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004044ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045
Matthias Kloseb9621712010-04-24 17:59:49 +00004046rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4049$as_echo_n "checking for suffix of executables... " >&6; }
4050if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004051case "(($ac_try" in
4052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4053 *) ac_try_echo=$ac_try;;
4054esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004055eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4056$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004058 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4060 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004061 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4062# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4063# work properly (i.e., refer to `conftest.exe'), while it won't with
4064# `rm'.
4065for ac_file in conftest.exe conftest conftest.*; do
4066 test -f "$ac_file" || continue
4067 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004069 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4070 break;;
4071 * ) break;;
4072 esac
4073done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074else
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004077as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004078See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004080rm -f conftest conftest$ac_cv_exeext
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4082$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083
4084rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004085EXEEXT=$ac_cv_exeext
4086ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4088/* end confdefs.h. */
4089#include <stdio.h>
4090int
4091main ()
4092{
4093FILE *f = fopen ("conftest.out", "w");
4094 return ferror (f) || fclose (f) != 0;
4095
4096 ;
4097 return 0;
4098}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004100ac_clean_files="$ac_clean_files conftest.out"
4101# Check that the compiler produces executables we can run. If not, either
4102# the compiler is broken, or we cross compile.
4103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4104$as_echo_n "checking whether we are cross compiling... " >&6; }
4105if test "$cross_compiling" != yes; then
4106 { { ac_try="$ac_link"
4107case "(($ac_try" in
4108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4109 *) ac_try_echo=$ac_try;;
4110esac
4111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4112$as_echo "$ac_try_echo"; } >&5
4113 (eval "$ac_link") 2>&5
4114 ac_status=$?
4115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4116 test $ac_status = 0; }
4117 if { ac_try='./conftest$ac_cv_exeext'
4118 { { case "(($ac_try" in
4119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4120 *) ac_try_echo=$ac_try;;
4121esac
4122eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4123$as_echo "$ac_try_echo"; } >&5
4124 (eval "$ac_try") 2>&5
4125 ac_status=$?
4126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4127 test $ac_status = 0; }; }; then
4128 cross_compiling=no
4129 else
4130 if test "$cross_compiling" = maybe; then
4131 cross_compiling=yes
4132 else
4133 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004135as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004136If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004137See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 fi
4139 fi
4140fi
4141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4142$as_echo "$cross_compiling" >&6; }
4143
4144rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4145ac_clean_files=$ac_clean_files_save
4146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4147$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004148if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 $as_echo_n "(cached) " >&6
4150else
4151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004152/* end confdefs.h. */
4153
4154int
4155main ()
4156{
4157
4158 ;
4159 return 0;
4160}
4161_ACEOF
4162rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004163if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164case "(($ac_try" in
4165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4166 *) ac_try_echo=$ac_try;;
4167esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004168eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4169$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004170 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4173 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174 for ac_file in conftest.o conftest.obj conftest.*; do
4175 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4179 break;;
4180 esac
4181done
4182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004184sed 's/^/| /' conftest.$ac_ext >&5
4185
Matthias Kloseb9621712010-04-24 17:59:49 +00004186{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004188as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004189See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004190fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004191rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4194$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004195OBJEXT=$ac_cv_objext
4196ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4198$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004199if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004201else
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004204
Martin v. Löwis11437992002-04-12 09:54:03 +00004205int
4206main ()
4207{
4208#ifndef __GNUC__
4209 choke me
4210#endif
4211
4212 ;
4213 return 0;
4214}
4215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004216if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004217 ac_compiler_gnu=yes
4218else
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004222ac_cv_c_compiler_gnu=$ac_compiler_gnu
4223
4224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4226$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4227if test $ac_compiler_gnu = yes; then
4228 GCC=yes
4229else
4230 GCC=
4231fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004232ac_test_CFLAGS=${CFLAGS+set}
4233ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4235$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004236if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004238else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239 ac_save_c_werror_flag=$ac_c_werror_flag
4240 ac_c_werror_flag=yes
4241 ac_cv_prog_cc_g=no
4242 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004245
Martin v. Löwis11437992002-04-12 09:54:03 +00004246int
4247main ()
4248{
4249
4250 ;
4251 return 0;
4252}
4253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004254if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004255 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256else
Matthias Kloseb9621712010-04-24 17:59:49 +00004257 CFLAGS=""
4258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
4262main ()
4263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270
Matthias Kloseb9621712010-04-24 17:59:49 +00004271else
4272 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275/* end confdefs.h. */
4276
4277int
4278main ()
4279{
4280
4281 ;
4282 return 0;
4283}
4284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004285if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4293 ac_c_werror_flag=$ac_save_c_werror_flag
4294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4296$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004298 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004299elif test $ac_cv_prog_cc_g = yes; then
4300 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004301 CFLAGS="-g -O2"
4302 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004303 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304 fi
4305else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004306 if test "$GCC" = yes; then
4307 CFLAGS="-O2"
4308 else
4309 CFLAGS=
4310 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4313$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004314if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004316else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004318ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004320/* end confdefs.h. */
4321#include <stdarg.h>
4322#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004323struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004324/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4325struct buf { int x; };
4326FILE * (*rcsopen) (struct buf *, struct stat *, int);
4327static char *e (p, i)
4328 char **p;
4329 int i;
4330{
4331 return p[i];
4332}
4333static char *f (char * (*g) (char **, int), char **p, ...)
4334{
4335 char *s;
4336 va_list v;
4337 va_start (v,p);
4338 s = g (p, va_arg (v,int));
4339 va_end (v);
4340 return s;
4341}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004342
4343/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4344 function prototypes and stuff, but not '\xHH' hex character constants.
4345 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004347 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4348 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004350int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4353 inside strings and character constants. */
4354#define FOO(x) 'x'
4355int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4356
Skip Montanaro6dead952003-09-25 14:50:04 +00004357int test (int i, double x);
4358struct s1 {int (*f) (int a);};
4359struct s2 {int (*f) (double a);};
4360int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4361int argc;
4362char **argv;
4363int
4364main ()
4365{
4366return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4367 ;
4368 return 0;
4369}
4370_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4372 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004373do
4374 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378rm -f core conftest.err conftest.$ac_objext
4379 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004380done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004382CC=$ac_save_CC
4383
4384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385# AC_CACHE_VAL
4386case "x$ac_cv_prog_cc_c89" in
4387 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4389$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4392$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004393 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4396$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004397esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004398if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004401
Martin v. Löwis11437992002-04-12 09:54:03 +00004402ac_ext=c
4403ac_cpp='$CPP $CPPFLAGS'
4404ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4405ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4406ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004407
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004408ac_ext=c
4409ac_cpp='$CPP $CPPFLAGS'
4410ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4411ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4412ac_compiler_gnu=$ac_cv_c_compiler_gnu
4413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4414$as_echo_n "checking how to run the C preprocessor... " >&6; }
4415# On Suns, sometimes $CPP names a directory.
4416if test -n "$CPP" && test -d "$CPP"; then
4417 CPP=
4418fi
4419if test -z "$CPP"; then
4420 if ${ac_cv_prog_CPP+:} false; then :
4421 $as_echo_n "(cached) " >&6
4422else
4423 # Double quotes because CPP needs to be expanded
4424 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4425 do
4426 ac_preproc_ok=false
4427for ac_c_preproc_warn_flag in '' yes
4428do
4429 # Use a header file that comes with gcc, so configuring glibc
4430 # with a fresh cross-compiler works.
4431 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4432 # <limits.h> exists even on freestanding compilers.
4433 # On the NeXT, cc -E runs the code through the compiler's parser,
4434 # not just through cpp. "Syntax error" is here to catch this case.
4435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4436/* end confdefs.h. */
4437#ifdef __STDC__
4438# include <limits.h>
4439#else
4440# include <assert.h>
4441#endif
4442 Syntax error
4443_ACEOF
4444if ac_fn_c_try_cpp "$LINENO"; then :
4445
4446else
4447 # Broken: fails on valid input.
4448continue
4449fi
4450rm -f conftest.err conftest.i conftest.$ac_ext
4451
4452 # OK, works on sane cases. Now check whether nonexistent headers
4453 # can be detected and how.
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4455/* end confdefs.h. */
4456#include <ac_nonexistent.h>
4457_ACEOF
4458if ac_fn_c_try_cpp "$LINENO"; then :
4459 # Broken: success on invalid input.
4460continue
4461else
4462 # Passes both tests.
4463ac_preproc_ok=:
4464break
4465fi
4466rm -f conftest.err conftest.i conftest.$ac_ext
4467
4468done
4469# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4470rm -f conftest.i conftest.err conftest.$ac_ext
4471if $ac_preproc_ok; then :
4472 break
4473fi
4474
4475 done
4476 ac_cv_prog_CPP=$CPP
4477
4478fi
4479 CPP=$ac_cv_prog_CPP
4480else
4481 ac_cv_prog_CPP=$CPP
4482fi
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4484$as_echo "$CPP" >&6; }
4485ac_preproc_ok=false
4486for ac_c_preproc_warn_flag in '' yes
4487do
4488 # Use a header file that comes with gcc, so configuring glibc
4489 # with a fresh cross-compiler works.
4490 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4491 # <limits.h> exists even on freestanding compilers.
4492 # On the NeXT, cc -E runs the code through the compiler's parser,
4493 # not just through cpp. "Syntax error" is here to catch this case.
4494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4495/* end confdefs.h. */
4496#ifdef __STDC__
4497# include <limits.h>
4498#else
4499# include <assert.h>
4500#endif
4501 Syntax error
4502_ACEOF
4503if ac_fn_c_try_cpp "$LINENO"; then :
4504
4505else
4506 # Broken: fails on valid input.
4507continue
4508fi
4509rm -f conftest.err conftest.i conftest.$ac_ext
4510
4511 # OK, works on sane cases. Now check whether nonexistent headers
4512 # can be detected and how.
4513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4514/* end confdefs.h. */
4515#include <ac_nonexistent.h>
4516_ACEOF
4517if ac_fn_c_try_cpp "$LINENO"; then :
4518 # Broken: success on invalid input.
4519continue
4520else
4521 # Passes both tests.
4522ac_preproc_ok=:
4523break
4524fi
4525rm -f conftest.err conftest.i conftest.$ac_ext
4526
4527done
4528# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4529rm -f conftest.i conftest.err conftest.$ac_ext
4530if $ac_preproc_ok; then :
4531
4532else
4533 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4535as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4536See \`config.log' for more details" "$LINENO" 5; }
4537fi
4538
4539ac_ext=c
4540ac_cpp='$CPP $CPPFLAGS'
4541ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4542ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4543ac_compiler_gnu=$ac_cv_c_compiler_gnu
4544
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4546$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4547if ${ac_cv_path_GREP+:} false; then :
4548 $as_echo_n "(cached) " >&6
4549else
4550 if test -z "$GREP"; then
4551 ac_path_GREP_found=false
4552 # Loop through the user's path and test for each of PROGNAME-LIST
4553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4555do
4556 IFS=$as_save_IFS
4557 test -z "$as_dir" && as_dir=.
4558 for ac_prog in grep ggrep; do
4559 for ac_exec_ext in '' $ac_executable_extensions; do
4560 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4561 as_fn_executable_p "$ac_path_GREP" || continue
4562# Check for GNU ac_path_GREP and select it if it is found.
4563 # Check for GNU $ac_path_GREP
4564case `"$ac_path_GREP" --version 2>&1` in
4565*GNU*)
4566 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4567*)
4568 ac_count=0
4569 $as_echo_n 0123456789 >"conftest.in"
4570 while :
4571 do
4572 cat "conftest.in" "conftest.in" >"conftest.tmp"
4573 mv "conftest.tmp" "conftest.in"
4574 cp "conftest.in" "conftest.nl"
4575 $as_echo 'GREP' >> "conftest.nl"
4576 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4577 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4578 as_fn_arith $ac_count + 1 && ac_count=$as_val
4579 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4580 # Best one so far, save it but keep looking for a better one
4581 ac_cv_path_GREP="$ac_path_GREP"
4582 ac_path_GREP_max=$ac_count
4583 fi
4584 # 10*(2^10) chars as input seems more than enough
4585 test $ac_count -gt 10 && break
4586 done
4587 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4588esac
4589
4590 $ac_path_GREP_found && break 3
4591 done
4592 done
4593 done
4594IFS=$as_save_IFS
4595 if test -z "$ac_cv_path_GREP"; then
4596 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4597 fi
4598else
4599 ac_cv_path_GREP=$GREP
4600fi
4601
4602fi
4603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4604$as_echo "$ac_cv_path_GREP" >&6; }
4605 GREP="$ac_cv_path_GREP"
4606
4607
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004608
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004609
4610
Matthias Kloseb9621712010-04-24 17:59:49 +00004611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4612$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004614# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004615if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004616 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004617
4618 case $withval in
4619 no) with_cxx_main=no
4620 MAINCC='$(CC)';;
4621 yes) with_cxx_main=yes
4622 MAINCC='$(CXX)';;
4623 *) with_cxx_main=yes
4624 MAINCC=$withval
4625 if test -z "$CXX"
4626 then
4627 CXX=$withval
4628 fi;;
4629 esac
4630else
4631
4632 with_cxx_main=no
4633 MAINCC='$(CC)'
4634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004635fi
4636
Matthias Kloseb9621712010-04-24 17:59:49 +00004637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4638$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004639
4640preset_cxx="$CXX"
4641if test -z "$CXX"
4642then
4643 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004644 gcc) if test -n "$ac_tool_prefix"; then
4645 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4646set dummy ${ac_tool_prefix}g++; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if ${ac_cv_path_CXX+:} false; then :
4650 $as_echo_n "(cached) " >&6
4651else
4652 case $CXX in
4653 [\\/]* | ?:[\\/]*)
4654 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4655 ;;
4656 *)
4657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in notfound
4659do
4660 IFS=$as_save_IFS
4661 test -z "$as_dir" && as_dir=.
4662 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666 break 2
4667 fi
4668done
4669 done
4670IFS=$as_save_IFS
4671
4672 ;;
4673esac
4674fi
4675CXX=$ac_cv_path_CXX
4676if test -n "$CXX"; then
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4678$as_echo "$CXX" >&6; }
4679else
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685fi
4686if test -z "$ac_cv_path_CXX"; then
4687 ac_pt_CXX=$CXX
4688 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004689set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4691$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004692if ${ac_cv_path_ac_pt_CXX+:} false; then :
4693 $as_echo_n "(cached) " >&6
4694else
4695 case $ac_pt_CXX in
4696 [\\/]* | ?:[\\/]*)
4697 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4698 ;;
4699 *)
4700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4701for as_dir in notfound
4702do
4703 IFS=$as_save_IFS
4704 test -z "$as_dir" && as_dir=.
4705 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004707 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4709 break 2
4710 fi
4711done
4712 done
4713IFS=$as_save_IFS
4714
4715 ;;
4716esac
4717fi
4718ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4719if test -n "$ac_pt_CXX"; then
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4721$as_echo "$ac_pt_CXX" >&6; }
4722else
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4724$as_echo "no" >&6; }
4725fi
4726
4727 if test "x$ac_pt_CXX" = x; then
4728 CXX="g++"
4729 else
4730 case $cross_compiling:$ac_tool_warned in
4731yes:)
4732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4734ac_tool_warned=yes ;;
4735esac
4736 CXX=$ac_pt_CXX
4737 fi
4738else
4739 CXX="$ac_cv_path_CXX"
4740fi
4741 ;;
4742 cc) if test -n "$ac_tool_prefix"; then
4743 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4744set dummy ${ac_tool_prefix}c++; ac_word=$2
4745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4746$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004747if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749else
4750 case $CXX in
4751 [\\/]* | ?:[\\/]*)
4752 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4753 ;;
4754 *)
4755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4756for as_dir in notfound
4757do
4758 IFS=$as_save_IFS
4759 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004762 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764 break 2
4765 fi
4766done
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004768IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004769
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 ;;
4771esac
4772fi
4773CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004774if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4776$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004777else
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4779$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004781
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004782
4783fi
4784if test -z "$ac_cv_path_CXX"; then
4785 ac_pt_CXX=$CXX
4786 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4789$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004790if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004793 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004795 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 +00004796 ;;
4797 *)
4798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4799for as_dir in notfound
4800do
4801 IFS=$as_save_IFS
4802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004805 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807 break 2
4808 fi
4809done
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004811IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 ;;
4814esac
4815fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4817if test -n "$ac_pt_CXX"; then
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4819$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004820else
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4822$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004824
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825 if test "x$ac_pt_CXX" = x; then
4826 CXX="c++"
4827 else
4828 case $cross_compiling:$ac_tool_warned in
4829yes:)
4830{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4831$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4832ac_tool_warned=yes ;;
4833esac
4834 CXX=$ac_pt_CXX
4835 fi
4836else
4837 CXX="$ac_cv_path_CXX"
4838fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840 clang|*/clang) if test -n "$ac_tool_prefix"; then
4841 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4842set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4844$as_echo_n "checking for $ac_word... " >&6; }
4845if ${ac_cv_path_CXX+:} false; then :
4846 $as_echo_n "(cached) " >&6
4847else
4848 case $CXX in
4849 [\\/]* | ?:[\\/]*)
4850 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4851 ;;
4852 *)
4853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4854for as_dir in notfound
4855do
4856 IFS=$as_save_IFS
4857 test -z "$as_dir" && as_dir=.
4858 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004860 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4862 break 2
4863 fi
4864done
4865 done
4866IFS=$as_save_IFS
4867
Ned Deilycbfb9a52012-06-23 16:02:19 -07004868 ;;
4869esac
4870fi
4871CXX=$ac_cv_path_CXX
4872if test -n "$CXX"; then
4873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4874$as_echo "$CXX" >&6; }
4875else
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877$as_echo "no" >&6; }
4878fi
4879
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004880
4881fi
4882if test -z "$ac_cv_path_CXX"; then
4883 ac_pt_CXX=$CXX
4884 # Extract the first word of "clang++", so it can be a program name with args.
4885set dummy clang++; ac_word=$2
4886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4887$as_echo_n "checking for $ac_word... " >&6; }
4888if ${ac_cv_path_ac_pt_CXX+:} false; then :
4889 $as_echo_n "(cached) " >&6
4890else
4891 case $ac_pt_CXX in
4892 [\\/]* | ?:[\\/]*)
4893 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4894 ;;
4895 *)
4896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4897for as_dir in notfound
4898do
4899 IFS=$as_save_IFS
4900 test -z "$as_dir" && as_dir=.
4901 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004903 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4905 break 2
4906 fi
4907done
4908 done
4909IFS=$as_save_IFS
4910
4911 ;;
4912esac
4913fi
4914ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4915if test -n "$ac_pt_CXX"; then
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4917$as_echo "$ac_pt_CXX" >&6; }
4918else
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4920$as_echo "no" >&6; }
4921fi
4922
4923 if test "x$ac_pt_CXX" = x; then
4924 CXX="clang++"
4925 else
4926 case $cross_compiling:$ac_tool_warned in
4927yes:)
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4929$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4930ac_tool_warned=yes ;;
4931esac
4932 CXX=$ac_pt_CXX
4933 fi
4934else
4935 CXX="$ac_cv_path_CXX"
4936fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004937 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004938 esac
4939 if test "$CXX" = "notfound"
4940 then
4941 CXX=""
4942 fi
4943fi
4944if test -z "$CXX"
4945then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004946 if test -n "$ac_tool_prefix"; then
4947 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4948 do
4949 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4950set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4952$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004953if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004954 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004955else
4956 if test -n "$CXX"; then
4957 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4958else
4959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962 IFS=$as_save_IFS
4963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004964 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004966 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004968 break 2
4969 fi
4970done
Matthias Kloseb9621712010-04-24 17:59:49 +00004971 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004972IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004973
4974fi
4975fi
4976CXX=$ac_cv_prog_CXX
4977if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4979$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004980else
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004983fi
4984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004986 test -n "$CXX" && break
4987 done
4988fi
4989if test -z "$CXX"; then
4990 ac_ct_CXX=$CXX
4991 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4992do
4993 # Extract the first word of "$ac_prog", so it can be a program name with args.
4994set dummy $ac_prog; ac_word=$2
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996$as_echo_n "checking for $ac_word... " >&6; }
4997if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4998 $as_echo_n "(cached) " >&6
4999else
5000 if test -n "$ac_ct_CXX"; then
5001 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5002else
5003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5004for as_dir in $PATH
5005do
5006 IFS=$as_save_IFS
5007 test -z "$as_dir" && as_dir=.
5008 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005010 ac_cv_prog_ac_ct_CXX="$ac_prog"
5011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5012 break 2
5013 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005014done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005015 done
5016IFS=$as_save_IFS
5017
5018fi
5019fi
5020ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5021if test -n "$ac_ct_CXX"; then
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5023$as_echo "$ac_ct_CXX" >&6; }
5024else
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026$as_echo "no" >&6; }
5027fi
5028
5029
5030 test -n "$ac_ct_CXX" && break
5031done
5032
5033 if test "x$ac_ct_CXX" = x; then
5034 CXX="notfound"
5035 else
5036 case $cross_compiling:$ac_tool_warned in
5037yes:)
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5040ac_tool_warned=yes ;;
5041esac
5042 CXX=$ac_ct_CXX
5043 fi
5044fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005045
5046 if test "$CXX" = "notfound"
5047 then
5048 CXX=""
5049 fi
5050fi
5051if test "$preset_cxx" != "$CXX"
5052then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005053 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054
5055 By default, distutils will build C++ extension modules with \"$CXX\".
5056 If this is not intended, then set CXX on the configure command line.
5057 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005058$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059
5060 By default, distutils will build C++ extension modules with \"$CXX\".
5061 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005062 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005063fi
5064
5065
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005066MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5067
5068
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5070$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5071cat >> conftest.c <<EOF
5072#undef linux
5073#undef i386
5074#undef unix
5075#if defined(__linux__)
5076# if defined(__x86_64__) && defined(__LP64__)
5077 x86_64-linux-gnu
5078# elif defined(__x86_64__) && defined(__ILP32__)
5079 x86_64-linux-gnux32
5080# elif defined(__i386__)
5081 i386-linux-gnu
5082# elif defined(__aarch64__) && defined(__AARCH64EL__)
5083# if defined(__ILP32__)
5084 aarch64_ilp32-linux-gnu
5085# else
5086 aarch64-linux-gnu
5087# endif
5088# elif defined(__aarch64__) && defined(__AARCH64EB__)
5089# if defined(__ILP32__)
5090 aarch64_be_ilp32-linux-gnu
5091# else
5092 aarch64_be-linux-gnu
5093# endif
5094# elif defined(__alpha__)
5095 alpha-linux-gnu
5096# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5097# if defined(__ARMEL__)
5098 arm-linux-gnueabihf
5099# else
5100 armeb-linux-gnueabihf
5101# endif
5102# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5103# if defined(__ARMEL__)
5104 arm-linux-gnueabi
5105# else
5106 armeb-linux-gnueabi
5107# endif
5108# elif defined(__hppa__)
5109 hppa-linux-gnu
5110# elif defined(__ia64__)
5111 ia64-linux-gnu
5112# elif defined(__m68k__) && !defined(__mcoldfire__)
5113 m68k-linux-gnu
5114# elif defined(__mips_hard_float) && defined(_MIPSEL)
5115# if _MIPS_SIM == _ABIO32
5116 mipsel-linux-gnu
5117# elif _MIPS_SIM == _ABIN32
5118 mips64el-linux-gnuabin32
5119# elif _MIPS_SIM == _ABI64
5120 mips64el-linux-gnuabi64
5121# else
5122# error unknown platform triplet
5123# endif
5124# elif defined(__mips_hard_float)
5125# if _MIPS_SIM == _ABIO32
5126 mips-linux-gnu
5127# elif _MIPS_SIM == _ABIN32
5128 mips64-linux-gnuabin32
5129# elif _MIPS_SIM == _ABI64
5130 mips64-linux-gnuabi64
5131# else
5132# error unknown platform triplet
5133# endif
5134# elif defined(__or1k__)
5135 or1k-linux-gnu
5136# elif defined(__powerpc__) && defined(__SPE__)
5137 powerpc-linux-gnuspe
5138# elif defined(__powerpc64__)
5139# if defined(__LITTLE_ENDIAN__)
5140 powerpc64le-linux-gnu
5141# else
5142 powerpc64-linux-gnu
5143# endif
5144# elif defined(__powerpc__)
5145 powerpc-linux-gnu
5146# elif defined(__s390x__)
5147 s390x-linux-gnu
5148# elif defined(__s390__)
5149 s390-linux-gnu
5150# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5151 sh4-linux-gnu
5152# elif defined(__sparc__) && defined(__arch64__)
5153 sparc64-linux-gnu
5154# elif defined(__sparc__)
5155 sparc-linux-gnu
5156# else
5157# error unknown platform triplet
5158# endif
5159#elif defined(__FreeBSD_kernel__)
5160# if defined(__LP64__)
5161 x86_64-kfreebsd-gnu
5162# elif defined(__i386__)
5163 i386-kfreebsd-gnu
5164# else
5165# error unknown platform triplet
5166# endif
5167#elif defined(__gnu_hurd__)
5168 i386-gnu
5169#else
5170# error unknown platform triplet
5171#endif
5172
5173EOF
5174
5175if $CPP conftest.c >conftest.out 2>/dev/null; then
5176 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5178$as_echo "$PLATFORM_TRIPLET" >&6; }
5179else
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5181$as_echo "none" >&6; }
5182fi
5183rm -f conftest.c conftest.out
5184
5185if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5186 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5187 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5188 fi
5189fi
5190PLATDIR=plat-$MACHDEP
5191
5192
5193
5194
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5196$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5197save_LDFLAGS="$LDFLAGS"
5198LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005199
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5201/* end confdefs.h. */
5202
5203int
5204main ()
5205{
5206
5207 ;
5208 return 0;
5209}
5210_ACEOF
5211if ac_fn_c_try_link "$LINENO"; then :
5212 NO_AS_NEEDED="-Wl,--no-as-needed"
5213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5214$as_echo "yes" >&6; }
5215else
5216 NO_AS_NEEDED=""
5217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5218$as_echo "no" >&6; }
5219fi
5220rm -f core conftest.err conftest.$ac_objext \
5221 conftest$ac_exeext conftest.$ac_ext
5222LDFLAGS="$save_LDFLAGS"
5223
5224
5225
5226# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005227
Matthias Kloseb9621712010-04-24 17:59:49 +00005228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5229$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005230if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005231 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005232else
5233 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5234 then ac_cv_path_EGREP="$GREP -E"
5235 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005236 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005237 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005238 # Loop through the user's path and test for each of PROGNAME-LIST
5239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005240for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5241do
5242 IFS=$as_save_IFS
5243 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005244 for ac_prog in egrep; do
5245 for ac_exec_ext in '' $ac_executable_extensions; do
5246 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005247 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005248# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005249 # Check for GNU $ac_path_EGREP
5250case `"$ac_path_EGREP" --version 2>&1` in
5251*GNU*)
5252 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5253*)
5254 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005255 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005256 while :
5257 do
5258 cat "conftest.in" "conftest.in" >"conftest.tmp"
5259 mv "conftest.tmp" "conftest.in"
5260 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005261 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005262 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5263 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005264 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005265 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5266 # Best one so far, save it but keep looking for a better one
5267 ac_cv_path_EGREP="$ac_path_EGREP"
5268 ac_path_EGREP_max=$ac_count
5269 fi
5270 # 10*(2^10) chars as input seems more than enough
5271 test $ac_count -gt 10 && break
5272 done
5273 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5274esac
5275
Matthias Kloseb9621712010-04-24 17:59:49 +00005276 $ac_path_EGREP_found && break 3
5277 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005278 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005279 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005280IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005281 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005282 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 +00005283 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005284else
5285 ac_cv_path_EGREP=$EGREP
5286fi
5287
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005288 fi
5289fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5291$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005292 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005293
5294
Matthias Kloseb9621712010-04-24 17:59:49 +00005295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5296$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005297if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005298 $as_echo_n "(cached) " >&6
5299else
5300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005301/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005302#include <stdlib.h>
5303#include <stdarg.h>
5304#include <string.h>
5305#include <float.h>
5306
5307int
5308main ()
5309{
5310
5311 ;
5312 return 0;
5313}
5314_ACEOF
5315if ac_fn_c_try_compile "$LINENO"; then :
5316 ac_cv_header_stdc=yes
5317else
5318 ac_cv_header_stdc=no
5319fi
5320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5321
5322if test $ac_cv_header_stdc = yes; then
5323 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5325/* end confdefs.h. */
5326#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005327
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005328_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005330 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005332else
Matthias Kloseb9621712010-04-24 17:59:49 +00005333 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005334fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005335rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005336
Matthias Kloseb9621712010-04-24 17:59:49 +00005337fi
5338
5339if test $ac_cv_header_stdc = yes; then
5340 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5342/* end confdefs.h. */
5343#include <stdlib.h>
5344
5345_ACEOF
5346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5347 $EGREP "free" >/dev/null 2>&1; then :
5348
5349else
5350 ac_cv_header_stdc=no
5351fi
5352rm -f conftest*
5353
5354fi
5355
5356if test $ac_cv_header_stdc = yes; then
5357 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5358 if test "$cross_compiling" = yes; then :
5359 :
5360else
5361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5362/* end confdefs.h. */
5363#include <ctype.h>
5364#include <stdlib.h>
5365#if ((' ' & 0x0FF) == 0x020)
5366# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5367# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5368#else
5369# define ISLOWER(c) \
5370 (('a' <= (c) && (c) <= 'i') \
5371 || ('j' <= (c) && (c) <= 'r') \
5372 || ('s' <= (c) && (c) <= 'z'))
5373# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5374#endif
5375
5376#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5377int
5378main ()
5379{
5380 int i;
5381 for (i = 0; i < 256; i++)
5382 if (XOR (islower (i), ISLOWER (i))
5383 || toupper (i) != TOUPPER (i))
5384 return 2;
5385 return 0;
5386}
5387_ACEOF
5388if ac_fn_c_try_run "$LINENO"; then :
5389
5390else
5391 ac_cv_header_stdc=no
5392fi
5393rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5394 conftest.$ac_objext conftest.beam conftest.$ac_ext
5395fi
5396
5397fi
5398fi
5399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5400$as_echo "$ac_cv_header_stdc" >&6; }
5401if test $ac_cv_header_stdc = yes; then
5402
5403$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5404
5405fi
5406
5407# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5408for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5409 inttypes.h stdint.h unistd.h
5410do :
5411 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5412ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5413"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005414if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 cat >>confdefs.h <<_ACEOF
5416#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5417_ACEOF
5418
5419fi
5420
5421done
5422
5423
5424
5425 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 +02005426if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 MINIX=yes
5428else
5429 MINIX=
5430fi
5431
5432
5433 if test "$MINIX" = yes; then
5434
5435$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5436
5437
5438$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5439
5440
5441$as_echo "#define _MINIX 1" >>confdefs.h
5442
5443 fi
5444
5445
5446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5447$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005448if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005449 $as_echo_n "(cached) " >&6
5450else
5451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5452/* end confdefs.h. */
5453
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005454# define __EXTENSIONS__ 1
5455 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005456int
5457main ()
5458{
5459
5460 ;
5461 return 0;
5462}
5463_ACEOF
5464if ac_fn_c_try_compile "$LINENO"; then :
5465 ac_cv_safe_to_define___extensions__=yes
5466else
5467 ac_cv_safe_to_define___extensions__=no
5468fi
5469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5470fi
5471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5472$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5473 test $ac_cv_safe_to_define___extensions__ = yes &&
5474 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5475
5476 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5477
5478 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5479
5480 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5481
5482 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5483
5484
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486# Check for unsupported systems
5487case $ac_sys_system/$ac_sys_release in
5488atheos*|Linux*/1*)
5489 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5490 echo See README for details.
5491 exit 1;;
5492esac
5493
5494
Matthias Kloseb9621712010-04-24 17:59:49 +00005495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5496$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497
5498# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005499if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500 withval=$with_suffix;
5501 case $withval in
5502 no) EXEEXT=;;
5503 yes) EXEEXT=.exe;;
5504 *) EXEEXT=$withval;;
5505 esac
5506fi
5507
Matthias Kloseb9621712010-04-24 17:59:49 +00005508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5509$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510
5511# Test whether we're running on a non-case-sensitive system, in which
5512# case we give a warning if no ext is given
5513
Matthias Kloseb9621712010-04-24 17:59:49 +00005514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5515$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516if test ! -d CaseSensitiveTestDir; then
5517mkdir CaseSensitiveTestDir
5518fi
5519
5520if test -d casesensitivetestdir
5521then
Matthias Kloseb9621712010-04-24 17:59:49 +00005522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5523$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524 BUILDEXEEXT=.exe
5525else
Matthias Kloseb9621712010-04-24 17:59:49 +00005526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5527$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528 BUILDEXEEXT=$EXEEXT
5529fi
5530rmdir CaseSensitiveTestDir
5531
5532case $MACHDEP in
5533bsdos*)
5534 case $CC in
5535 gcc) CC="$CC -D_HAVE_BSDI";;
5536 esac;;
5537esac
5538
5539case $ac_sys_system in
5540hp*|HP*)
5541 case $CC in
5542 cc|*/cc) CC="$CC -Ae";;
5543 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544esac
5545
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546
Matthias Kloseb9621712010-04-24 17:59:49 +00005547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5548$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549if test -z "$LIBRARY"
5550then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005551 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5554$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555
5556# LDLIBRARY is the name of the library to link against (as opposed to the
5557# name of the library into which to insert object files). BLDLIBRARY is also
5558# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5559# is blank as the main program is not linked directly against LDLIBRARY.
5560# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5561# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5562# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5563# DLLLIBRARY is the shared (i.e., DLL) library.
5564#
5565# RUNSHARED is used to run shared python without installed libraries
5566#
5567# INSTSONAME is the name of the shared library that will be use to install
5568# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005569#
5570# LDVERSION is the shared library version number, normally the Python version
5571# with the ABI build flags appended.
5572
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573
5574
5575
5576
5577
5578
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005579
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580LDLIBRARY="$LIBRARY"
5581BLDLIBRARY='$(LDLIBRARY)'
5582INSTSONAME='$(LDLIBRARY)'
5583DLLLIBRARY=''
5584LDLIBRARYDIR=''
5585RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005586LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587
5588# LINKCC is the command that links the python executable -- default is $(CC).
5589# If CXX is set, and if it is needed to link a main function that was
5590# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5591# python might then depend on the C++ runtime
5592# This is altered for AIX in order to build the export list before
5593# linking.
5594
Matthias Kloseb9621712010-04-24 17:59:49 +00005595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5596$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597if test -z "$LINKCC"
5598then
5599 LINKCC='$(PURIFY) $(MAINCC)'
5600 case $ac_sys_system in
5601 AIX*)
5602 exp_extra="\"\""
5603 if test $ac_sys_release -ge 5 -o \
5604 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5605 exp_extra="."
5606 fi
5607 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 QNX*)
5609 # qcc must be used because the other compilers do not
5610 # support -N.
5611 LINKCC=qcc;;
5612 esac
5613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5615$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616
5617# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5618# make sure we default having it set to "no": this is used by
5619# distutils.unixccompiler to know if it should add --enable-new-dtags
5620# to linker command lines, and failing to detect GNU ld simply results
5621# in the same bahaviour as before.
5622
Matthias Kloseb9621712010-04-24 17:59:49 +00005623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5624$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625ac_prog=ld
5626if test "$GCC" = yes; then
5627 ac_prog=`$CC -print-prog-name=ld`
5628fi
5629case `"$ac_prog" -V 2>&1 < /dev/null` in
5630 *GNU*)
5631 GNULD=yes;;
5632 *)
5633 GNULD=no;;
5634esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5636$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5639$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005640if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005641 $as_echo_n "(cached) " >&6
5642else
5643 ac_cv_c_inline=no
5644for ac_kw in inline __inline__ __inline; do
5645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5646/* end confdefs.h. */
5647#ifndef __cplusplus
5648typedef int foo_t;
5649static $ac_kw foo_t static_foo () {return 0; }
5650$ac_kw foo_t foo () {return 0; }
5651#endif
5652
5653_ACEOF
5654if ac_fn_c_try_compile "$LINENO"; then :
5655 ac_cv_c_inline=$ac_kw
5656fi
5657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5658 test "$ac_cv_c_inline" != no && break
5659done
5660
5661fi
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5663$as_echo "$ac_cv_c_inline" >&6; }
5664
5665case $ac_cv_c_inline in
5666 inline | yes) ;;
5667 *)
5668 case $ac_cv_c_inline in
5669 no) ac_val=;;
5670 *) ac_val=$ac_cv_c_inline;;
5671 esac
5672 cat >>confdefs.h <<_ACEOF
5673#ifndef __cplusplus
5674#define inline $ac_val
5675#endif
5676_ACEOF
5677 ;;
5678esac
5679
5680if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005681
5682$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005683
5684
5685fi
5686
5687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5689$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005691if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692 enableval=$enable_shared;
5693fi
5694
5695
5696if test -z "$enable_shared"
5697then
5698 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005699 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 enable_shared="yes";;
5701 *)
5702 enable_shared="no";;
5703 esac
5704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5706$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5709$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005711if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005712 enableval=$enable_profiling;
5713fi
5714
5715if test "x$enable_profiling" = xyes; then
5716 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005717 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719/* end confdefs.h. */
5720int main() { return 0; }
5721_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005722if ac_fn_c_try_link "$LINENO"; then :
5723
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005725 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005727rm -f core conftest.err conftest.$ac_objext \
5728 conftest$ac_exeext conftest.$ac_ext
5729 CC="$ac_save_cc"
5730else
5731 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5734$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735
doko@ubuntu.comba015832012-06-30 16:52:05 +02005736if test "x$enable_profiling" = xyes; then
5737 BASECFLAGS="-pg $BASECFLAGS"
5738 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739fi
5740
Matthias Kloseb9621712010-04-24 17:59:49 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5742$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743
5744# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5745# library that we build, but we do not want to link against it (we
5746# will find it with a -framework option). For this reason there is an
5747# extra variable BLDLIBRARY against which Python and the extension
5748# modules are linked, BLDLIBRARY. This is normally the same as
5749# LDLIBRARY, but empty for MacOSX framework builds.
5750if test "$enable_framework"
5751then
5752 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005753 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754 BLDLIBRARY=''
5755else
5756 BLDLIBRARY='$(LDLIBRARY)'
5757fi
5758
5759# Other platforms follow
5760if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005761 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762
Matthias Kloseb9621712010-04-24 17:59:49 +00005763$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764
5765 case $ac_sys_system in
5766 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005767 LDLIBRARY='libpython$(LDVERSION).dll.a'
5768 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769 ;;
5770 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005771 LDLIBRARY='libpython$(LDVERSION).so'
5772 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005773 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005775 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005776 then
5777 PY3LIBRARY=libpython3.so
5778 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005780 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005781 LDLIBRARY='libpython$(LDVERSION).so'
5782 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005783 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005785 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005786 then
5787 PY3LIBRARY=libpython3.so
5788 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789 ;;
5790 hp*|HP*)
5791 case `uname -m` in
5792 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005793 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794 ;;
5795 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005796 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797 ;;
5798 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005799 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005800 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005803 LDLIBRARY='libpython$(LDVERSION).dylib'
5804 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005805 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005807 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005808 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005809 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005810 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811
5812 esac
5813else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005814 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815 case $ac_sys_system in
5816 CYGWIN*)
5817 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005818 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819 ;;
5820 esac
5821fi
5822
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005823if test "$cross_compiling" = yes; then
5824 RUNSHARED=
5825fi
5826
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5828$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
5830if test -n "$ac_tool_prefix"; then
5831 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5832set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5834$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005835if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005836 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837else
5838 if test -n "$RANLIB"; then
5839 ac_cv_prog_RANLIB="$RANLIB" # 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=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005846 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850 break 2
5851 fi
5852done
Matthias Kloseb9621712010-04-24 17:59:49 +00005853 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854IFS=$as_save_IFS
5855
5856fi
5857fi
5858RANLIB=$ac_cv_prog_RANLIB
5859if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5861$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862else
Matthias Kloseb9621712010-04-24 17:59:49 +00005863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5864$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865fi
5866
5867
5868fi
5869if test -z "$ac_cv_prog_RANLIB"; then
5870 ac_ct_RANLIB=$RANLIB
5871 # Extract the first word of "ranlib", so it can be a program name with args.
5872set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5874$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005875if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005876 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877else
5878 if test -n "$ac_ct_RANLIB"; then
5879 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5880else
5881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5882for as_dir in $PATH
5883do
5884 IFS=$as_save_IFS
5885 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005886 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005887 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 break 2
5891 fi
5892done
Matthias Kloseb9621712010-04-24 17:59:49 +00005893 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894IFS=$as_save_IFS
5895
5896fi
5897fi
5898ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5899if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5901$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902else
Matthias Kloseb9621712010-04-24 17:59:49 +00005903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5904$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905fi
5906
5907 if test "x$ac_ct_RANLIB" = x; then
5908 RANLIB=":"
5909 else
5910 case $cross_compiling:$ac_tool_warned in
5911yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005912{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5913$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914ac_tool_warned=yes ;;
5915esac
5916 RANLIB=$ac_ct_RANLIB
5917 fi
5918else
5919 RANLIB="$ac_cv_prog_RANLIB"
5920fi
5921
5922
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005923if test -n "$ac_tool_prefix"; then
5924 for ac_prog in ar aal
5925 do
5926 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5927set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005930if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005931 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932else
5933 if test -n "$AR"; then
5934 ac_cv_prog_AR="$AR" # Let the user override the test.
5935else
5936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937for as_dir in $PATH
5938do
5939 IFS=$as_save_IFS
5940 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005941 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005942 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005943 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 break 2
5946 fi
5947done
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949IFS=$as_save_IFS
5950
5951fi
5952fi
5953AR=$ac_cv_prog_AR
5954if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5956$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957else
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5959$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960fi
5961
5962
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005963 test -n "$AR" && break
5964 done
5965fi
5966if test -z "$AR"; then
5967 ac_ct_AR=$AR
5968 for ac_prog in ar aal
5969do
5970 # Extract the first word of "$ac_prog", so it can be a program name with args.
5971set dummy $ac_prog; ac_word=$2
5972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5973$as_echo_n "checking for $ac_word... " >&6; }
5974if ${ac_cv_prog_ac_ct_AR+:} false; then :
5975 $as_echo_n "(cached) " >&6
5976else
5977 if test -n "$ac_ct_AR"; then
5978 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5979else
5980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5981for as_dir in $PATH
5982do
5983 IFS=$as_save_IFS
5984 test -z "$as_dir" && as_dir=.
5985 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005986 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005987 ac_cv_prog_ac_ct_AR="$ac_prog"
5988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5989 break 2
5990 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005992 done
5993IFS=$as_save_IFS
5994
5995fi
5996fi
5997ac_ct_AR=$ac_cv_prog_ac_ct_AR
5998if test -n "$ac_ct_AR"; then
5999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6000$as_echo "$ac_ct_AR" >&6; }
6001else
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003$as_echo "no" >&6; }
6004fi
6005
6006
6007 test -n "$ac_ct_AR" && break
6008done
6009
6010 if test "x$ac_ct_AR" = x; then
6011 AR="ar"
6012 else
6013 case $cross_compiling:$ac_tool_warned in
6014yes:)
6015{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6016$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6017ac_tool_warned=yes ;;
6018esac
6019 AR=$ac_ct_AR
6020 fi
6021fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022
6023
6024# tweak ARFLAGS only if the user didn't set it on the command line
6025
6026if test -z "$ARFLAGS"
6027then
6028 ARFLAGS="rc"
6029fi
6030
doko@ubuntu.com58844492012-06-30 18:25:32 +02006031if test -n "$ac_tool_prefix"; then
6032 for ac_prog in readelf
6033 do
6034 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6035set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6037$as_echo_n "checking for $ac_word... " >&6; }
6038if ${ac_cv_prog_READELF+:} false; then :
6039 $as_echo_n "(cached) " >&6
6040else
6041 if test -n "$READELF"; then
6042 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6043else
6044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045for as_dir in $PATH
6046do
6047 IFS=$as_save_IFS
6048 test -z "$as_dir" && as_dir=.
6049 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006051 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6053 break 2
6054 fi
6055done
6056 done
6057IFS=$as_save_IFS
6058
6059fi
6060fi
6061READELF=$ac_cv_prog_READELF
6062if test -n "$READELF"; then
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6064$as_echo "$READELF" >&6; }
6065else
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067$as_echo "no" >&6; }
6068fi
6069
6070
6071 test -n "$READELF" && break
6072 done
6073fi
6074if test -z "$READELF"; then
6075 ac_ct_READELF=$READELF
6076 for ac_prog in readelf
6077do
6078 # Extract the first word of "$ac_prog", so it can be a program name with args.
6079set dummy $ac_prog; ac_word=$2
6080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6081$as_echo_n "checking for $ac_word... " >&6; }
6082if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6083 $as_echo_n "(cached) " >&6
6084else
6085 if test -n "$ac_ct_READELF"; then
6086 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6087else
6088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6089for as_dir in $PATH
6090do
6091 IFS=$as_save_IFS
6092 test -z "$as_dir" && as_dir=.
6093 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006094 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006095 ac_cv_prog_ac_ct_READELF="$ac_prog"
6096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6097 break 2
6098 fi
6099done
6100 done
6101IFS=$as_save_IFS
6102
6103fi
6104fi
6105ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6106if test -n "$ac_ct_READELF"; then
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6108$as_echo "$ac_ct_READELF" >&6; }
6109else
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6111$as_echo "no" >&6; }
6112fi
6113
6114
6115 test -n "$ac_ct_READELF" && break
6116done
6117
6118 if test "x$ac_ct_READELF" = x; then
6119 READELF=":"
6120 else
6121 case $cross_compiling:$ac_tool_warned in
6122yes:)
6123{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6124$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6125ac_tool_warned=yes ;;
6126esac
6127 READELF=$ac_ct_READELF
6128 fi
6129fi
6130
6131if test "$cross_compiling" = yes; then
6132 case "$READELF" in
6133 readelf|:)
6134 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6135 ;;
6136 esac
6137fi
6138
6139
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006140
Matthias Klosec4c48422012-10-21 23:05:35 +02006141for ac_prog in python$PACKAGE_VERSION python3 python
6142do
6143 # Extract the first word of "$ac_prog", so it can be a program name with args.
6144set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6146$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006147if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006148 $as_echo_n "(cached) " >&6
6149else
Matthias Klosec4c48422012-10-21 23:05:35 +02006150 if test -n "$PYTHON"; then
6151 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006152else
6153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6154for as_dir in $PATH
6155do
6156 IFS=$as_save_IFS
6157 test -z "$as_dir" && as_dir=.
6158 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006159 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006160 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6162 break 2
6163 fi
6164done
6165 done
6166IFS=$as_save_IFS
6167
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006168fi
6169fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006170PYTHON=$ac_cv_prog_PYTHON
6171if test -n "$PYTHON"; then
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6173$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006174else
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6176$as_echo "no" >&6; }
6177fi
6178
6179
Matthias Klosec4c48422012-10-21 23:05:35 +02006180 test -n "$PYTHON" && break
6181done
6182test -n "$PYTHON" || PYTHON="not-found"
6183
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006184if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006185 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6186else
6187 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006188fi
6189
6190
Kushal Das02d23a22014-04-15 23:50:06 +05306191for ac_prog in python$PACKAGE_VERSION python3 python
6192do
6193 # Extract the first word of "$ac_prog", so it can be a program name with args.
6194set dummy $ac_prog; ac_word=$2
6195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6196$as_echo_n "checking for $ac_word... " >&6; }
6197if ${ac_cv_prog_PYTHON+:} false; then :
6198 $as_echo_n "(cached) " >&6
6199else
6200 if test -n "$PYTHON"; then
6201 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6202else
6203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6204for as_dir in $PATH
6205do
6206 IFS=$as_save_IFS
6207 test -z "$as_dir" && as_dir=.
6208 for ac_exec_ext in '' $ac_executable_extensions; do
6209 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6210 ac_cv_prog_PYTHON="$ac_prog"
6211 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6212 break 2
6213 fi
6214done
6215 done
6216IFS=$as_save_IFS
6217
6218fi
6219fi
6220PYTHON=$ac_cv_prog_PYTHON
6221if test -n "$PYTHON"; then
6222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6223$as_echo "$PYTHON" >&6; }
6224else
6225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6226$as_echo "no" >&6; }
6227fi
6228
6229
6230 test -n "$PYTHON" && break
6231done
6232test -n "$PYTHON" || PYTHON="not-found"
6233
6234if test "$PYTHON" = not-found; then
6235 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6236else
6237 OPCODEHGEN="$PYTHON"
6238fi
6239
6240
6241
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242case $MACHDEP in
6243bsdos*|hp*|HP*)
6244 # install -d does not work on BSDI or HP-UX
6245 if test -z "$INSTALL"
6246 then
6247 INSTALL="${srcdir}/install-sh -c"
6248 fi
6249esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006250# Find a good install program. We prefer a C program (faster),
6251# so one script is as good as another. But avoid the broken or
6252# incompatible versions:
6253# SysV /etc/install, /usr/sbin/install
6254# SunOS /usr/etc/install
6255# IRIX /sbin/install
6256# AIX /bin/install
6257# AmigaOS /C/install, which installs bootblocks on floppy discs
6258# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6259# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6260# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6261# OS/2's system install, which has a completely different semantic
6262# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006263# Reject install programs that cannot install multiple files.
6264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6265$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006267if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006268 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269else
6270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6271for as_dir in $PATH
6272do
6273 IFS=$as_save_IFS
6274 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006275 # Account for people who put trailing slashes in PATH elements.
6276case $as_dir/ in #((
6277 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006280 /usr/ucb/* ) ;;
6281 *)
6282 # OSF1 and SCO ODT 3.0 have their own names for install.
6283 # Don't use installbsd from OSF since it installs stuff as root
6284 # by default.
6285 for ac_prog in ginstall scoinst install; do
6286 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006287 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288 if test $ac_prog = install &&
6289 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6290 # AIX install. It has an incompatible calling convention.
6291 :
6292 elif test $ac_prog = install &&
6293 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6294 # program-specific install script used by HP pwplus--don't use.
6295 :
6296 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006297 rm -rf conftest.one conftest.two conftest.dir
6298 echo one > conftest.one
6299 echo two > conftest.two
6300 mkdir conftest.dir
6301 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6302 test -s conftest.one && test -s conftest.two &&
6303 test -s conftest.dir/conftest.one &&
6304 test -s conftest.dir/conftest.two
6305 then
6306 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6307 break 3
6308 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309 fi
6310 fi
6311 done
6312 done
6313 ;;
6314esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006315
6316 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317IFS=$as_save_IFS
6318
Matthias Kloseb9621712010-04-24 17:59:49 +00006319rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320
6321fi
6322 if test "${ac_cv_path_install+set}" = set; then
6323 INSTALL=$ac_cv_path_install
6324 else
6325 # As a last resort, use the slow shell script. Don't cache a
6326 # value for INSTALL within a source directory, because that will
6327 # break other packages using the cache if that directory is
6328 # removed, or if the value is a relative name.
6329 INSTALL=$ac_install_sh
6330 fi
6331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6333$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334
6335# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6336# It thinks the first close brace ends the variable substitution.
6337test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6338
6339test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6340
6341test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6342
Matthias Klose93a0ef12012-03-15 18:08:34 +01006343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6344$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6345if test -z "$MKDIR_P"; then
6346 if ${ac_cv_path_mkdir+:} false; then :
6347 $as_echo_n "(cached) " >&6
6348else
6349 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6350for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6351do
6352 IFS=$as_save_IFS
6353 test -z "$as_dir" && as_dir=.
6354 for ac_prog in mkdir gmkdir; do
6355 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006356 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006357 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6358 'mkdir (GNU coreutils) '* | \
6359 'mkdir (coreutils) '* | \
6360 'mkdir (fileutils) '4.1*)
6361 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6362 break 3;;
6363 esac
6364 done
6365 done
6366 done
6367IFS=$as_save_IFS
6368
6369fi
6370
6371 test -d ./--version && rmdir ./--version
6372 if test "${ac_cv_path_mkdir+set}" = set; then
6373 MKDIR_P="$ac_cv_path_mkdir -p"
6374 else
6375 # As a last resort, use the slow shell script. Don't cache a
6376 # value for MKDIR_P within a source directory, because that will
6377 # break other packages using the cache if that directory is
6378 # removed, or if the value is a relative name.
6379 MKDIR_P="$ac_install_sh -d"
6380 fi
6381fi
6382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6383$as_echo "$MKDIR_P" >&6; }
6384
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385
6386# Not every filesystem supports hard links
6387
6388if test -z "$LN" ; then
6389 case $ac_sys_system in
6390 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006391 *) LN=ln;;
6392 esac
6393fi
6394
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006395# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006396
6397ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006398
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006399# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6401$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006402
6403# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006404if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006405 withval=$with_pydebug;
6406if test "$withval" != no
6407then
6408
Matthias Kloseb9621712010-04-24 17:59:49 +00006409$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006410
Matthias Kloseb9621712010-04-24 17:59:49 +00006411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6412$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006413 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006414 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006415else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417fi
6418else
Matthias Kloseb9621712010-04-24 17:59:49 +00006419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6420$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421fi
6422
6423
6424# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6425# merged with this chunk of code?
6426
6427# Optimizer/debugger flags
6428# ------------------------
6429# (The following bit of code is complicated enough - please keep things
6430# indented properly. Just pretend you're editing Python code. ;-)
6431
6432# There are two parallel sets of case statements below, one that checks to
6433# see if OPT was set and one that does BASECFLAGS setting based upon
6434# compiler and platform. BASECFLAGS tweaks need to be made even if the
6435# user set OPT.
6436
6437# tweak OPT based on compiler and platform, only if the user didn't set
6438# it on the command line
6439
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006440if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441then
6442 case $GCC in
6443 yes)
6444 if test "$CC" != 'g++' ; then
6445 STRICT_PROTO="-Wstrict-prototypes"
6446 fi
6447 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6448 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6449 WRAP="-fwrapv"
6450 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006451
6452 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006453 case $CC in
6454 *clang*) WRAP="-fwrapv"
6455 ;;
6456 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006457
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458 case $ac_cv_prog_cc_g in
6459 yes)
6460 if test "$Py_DEBUG" = 'true' ; then
6461 # Optimization messes up debuggers, so turn it off for
6462 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006463 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6464 OPT="-g -Og -Wall $STRICT_PROTO"
6465 else
6466 OPT="-g -O0 -Wall $STRICT_PROTO"
6467 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006468 else
6469 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6470 fi
6471 ;;
6472 *)
6473 OPT="-O3 -Wall $STRICT_PROTO"
6474 ;;
6475 esac
6476 case $ac_sys_system in
6477 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6478 ;;
6479 esac
6480 ;;
6481
6482 *)
6483 OPT="-O"
6484 ;;
6485 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006486fi
6487
6488
6489
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006490
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006491# The -arch flags for universal builds on OSX
6492UNIVERSAL_ARCH_FLAGS=
6493
6494
6495# tweak BASECFLAGS based on compiler and platform
6496case $GCC in
6497yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006498 # Python doesn't violate C99 aliasing rules, but older versions of
6499 # GCC produce warnings for legal Python code. Enable
6500 # -fno-strict-aliasing on versions of GCC that support but produce
6501 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6503$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006504 ac_save_cc="$CC"
6505 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006506 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006507 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006508 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006509else
Matthias Kloseb9621712010-04-24 17:59:49 +00006510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006512
Matthias Kloseb159a552010-04-25 21:00:44 +00006513
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006514int
6515main ()
6516{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006517
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006518 ;
6519 return 0;
6520}
Matthias Kloseb159a552010-04-25 21:00:44 +00006521
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006523if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006524
6525 CC="$ac_save_cc -fstrict-aliasing"
6526 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006528/* end confdefs.h. */
6529
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006530 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006531int
6532main ()
6533{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006534double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006535 ;
6536 return 0;
6537}
Matthias Kloseb159a552010-04-25 21:00:44 +00006538
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006540if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006541
6542 ac_cv_no_strict_aliasing=no
6543
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006544else
Matthias Kloseb159a552010-04-25 21:00:44 +00006545
6546 ac_cv_no_strict_aliasing=yes
6547
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006548fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006550
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006551else
Matthias Kloseb159a552010-04-25 21:00:44 +00006552
6553 ac_cv_no_strict_aliasing=no
6554
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006555fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006557fi
6558
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006559 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006560 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6562$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006563 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006564 then
6565 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6566 fi
6567
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6569$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6570 ac_save_cc="$CC"
6571 CC="$CC -Wunused-result -Werror"
6572 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006573 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006574 $as_echo_n "(cached) " >&6
6575else
6576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6577/* end confdefs.h. */
6578
6579
6580int
6581main ()
6582{
6583
6584 ;
6585 return 0;
6586}
6587
6588_ACEOF
6589if ac_fn_c_try_compile "$LINENO"; then :
6590
6591 ac_cv_disable_unused_result_warning=yes
6592
6593else
6594
6595 ac_cv_disable_unused_result_warning=no
6596
6597fi
6598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6599fi
6600
6601 CFLAGS="$save_CFLAGS"
6602 CC="$ac_save_cc"
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6604$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6605
6606 if test $ac_cv_disable_unused_result_warning = yes
6607 then
6608 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6609 fi
6610
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6612$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6613 ac_save_cc="$CC"
6614 CC="$CC -Werror=declaration-after-statement"
6615 save_CFLAGS="$CFLAGS"
6616 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6617 $as_echo_n "(cached) " >&6
6618else
6619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6620/* end confdefs.h. */
6621
6622
6623int
6624main ()
6625{
6626
6627 ;
6628 return 0;
6629}
6630
6631_ACEOF
6632if ac_fn_c_try_compile "$LINENO"; then :
6633
6634 ac_cv_declaration_after_statement_warning=yes
6635
6636else
6637
6638 ac_cv_declaration_after_statement_warning=no
6639
6640fi
6641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6642fi
6643
6644 CFLAGS="$save_CFLAGS"
6645 CC="$ac_save_cc"
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6647$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6648
6649 if test $ac_cv_declaration_after_statement_warning = yes
6650 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006651 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006652 fi
6653
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6655$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6656 ac_save_cc="$CC"
6657 CC="$CC -Wsign-compare"
6658 save_CFLAGS="$CFLAGS"
6659 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6660 $as_echo_n "(cached) " >&6
6661else
6662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6663/* end confdefs.h. */
6664
6665
6666int
6667main ()
6668{
6669
6670 ;
6671 return 0;
6672}
6673
6674_ACEOF
6675if ac_fn_c_try_compile "$LINENO"; then :
6676
6677 ac_cv_enable_sign_compare_warning=yes
6678
6679else
6680
6681 ac_cv_enable_sign_compare_warning=no
6682
6683fi
6684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6685fi
6686
6687 CFLAGS="$save_CFLAGS"
6688 CC="$ac_save_cc"
6689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6690$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6691
6692 if test $ac_cv_enable_sign_compare_warning = yes
6693 then
6694 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6695 fi
6696
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6698$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6699 ac_save_cc="$CC"
6700 CC="$CC -Wunreachable-code"
6701 save_CFLAGS="$CFLAGS"
6702 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6703 $as_echo_n "(cached) " >&6
6704else
6705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6706/* end confdefs.h. */
6707
6708
6709int
6710main ()
6711{
6712
6713 ;
6714 return 0;
6715}
6716
6717_ACEOF
6718if ac_fn_c_try_compile "$LINENO"; then :
6719
6720 ac_cv_enable_unreachable_code_warning=yes
6721
6722else
6723
6724 ac_cv_enable_unreachable_code_warning=no
6725
6726fi
6727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6728fi
6729
6730 CFLAGS="$save_CFLAGS"
6731 CC="$ac_save_cc"
6732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6733$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6734
6735 # Don't enable unreachable code warning in debug mode, since it usually
6736 # results in non-standard code paths.
6737 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6738 then
6739 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6740 fi
6741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006742 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6743 # support. Without this, treatment of subnormals doesn't follow
6744 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006745 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746 alpha*)
6747 BASECFLAGS="$BASECFLAGS -mieee"
6748 ;;
6749 esac
6750
6751 case $ac_sys_system in
6752 SCO_SV*)
6753 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6754 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006755
6756 # is there any other compiler on Darwin besides gcc?
6757 Darwin*)
6758 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6759 # used to be here, but non-Apple gcc doesn't accept them.
6760 if test "${CC}" = gcc
6761 then
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006763$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006764 case "${UNIVERSALSDK}" in
6765 */MacOSX10.4u.sdk)
6766 # Build using 10.4 SDK, force usage of gcc when the
6767 # compiler is gcc, otherwise the user will get very
6768 # confusing error messages when building on OSX 10.6
6769 CC=gcc-4.0
6770 CPP=cpp-4.0
6771 ;;
6772 esac
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006774$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006775 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006776
Ned Deily87adb6e2013-10-18 21:09:56 -07006777 if test "${enable_universalsdk}"
6778 then
6779 case "$UNIVERSAL_ARCHS" in
6780 32-bit)
6781 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6782 LIPO_32BIT_FLAGS=""
6783 ARCH_RUN_32BIT=""
6784 ;;
6785 64-bit)
6786 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6787 LIPO_32BIT_FLAGS=""
6788 ARCH_RUN_32BIT="true"
6789 ;;
6790 all)
6791 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6792 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6793 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6794 ;;
6795 intel)
6796 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6797 LIPO_32BIT_FLAGS="-extract i386"
6798 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6799 ;;
6800 intel-32)
6801 UNIVERSAL_ARCH_FLAGS="-arch i386"
6802 LIPO_32BIT_FLAGS=""
6803 ARCH_RUN_32BIT=""
6804 ;;
6805 3-way)
6806 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6807 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6808 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6809 ;;
6810 *)
6811 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6812 ;;
6813 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006814
Ned Deily87adb6e2013-10-18 21:09:56 -07006815 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6816 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6817 if test "${UNIVERSALSDK}" != "/"
6818 then
6819 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6820 fi
6821 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006822
Ned Deily87adb6e2013-10-18 21:09:56 -07006823 # Calculate an appropriate deployment target for this build:
6824 # The deployment target value is used explicitly to enable certain
6825 # features are enabled (such as builtin libedit support for readline)
6826 # through the use of Apple's Availabiliy Macros and is used as a
6827 # component of the string returned by distutils.get_platform().
6828 #
6829 # Use the value from:
6830 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6831 # 2. the operating system version of the build machine if >= 10.6
6832 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6833 # below to pick either 10.3, 10.4, or 10.5 as the target.
6834 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835
Ned Deily87adb6e2013-10-18 21:09:56 -07006836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6837$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006838 cur_target_major=`sw_vers -productVersion | \
6839 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6840 cur_target_minor=`sw_vers -productVersion | \
6841 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6842 cur_target="${cur_target_major}.${cur_target_minor}"
6843 if test ${cur_target_major} -eq 10 && \
6844 test ${cur_target_minor} -ge 3 && \
6845 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006846 then
Ned Deily36820b62014-06-25 13:44:22 -07006847 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006848 cur_target=10.3
6849 if test ${enable_universalsdk}
6850 then
6851 case "$UNIVERSAL_ARCHS" in
6852 all|3-way|intel|64-bit)
6853 # These configurations were first supported in 10.5
6854 cur_target='10.5'
6855 ;;
6856 esac
6857 else
6858 if test `/usr/bin/arch` = "i386"
6859 then
6860 # 10.4 was the first release to support Intel archs
6861 cur_target="10.4"
6862 fi
6863 fi
6864 fi
6865 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006866
Ned Deily87adb6e2013-10-18 21:09:56 -07006867 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6868 # environment with a value that is the same as what we'll use
6869 # in the Makefile to ensure that we'll get the same compiler
6870 # environment during configure and build time.
6871 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6872 export MACOSX_DEPLOYMENT_TARGET
6873 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6875$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006876
Ned Deily87adb6e2013-10-18 21:09:56 -07006877 # end of Darwin* tests
6878 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879 esac
6880 ;;
6881
6882*)
6883 case $ac_sys_system in
6884 OpenUNIX*|UnixWare*)
6885 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6886 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 SCO_SV*)
6888 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6889 ;;
6890 esac
6891 ;;
6892esac
6893
6894if test "$Py_DEBUG" = 'true'; then
6895 :
6896else
6897 OPT="-DNDEBUG $OPT"
6898fi
6899
6900if test "$ac_arch_flags"
6901then
6902 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6903fi
6904
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905# On some compilers, pthreads are available without further options
6906# (e.g. MacOS X). On some of these systems, the compiler will not
6907# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6908# So we have to see first whether pthreads are available without
6909# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6911$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006912if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006913 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914else
Matthias Kloseb9621712010-04-24 17:59:49 +00006915 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006916 ac_cv_pthread_is_default=no
6917else
Matthias Kloseb9621712010-04-24 17:59:49 +00006918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919/* end confdefs.h. */
6920
Stefan Krah7dba5942012-11-22 22:49:11 +01006921#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922#include <pthread.h>
6923
6924void* routine(void* p){return NULL;}
6925
6926int main(){
6927 pthread_t p;
6928 if(pthread_create(&p,NULL,routine,NULL)!=0)
6929 return 1;
6930 (void)pthread_detach(p);
6931 return 0;
6932}
6933
6934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006935if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936
6937 ac_cv_pthread_is_default=yes
6938 ac_cv_kthread=no
6939 ac_cv_pthread=no
6940
6941else
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006944rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6945 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946fi
6947
6948
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949fi
6950
Matthias Kloseb9621712010-04-24 17:59:49 +00006951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6952$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006953
6954
6955if test $ac_cv_pthread_is_default = yes
6956then
6957 ac_cv_kpthread=no
6958else
6959# -Kpthread, if available, provides the right #defines
6960# and linker options to make pthread_create available
6961# Some compilers won't report that they do not support -Kpthread,
6962# so we need to run a program to see whether it really made the
6963# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6965$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006966if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006967 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006968else
6969 ac_save_cc="$CC"
6970CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006971if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006972 ac_cv_kpthread=no
6973else
Matthias Kloseb9621712010-04-24 17:59:49 +00006974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975/* end confdefs.h. */
6976
Stefan Krah7dba5942012-11-22 22:49:11 +01006977#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978#include <pthread.h>
6979
6980void* routine(void* p){return NULL;}
6981
6982int main(){
6983 pthread_t p;
6984 if(pthread_create(&p,NULL,routine,NULL)!=0)
6985 return 1;
6986 (void)pthread_detach(p);
6987 return 0;
6988}
6989
6990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006991if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006992 ac_cv_kpthread=yes
6993else
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006998fi
6999
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000CC="$ac_save_cc"
7001fi
7002
Matthias Kloseb9621712010-04-24 17:59:49 +00007003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7004$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005fi
7006
7007if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7008then
7009# -Kthread, if available, provides the right #defines
7010# and linker options to make pthread_create available
7011# Some compilers won't report that they do not support -Kthread,
7012# so we need to run a program to see whether it really made the
7013# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7015$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007016if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018else
7019 ac_save_cc="$CC"
7020CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007021if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007022 ac_cv_kthread=no
7023else
Matthias Kloseb9621712010-04-24 17:59:49 +00007024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007025/* end confdefs.h. */
7026
Stefan Krah7dba5942012-11-22 22:49:11 +01007027#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007028#include <pthread.h>
7029
7030void* routine(void* p){return NULL;}
7031
7032int main(){
7033 pthread_t p;
7034 if(pthread_create(&p,NULL,routine,NULL)!=0)
7035 return 1;
7036 (void)pthread_detach(p);
7037 return 0;
7038}
7039
7040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007041if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007042 ac_cv_kthread=yes
7043else
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7047 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007048fi
7049
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007050CC="$ac_save_cc"
7051fi
7052
Matthias Kloseb9621712010-04-24 17:59:49 +00007053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7054$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007055fi
7056
7057if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7058then
7059# -pthread, if available, provides the right #defines
7060# and linker options to make pthread_create available
7061# Some compilers won't report that they do not support -pthread,
7062# so we need to run a program to see whether it really made the
7063# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7065$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007066if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007067 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007068else
7069 ac_save_cc="$CC"
7070CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007071if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007072 ac_cv_pthread=no
7073else
Matthias Kloseb9621712010-04-24 17:59:49 +00007074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007075/* end confdefs.h. */
7076
Stefan Krah7dba5942012-11-22 22:49:11 +01007077#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007078#include <pthread.h>
7079
7080void* routine(void* p){return NULL;}
7081
7082int main(){
7083 pthread_t p;
7084 if(pthread_create(&p,NULL,routine,NULL)!=0)
7085 return 1;
7086 (void)pthread_detach(p);
7087 return 0;
7088}
7089
7090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007091if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007092 ac_cv_pthread=yes
7093else
Matthias Kloseb9621712010-04-24 17:59:49 +00007094 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7097 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007098fi
7099
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007100CC="$ac_save_cc"
7101fi
7102
Matthias Kloseb9621712010-04-24 17:59:49 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7104$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007105fi
7106
7107# If we have set a CC compiler flag for thread support then
7108# check if it works for CXX, too.
7109ac_cv_cxx_thread=no
7110if test ! -z "$CXX"
7111then
Matthias Kloseb9621712010-04-24 17:59:49 +00007112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7113$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007114ac_save_cxx="$CXX"
7115
7116if test "$ac_cv_kpthread" = "yes"
7117then
7118 CXX="$CXX -Kpthread"
7119 ac_cv_cxx_thread=yes
7120elif test "$ac_cv_kthread" = "yes"
7121then
7122 CXX="$CXX -Kthread"
7123 ac_cv_cxx_thread=yes
7124elif test "$ac_cv_pthread" = "yes"
7125then
7126 CXX="$CXX -pthread"
7127 ac_cv_cxx_thread=yes
7128fi
7129
7130if test $ac_cv_cxx_thread = yes
7131then
7132 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7133 $CXX -c conftest.$ac_ext 2>&5
7134 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7135 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7136 then
7137 ac_cv_cxx_thread=yes
7138 else
7139 ac_cv_cxx_thread=no
7140 fi
7141 rm -fr conftest*
7142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7144$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007145fi
7146CXX="$ac_save_cxx"
7147
7148
7149# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7151$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007152if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007153 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007154else
Matthias Kloseb9621712010-04-24 17:59:49 +00007155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007156/* end confdefs.h. */
7157#include <stdlib.h>
7158#include <stdarg.h>
7159#include <string.h>
7160#include <float.h>
7161
7162int
7163main ()
7164{
7165
7166 ;
7167 return 0;
7168}
7169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007170if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007171 ac_cv_header_stdc=yes
7172else
Matthias Kloseb9621712010-04-24 17:59:49 +00007173 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007174fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7176
7177if test $ac_cv_header_stdc = yes; then
7178 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007180/* end confdefs.h. */
7181#include <string.h>
7182
7183_ACEOF
7184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007185 $EGREP "memchr" >/dev/null 2>&1; then :
7186
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007187else
7188 ac_cv_header_stdc=no
7189fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007190rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007191
7192fi
7193
7194if test $ac_cv_header_stdc = yes; then
7195 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007197/* end confdefs.h. */
7198#include <stdlib.h>
7199
7200_ACEOF
7201if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007202 $EGREP "free" >/dev/null 2>&1; then :
7203
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007204else
7205 ac_cv_header_stdc=no
7206fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007207rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007208
7209fi
7210
7211if test $ac_cv_header_stdc = yes; then
7212 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007213 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007214 :
7215else
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007217/* end confdefs.h. */
7218#include <ctype.h>
7219#include <stdlib.h>
7220#if ((' ' & 0x0FF) == 0x020)
7221# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7222# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7223#else
7224# define ISLOWER(c) \
7225 (('a' <= (c) && (c) <= 'i') \
7226 || ('j' <= (c) && (c) <= 'r') \
7227 || ('s' <= (c) && (c) <= 'z'))
7228# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7229#endif
7230
7231#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7232int
7233main ()
7234{
7235 int i;
7236 for (i = 0; i < 256; i++)
7237 if (XOR (islower (i), ISLOWER (i))
7238 || toupper (i) != TOUPPER (i))
7239 return 2;
7240 return 0;
7241}
7242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007243if ac_fn_c_try_run "$LINENO"; then :
7244
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007245else
Matthias Kloseb9621712010-04-24 17:59:49 +00007246 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7249 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007250fi
7251
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007252fi
7253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7255$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007256if test $ac_cv_header_stdc = yes; then
7257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007259
7260fi
7261
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007262for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007263fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007264ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007265sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007266unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007267poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007268sys/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 +01007269sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007270sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007271sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007272sys/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 -07007273libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007274bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7275sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007276do :
7277 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7278ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007279if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007280 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007281#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007282_ACEOF
7283
7284fi
7285
Guido van Rossum627b2d71993-12-24 10:39:16 +00007286done
7287
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007288ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007289for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007290 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7292$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007293if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007294 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007295else
Matthias Kloseb9621712010-04-24 17:59:49 +00007296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007297/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007298#include <sys/types.h>
7299#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007300
Martin v. Löwis11437992002-04-12 09:54:03 +00007301int
7302main ()
7303{
7304if ((DIR *) 0)
7305return 0;
7306 ;
7307 return 0;
7308}
7309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007311 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007312else
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007316fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007317eval ac_res=\$$as_ac_Header
7318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7319$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007320if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007321 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007322#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007323_ACEOF
7324
7325ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007326fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007327
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007328done
7329# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7330if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7332$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007333if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007334 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007335else
Martin v. Löwis11437992002-04-12 09:54:03 +00007336 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007339
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007340/* Override any GCC internal prototype to avoid an error.
7341 Use char because int might match the return type of a GCC
7342 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007343#ifdef __cplusplus
7344extern "C"
7345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007346char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007347int
7348main ()
7349{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007350return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007351 ;
7352 return 0;
7353}
7354_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007355for ac_lib in '' dir; do
7356 if test -z "$ac_lib"; then
7357 ac_res="none required"
7358 else
7359 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007360 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007361 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007363 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007365rm -f core conftest.err conftest.$ac_objext \
7366 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007367 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007368 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007370done
Victor Stinnere0be4232011-10-25 13:06:09 +02007371if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007372
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007373else
7374 ac_cv_search_opendir=no
7375fi
7376rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007377LIBS=$ac_func_search_save_LIBS
7378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7380$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007381ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007382if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007383 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007384
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007385fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007386
Michael W. Hudson54241132001-12-07 15:38:26 +00007387else
Matthias Kloseb9621712010-04-24 17:59:49 +00007388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7389$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007390if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007391 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007392else
7393 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007396
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007397/* Override any GCC internal prototype to avoid an error.
7398 Use char because int might match the return type of a GCC
7399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007400#ifdef __cplusplus
7401extern "C"
7402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007403char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007404int
7405main ()
7406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007407return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007408 ;
7409 return 0;
7410}
7411_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007412for ac_lib in '' x; do
7413 if test -z "$ac_lib"; then
7414 ac_res="none required"
7415 else
7416 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007417 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007418 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007419 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007420 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007422rm -f core conftest.err conftest.$ac_objext \
7423 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007424 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007425 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007427done
Victor Stinnere0be4232011-10-25 13:06:09 +02007428if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007430else
7431 ac_cv_search_opendir=no
7432fi
7433rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007434LIBS=$ac_func_search_save_LIBS
7435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7437$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007438ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007439if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007440 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007441
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007442fi
7443
7444fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007445
Matthias Kloseb9621712010-04-24 17:59:49 +00007446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7447$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007448if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007450else
Matthias Kloseb9621712010-04-24 17:59:49 +00007451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007452/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007453#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007454int
7455main ()
7456{
7457return makedev(0, 0);
7458 ;
7459 return 0;
7460}
7461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007462if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007463 ac_cv_header_sys_types_h_makedev=yes
7464else
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007467rm -f core conftest.err conftest.$ac_objext \
7468 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007469
7470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7472$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007473
7474if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007475ac_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 +02007476if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007477
Matthias Kloseb9621712010-04-24 17:59:49 +00007478$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007479
7480fi
7481
7482
7483
7484 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007485 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 +02007486if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007487
Matthias Kloseb9621712010-04-24 17:59:49 +00007488$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007489
7490fi
7491
7492
7493 fi
7494fi
7495
Michael W. Hudson54241132001-12-07 15:38:26 +00007496
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007497# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7498for ac_header in net/if.h
7499do :
7500 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7501#ifdef STDC_HEADERS
7502# include <stdlib.h>
7503# include <stddef.h>
7504#else
7505# ifdef HAVE_STDLIB_H
7506# include <stdlib.h>
7507# endif
7508#endif
7509#ifdef HAVE_SYS_SOCKET_H
7510# include <sys/socket.h>
7511#endif
7512
7513"
Victor Stinnere0be4232011-10-25 13:06:09 +02007514if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007515 cat >>confdefs.h <<_ACEOF
7516#define HAVE_NET_IF_H 1
7517_ACEOF
7518
7519fi
7520
7521done
7522
7523
Martin v. Löwis11017b12006-01-14 18:12:57 +00007524# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007525for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007526do :
7527 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 +00007528#ifdef HAVE_ASM_TYPES_H
7529#include <asm/types.h>
7530#endif
7531#ifdef HAVE_SYS_SOCKET_H
7532#include <sys/socket.h>
7533#endif
7534
Matthias Kloseb9621712010-04-24 17:59:49 +00007535"
Victor Stinnere0be4232011-10-25 13:06:09 +02007536if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007537 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007538#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007539_ACEOF
7540
7541fi
7542
7543done
7544
7545
Charles-François Natali47413c12011-10-06 19:47:44 +02007546# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007547for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007548do :
7549 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7550ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7551#ifdef HAVE_SYS_SOCKET_H
7552#include <sys/socket.h>
7553#endif
7554
7555"
7556if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7557 cat >>confdefs.h <<_ACEOF
7558#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7559_ACEOF
7560
7561fi
7562
7563done
7564
7565
Guido van Rossum627b2d71993-12-24 10:39:16 +00007566# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007567was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7569$as_echo_n "checking for clock_t in time.h... " >&6; }
7570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007571/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007572#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007573
7574_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007575if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007576 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007577 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007578else
Martin v. Löwis11437992002-04-12 09:54:03 +00007579
7580
Matthias Kloseb9621712010-04-24 17:59:49 +00007581$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007582
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007583
Guido van Rossum627b2d71993-12-24 10:39:16 +00007584fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007585rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007586
Matthias Kloseb9621712010-04-24 17:59:49 +00007587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7588$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007589
Matthias Kloseb9621712010-04-24 17:59:49 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7591$as_echo_n "checking for makedev... " >&6; }
7592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007593/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007594
Jesus Cea740f53a2010-04-28 11:35:30 +00007595#if defined(MAJOR_IN_MKDEV)
7596#include <sys/mkdev.h>
7597#elif defined(MAJOR_IN_SYSMACROS)
7598#include <sys/sysmacros.h>
7599#else
7600#include <sys/types.h>
7601#endif
7602
Neal Norwitz11690112002-07-30 01:08:28 +00007603int
7604main ()
7605{
Jesus Cea740f53a2010-04-28 11:35:30 +00007606
7607 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007608 ;
7609 return 0;
7610}
Matthias Kloseb159a552010-04-25 21:00:44 +00007611
Neal Norwitz11690112002-07-30 01:08:28 +00007612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007613if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007614 ac_cv_has_makedev=yes
7615else
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007618rm -f core conftest.err conftest.$ac_objext \
7619 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7621$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007622if test "$ac_cv_has_makedev" = "yes"; then
7623
Matthias Kloseb9621712010-04-24 17:59:49 +00007624$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007625
7626fi
7627
Christian Heimes985ecdc2013-11-20 11:46:18 +01007628# byte swapping
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7630$as_echo_n "checking for le64toh... " >&6; }
7631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7632/* end confdefs.h. */
7633
7634#ifdef HAVE_ENDIAN_H
7635#include <endian.h>
7636#elif defined(HAVE_SYS_ENDIAN_H)
7637#include <sys/endian.h>
7638#endif
7639
7640int
7641main ()
7642{
7643
7644 le64toh(1)
7645 ;
7646 return 0;
7647}
7648
7649_ACEOF
7650if ac_fn_c_try_link "$LINENO"; then :
7651 ac_cv_has_le64toh=yes
7652else
7653 ac_cv_has_le64toh=no
7654fi
7655rm -f core conftest.err conftest.$ac_objext \
7656 conftest$ac_exeext conftest.$ac_ext
7657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7658$as_echo "$ac_cv_has_le64toh" >&6; }
7659if test "$ac_cv_has_le64toh" = "yes"; then
7660
7661$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7662
7663fi
7664
Martin v. Löwis399a6892002-10-04 10:22:02 +00007665# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7666# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7667# defined, but the compiler does not support pragma redefine_extname,
7668# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7669# structures (such as rlimit64) without declaring them. As a
7670# work-around, disable LFS on such configurations
7671
7672use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7674$as_echo_n "checking Solaris LFS bug... " >&6; }
7675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007676/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007677
7678#define _LARGEFILE_SOURCE 1
7679#define _FILE_OFFSET_BITS 64
7680#include <sys/resource.h>
7681
Martin v. Löwis399a6892002-10-04 10:22:02 +00007682int
7683main ()
7684{
7685struct rlimit foo;
7686 ;
7687 return 0;
7688}
7689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007690if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007691 sol_lfs_bug=no
7692else
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7697$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007698if test "$sol_lfs_bug" = "yes"; then
7699 use_lfs=no
7700fi
7701
7702if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007703# Two defines needed to enable largefile support on various platforms
7704# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007705case $ac_sys_system/$ac_sys_release in
7706AIX*)
7707
7708$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7709
7710 ;;
7711esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007712
Matthias Kloseb9621712010-04-24 17:59:49 +00007713$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007714
7715
Matthias Kloseb9621712010-04-24 17:59:49 +00007716$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007717
Martin v. Löwis399a6892002-10-04 10:22:02 +00007718fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007719
Guido van Rossum84e7b241996-08-19 21:59:00 +00007720# Add some code to confdefs.h so that the test for off_t works on SCO
7721cat >> confdefs.h <<\EOF
7722#if defined(SCO_DS)
7723#undef _OFF_T
7724#endif
7725EOF
7726
Guido van Rossumef2255b2000-03-10 22:30:29 +00007727# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007728ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007729if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007730
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007731else
Martin v. Löwis11437992002-04-12 09:54:03 +00007732
7733cat >>confdefs.h <<_ACEOF
7734#define mode_t int
7735_ACEOF
7736
7737fi
7738
Matthias Kloseb9621712010-04-24 17:59:49 +00007739ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007740if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007741
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007742else
Martin v. Löwis11437992002-04-12 09:54:03 +00007743
7744cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007746_ACEOF
7747
7748fi
7749
Matthias Kloseb9621712010-04-24 17:59:49 +00007750ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007751if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007752
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007753else
Martin v. Löwis11437992002-04-12 09:54:03 +00007754
7755cat >>confdefs.h <<_ACEOF
7756#define pid_t int
7757_ACEOF
7758
7759fi
7760
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007763#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007764_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007765
Matthias Kloseb9621712010-04-24 17:59:49 +00007766ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007767if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007768
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007769else
Martin v. Löwis11437992002-04-12 09:54:03 +00007770
7771cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007773_ACEOF
7774
7775fi
7776
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7778$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007779if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007780 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007781else
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007783/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007784#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007785
7786_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007789 ac_cv_type_uid_t=yes
7790else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007791 ac_cv_type_uid_t=no
7792fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007793rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007794
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7797$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007798if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007799
Matthias Kloseb9621712010-04-24 17:59:49 +00007800$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007801
7802
Matthias Kloseb9621712010-04-24 17:59:49 +00007803$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007804
7805fi
7806
Mark Dickinson983bc162012-12-02 12:11:38 +00007807
7808# There are two separate checks for each of the exact-width integer types we
7809# need. First we check whether the type is available using the usual
7810# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7811# and <stdint.h> where available). We then also use the special type checks of
7812# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7813# directly, #define's uint32_t to be a suitable type.
7814
7815ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7816if test "x$ac_cv_type_uint32_t" = xyes; then :
7817
7818$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7819
7820fi
7821
Matthias Kloseb9621712010-04-24 17:59:49 +00007822ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7823case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007824 no|yes) ;; #(
7825 *)
7826
Matthias Kloseb9621712010-04-24 17:59:49 +00007827$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007828
7829
7830cat >>confdefs.h <<_ACEOF
7831#define uint32_t $ac_cv_c_uint32_t
7832_ACEOF
7833;;
7834 esac
7835
Mark Dickinson983bc162012-12-02 12:11:38 +00007836
7837ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7838if test "x$ac_cv_type_uint64_t" = xyes; then :
7839
7840$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7841
7842fi
7843
Matthias Kloseb9621712010-04-24 17:59:49 +00007844ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7845case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007846 no|yes) ;; #(
7847 *)
7848
Matthias Kloseb9621712010-04-24 17:59:49 +00007849$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007850
7851
7852cat >>confdefs.h <<_ACEOF
7853#define uint64_t $ac_cv_c_uint64_t
7854_ACEOF
7855;;
7856 esac
7857
Mark Dickinson983bc162012-12-02 12:11:38 +00007858
7859ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7860if test "x$ac_cv_type_int32_t" = xyes; then :
7861
7862$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7863
7864fi
7865
Matthias Kloseb9621712010-04-24 17:59:49 +00007866ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7867case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007868 no|yes) ;; #(
7869 *)
7870
7871cat >>confdefs.h <<_ACEOF
7872#define int32_t $ac_cv_c_int32_t
7873_ACEOF
7874;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007875esac
7876
Mark Dickinson983bc162012-12-02 12:11:38 +00007877
7878ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7879if test "x$ac_cv_type_int64_t" = xyes; then :
7880
7881$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7882
7883fi
7884
Matthias Kloseb9621712010-04-24 17:59:49 +00007885ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7886case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007887 no|yes) ;; #(
7888 *)
7889
7890cat >>confdefs.h <<_ACEOF
7891#define int64_t $ac_cv_c_int64_t
7892_ACEOF
7893;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007894esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007895
Mark Dickinson983bc162012-12-02 12:11:38 +00007896
Matthias Kloseb9621712010-04-24 17:59:49 +00007897ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007898if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899
Matthias Kloseb9621712010-04-24 17:59:49 +00007900$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007901
7902fi
7903
Stefan Krah1919b7e2012-03-21 18:25:23 +01007904ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7905if test "x$ac_cv_type___uint128_t" = xyes; then :
7906
7907$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7908
7909fi
7910
Jack Jansendd19cf82001-12-06 22:36:17 +00007911
Michael W. Hudson54241132001-12-07 15:38:26 +00007912# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007913# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914# The cast to long int works around a bug in the HP C Compiler
7915# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7916# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7917# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7919$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007920if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007921 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007922else
Matthias Kloseb9621712010-04-24 17:59:49 +00007923 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 +00007924
Martin v. Löwis11437992002-04-12 09:54:03 +00007925else
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 if test "$ac_cv_type_int" = yes; then
7927 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007929as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007930See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931 else
7932 ac_cv_sizeof_int=0
7933 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007935
Martin v. Löwis11437992002-04-12 09:54:03 +00007936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7938$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007939
7940
7941
Martin v. Löwis11437992002-04-12 09:54:03 +00007942cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007943#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007944_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007945
7946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947# The cast to long int works around a bug in the HP C Compiler
7948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7950# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7952$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007953if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007954 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007955else
Matthias Kloseb9621712010-04-24 17:59:49 +00007956 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 +00007957
Martin v. Löwis11437992002-04-12 09:54:03 +00007958else
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 if test "$ac_cv_type_long" = yes; then
7960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007962as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007963See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 else
7965 ac_cv_sizeof_long=0
7966 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007968
Martin v. Löwis11437992002-04-12 09:54:03 +00007969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7971$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972
7973
7974
Martin v. Löwis11437992002-04-12 09:54:03 +00007975cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007976#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007977_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007978
7979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980# The cast to long int works around a bug in the HP C Compiler
7981# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7982# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7983# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7985$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007986if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007987 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007988else
Matthias Kloseb9621712010-04-24 17:59:49 +00007989 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 +00007990
Martin v. Löwis11437992002-04-12 09:54:03 +00007991else
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 if test "$ac_cv_type_void_p" = yes; then
7993 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7994$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007995as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007996See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997 else
7998 ac_cv_sizeof_void_p=0
7999 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008001
Martin v. Löwis11437992002-04-12 09:54:03 +00008002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8004$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005
8006
8007
Martin v. Löwis11437992002-04-12 09:54:03 +00008008cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008009#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008010_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008011
8012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013# The cast to long int works around a bug in the HP C Compiler
8014# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8015# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8016# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8018$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008019if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008021else
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 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 +00008023
Martin v. Löwis11437992002-04-12 09:54:03 +00008024else
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 if test "$ac_cv_type_short" = yes; then
8026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008028as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008029See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030 else
8031 ac_cv_sizeof_short=0
8032 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008034
Martin v. Löwis11437992002-04-12 09:54:03 +00008035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8037$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038
8039
8040
Martin v. Löwis11437992002-04-12 09:54:03 +00008041cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008042#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008043_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008044
8045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046# The cast to long int works around a bug in the HP C Compiler
8047# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8048# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8049# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8051$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008052if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008054else
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 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 +00008056
Martin v. Löwis11437992002-04-12 09:54:03 +00008057else
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 if test "$ac_cv_type_float" = yes; then
8059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008061as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008062See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063 else
8064 ac_cv_sizeof_float=0
8065 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008067
Martin v. Löwis11437992002-04-12 09:54:03 +00008068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8070$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008071
8072
8073
Martin v. Löwis11437992002-04-12 09:54:03 +00008074cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008075#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008076_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008077
8078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008079# The cast to long int works around a bug in the HP C Compiler
8080# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8081# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8082# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8084$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008085if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008087else
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 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 +00008089
Martin v. Löwis11437992002-04-12 09:54:03 +00008090else
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 if test "$ac_cv_type_double" = yes; then
8092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008094as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008095See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096 else
8097 ac_cv_sizeof_double=0
8098 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008100
Martin v. Löwis11437992002-04-12 09:54:03 +00008101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8103$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104
8105
8106
Martin v. Löwis11437992002-04-12 09:54:03 +00008107cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008108#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008109_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008110
8111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112# The cast to long int works around a bug in the HP C Compiler
8113# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8114# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8115# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8117$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008118if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008119 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008120else
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 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 +00008122
Martin v. Löwis11437992002-04-12 09:54:03 +00008123else
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 if test "$ac_cv_type_fpos_t" = yes; then
8125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008127as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008128See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129 else
8130 ac_cv_sizeof_fpos_t=0
8131 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008133
Martin v. Löwis11437992002-04-12 09:54:03 +00008134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8136$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008137
8138
8139
Martin v. Löwis11437992002-04-12 09:54:03 +00008140cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008141#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008142_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008143
Michael W. Hudson54241132001-12-07 15:38:26 +00008144
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145# The cast to long int works around a bug in the HP C Compiler
8146# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8147# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8148# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8150$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008151if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008152 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008153else
Matthias Kloseb9621712010-04-24 17:59:49 +00008154 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 +00008155
Martin v. Löwis18e16552006-02-15 17:27:45 +00008156else
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 if test "$ac_cv_type_size_t" = yes; then
8158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008160as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008161See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162 else
8163 ac_cv_sizeof_size_t=0
8164 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008166
Martin v. Löwis18e16552006-02-15 17:27:45 +00008167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8169$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008170
8171
8172
Martin v. Löwis18e16552006-02-15 17:27:45 +00008173cat >>confdefs.h <<_ACEOF
8174#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8175_ACEOF
8176
8177
Christian Heimes400adb02008-02-01 08:12:03 +00008178# The cast to long int works around a bug in the HP C Compiler
8179# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8180# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8181# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8183$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008184if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008186else
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 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 +00008188
Christian Heimes400adb02008-02-01 08:12:03 +00008189else
Matthias Kloseb9621712010-04-24 17:59:49 +00008190 if test "$ac_cv_type_pid_t" = yes; then
8191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008193as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008194See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008195 else
8196 ac_cv_sizeof_pid_t=0
8197 fi
8198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008199
Christian Heimes400adb02008-02-01 08:12:03 +00008200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8202$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008203
8204
8205
8206cat >>confdefs.h <<_ACEOF
8207#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8208_ACEOF
8209
8210
Michael W. Hudson54241132001-12-07 15:38:26 +00008211
Matthias Kloseb9621712010-04-24 17:59:49 +00008212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8213$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008214have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008216/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008217
Martin v. Löwis11437992002-04-12 09:54:03 +00008218int
8219main ()
8220{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008221long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 ;
8223 return 0;
8224}
8225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008226if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008227
8228
Matthias Kloseb9621712010-04-24 17:59:49 +00008229$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008230
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008231 have_long_long=yes
8232
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8236$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008237if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238# The cast to long int works around a bug in the HP C Compiler
8239# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8240# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8241# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8243$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008244if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008245 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008246else
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 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 +00008248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249else
Matthias Kloseb9621712010-04-24 17:59:49 +00008250 if test "$ac_cv_type_long_long" = yes; then
8251 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008253as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008254See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255 else
8256 ac_cv_sizeof_long_long=0
8257 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008259
Martin v. Löwis11437992002-04-12 09:54:03 +00008260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8262$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263
8264
8265
Martin v. Löwis11437992002-04-12 09:54:03 +00008266cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008267#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008268_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008269
Michael W. Hudson54241132001-12-07 15:38:26 +00008270
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008271fi
8272
Matthias Kloseb9621712010-04-24 17:59:49 +00008273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8274$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008275have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008277/* end confdefs.h. */
8278
8279int
8280main ()
8281{
8282long double x; x = (long double)0;
8283 ;
8284 return 0;
8285}
8286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008287if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008288
8289
Matthias Kloseb9621712010-04-24 17:59:49 +00008290$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008291
8292 have_long_double=yes
8293
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008294fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8297$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008298if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008299# The cast to long int works around a bug in the HP C Compiler
8300# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8301# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8302# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8304$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008305if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008307else
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 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 +00008309
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008310else
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 if test "$ac_cv_type_long_double" = yes; then
8312 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8313$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008314as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008315See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008316 else
8317 ac_cv_sizeof_long_double=0
8318 fi
8319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008320
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8323$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008324
8325
8326
8327cat >>confdefs.h <<_ACEOF
8328#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8329_ACEOF
8330
8331
8332fi
8333
8334
Matthias Kloseb9621712010-04-24 17:59:49 +00008335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8336$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008337have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008339/* end confdefs.h. */
8340
8341int
8342main ()
8343{
8344_Bool x; x = (_Bool)0;
8345 ;
8346 return 0;
8347}
8348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008349if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008350
8351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008353
8354 have_c99_bool=yes
8355
Thomas Woutersb2137042007-02-01 18:02:27 +00008356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8359$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008360if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361# The cast to long int works around a bug in the HP C Compiler
8362# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8363# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8364# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8366$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008367if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008369else
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 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 +00008371
Thomas Woutersb2137042007-02-01 18:02:27 +00008372else
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 if test "$ac_cv_type__Bool" = yes; then
8374 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008376as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008377See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378 else
8379 ac_cv_sizeof__Bool=0
8380 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008382
Thomas Woutersb2137042007-02-01 18:02:27 +00008383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8385$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386
8387
8388
Thomas Woutersb2137042007-02-01 18:02:27 +00008389cat >>confdefs.h <<_ACEOF
8390#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8391_ACEOF
8392
8393
8394fi
8395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008397 #include <stdint.h>
8398 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008399 #ifdef HAVE_INTTYPES_H
8400 #include <inttypes.h>
8401 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008402"
Victor Stinnere0be4232011-10-25 13:06:09 +02008403if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008404
8405cat >>confdefs.h <<_ACEOF
8406#define HAVE_UINTPTR_T 1
8407_ACEOF
8408
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409# The cast to long int works around a bug in the HP C Compiler
8410# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8411# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8412# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8414$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008415if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008417else
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 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 +00008419
Martin v. Löwis11437992002-04-12 09:54:03 +00008420else
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 if test "$ac_cv_type_uintptr_t" = yes; then
8422 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8423$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008424as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008425See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008426 else
8427 ac_cv_sizeof_uintptr_t=0
8428 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008430
Martin v. Löwis11437992002-04-12 09:54:03 +00008431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8433$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008434
8435
8436
Martin v. Löwis11437992002-04-12 09:54:03 +00008437cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008438#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008439_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008440
Michael W. Hudson54241132001-12-07 15:38:26 +00008441
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008442fi
8443
Thomas Wouters89f507f2006-12-13 04:49:30 +00008444
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008445# The cast to long int works around a bug in the HP C Compiler
8446# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8447# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8448# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8450$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008451if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008453else
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008455#ifdef HAVE_SYS_TYPES_H
8456#include <sys/types.h>
8457#endif
8458
Matthias Kloseb9621712010-04-24 17:59:49 +00008459"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008460
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008461else
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 if test "$ac_cv_type_off_t" = yes; then
8463 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008465as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008466See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008467 else
8468 ac_cv_sizeof_off_t=0
8469 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8474$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008475
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008476
8477
Martin v. Löwis11437992002-04-12 09:54:03 +00008478cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008479#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008480_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008481
Michael W. Hudson54241132001-12-07 15:38:26 +00008482
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008483
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8485$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008486if test "$have_long_long" = yes
8487then
8488if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008489 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008490
Matthias Kloseb9621712010-04-24 17:59:49 +00008491$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008492
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8494$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008495else
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8497$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008498fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008499else
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8501$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008502fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008503
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008504# The cast to long int works around a bug in the HP C Compiler
8505# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8506# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8507# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8509$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008510if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008512else
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008514#ifdef HAVE_SYS_TYPES_H
8515#include <sys/types.h>
8516#endif
8517#ifdef HAVE_TIME_H
8518#include <time.h>
8519#endif
8520
Matthias Kloseb9621712010-04-24 17:59:49 +00008521"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008522
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008523else
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 if test "$ac_cv_type_time_t" = yes; then
8525 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8526$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008527as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008528See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008529 else
8530 ac_cv_sizeof_time_t=0
8531 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008533
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8536$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008537
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008538
8539
Martin v. Löwis11437992002-04-12 09:54:03 +00008540cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008541#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008542_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008543
Michael W. Hudson54241132001-12-07 15:38:26 +00008544
8545
Trent Mick635f6fb2000-08-23 21:33:05 +00008546# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008547ac_save_cc="$CC"
8548if test "$ac_cv_kpthread" = "yes"
8549then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008550elif test "$ac_cv_kthread" = "yes"
8551then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008552elif test "$ac_cv_pthread" = "yes"
8553then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008554fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008555
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8557$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008558have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008560/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008561
8562 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008563int
8564main ()
8565{
Guido van Rossum12580492000-09-24 16:47:19 +00008566pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ;
8568 return 0;
8569}
Matthias Kloseb159a552010-04-25 21:00:44 +00008570
Martin v. Löwis11437992002-04-12 09:54:03 +00008571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008572if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008573 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8577$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008578if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8582# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8584$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008585if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008587else
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008589#ifdef HAVE_PTHREAD_H
8590#include <pthread.h>
8591#endif
8592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008594
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008595else
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 if test "$ac_cv_type_pthread_t" = yes; then
8597 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008599as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008600See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008601 else
8602 ac_cv_sizeof_pthread_t=0
8603 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008605
Trent Mick635f6fb2000-08-23 21:33:05 +00008606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8608$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008609
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008610
8611
Martin v. Löwis11437992002-04-12 09:54:03 +00008612cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008613#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008614_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008615
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008616
Trent Mick635f6fb2000-08-23 21:33:05 +00008617fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008618CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008619
Michael W. Hudson54241132001-12-07 15:38:26 +00008620
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008621case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008622 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008623 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8624 ;;
8625 Darwin/*)
8626 OTHER_LIBTOOL_OPT=""
8627 ;;
8628esac
8629
8630
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008631
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008632case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008633 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008634 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8635 if test "${enable_universalsdk}"; then
8636 :
8637 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008638 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008639 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008640 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008641 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008642 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008643 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008644 if test ${gcc_version} '<' 4.0
8645 then
8646 LIBTOOL_CRUFT="-lcc_dynamic"
8647 else
8648 LIBTOOL_CRUFT=""
8649 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008651 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008652else
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008654/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008655
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008656 #include <unistd.h>
8657 int main(int argc, char*argv[])
8658 {
8659 if (sizeof(long) == 4) {
8660 return 0;
8661 } else {
8662 return 1;
8663 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008664 }
8665
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008667if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008668 ac_osx_32bit=yes
8669else
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8673 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008674fi
8675
8676
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008677 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008678 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008679 i386)
8680 MACOSX_DEFAULT_ARCH="i386"
8681 ;;
8682 ppc)
8683 MACOSX_DEFAULT_ARCH="ppc"
8684 ;;
8685 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008686 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008687 ;;
8688 esac
8689 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008690 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008691 i386)
8692 MACOSX_DEFAULT_ARCH="x86_64"
8693 ;;
8694 ppc)
8695 MACOSX_DEFAULT_ARCH="ppc64"
8696 ;;
8697 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008698 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008699 ;;
8700 esac
8701
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008702 fi
8703
8704 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008705 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008706 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008707esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8709$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008710if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008711then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008712 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008714 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008715
Matthias Kloseb9621712010-04-24 17:59:49 +00008716$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008717
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8719$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008720 if test $enable_shared = "yes"
8721 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008722 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 +00008723 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008724else
Matthias Kloseb9621712010-04-24 17:59:49 +00008725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008727fi
8728
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8730$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008731case $ac_sys_system/$ac_sys_release in
8732 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008733
Matthias Kloseb9621712010-04-24 17:59:49 +00008734$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008735
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8737$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008738 ;;
8739 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8741$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008742 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008743esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008744
Guido van Rossum0a516c91994-09-12 10:58:40 +00008745# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008746
Michael W. Hudson54241132001-12-07 15:38:26 +00008747
8748
8749
8750
Benjamin Peterson99f03762010-04-11 22:15:28 +00008751
Thomas Wouters477c8d52006-05-27 19:21:47 +00008752
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008753# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8754# -- usually .so, .sl on HP-UX, .dll on Cygwin
8755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8756$as_echo_n "checking the extension of shared libraries... " >&6; }
8757if test -z "$SHLIB_SUFFIX"; then
8758 case $ac_sys_system in
8759 hp*|HP*)
8760 case `uname -m` in
8761 ia64) SHLIB_SUFFIX=.so;;
8762 *) SHLIB_SUFFIX=.sl;;
8763 esac
8764 ;;
8765 CYGWIN*) SHLIB_SUFFIX=.dll;;
8766 *) SHLIB_SUFFIX=.so;;
8767 esac
8768fi
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8770$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008771
Guido van Rossum0a516c91994-09-12 10:58:40 +00008772# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008773# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008774# (Shared libraries in this instance are shared modules to be loaded into
8775# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8777$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008778if test -z "$LDSHARED"
8779then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008780 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008781 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008782 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008783 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008784 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008785 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008786 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008788 if test "$GCC" = "yes" ; then
8789 LDSHARED='$(CC) -shared'
8790 LDCXXSHARED='$(CXX) -shared'
8791 else
8792 LDSHARED='$(CC) -G'
8793 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008794 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008795 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008796 if test "$GCC" = "yes" ; then
8797 LDSHARED='$(CC) -shared'
8798 LDCXXSHARED='$(CXX) -shared'
8799 else
8800 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008801 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008802 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008803 LDSHARED='$(CC) -bundle'
8804 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008805 if test "$enable_framework" ; then
8806 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008807 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8808 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008809 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008810 else
8811 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008812 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008813 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008814 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008815 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008816 LDSHARED='$(CC) -bundle'
8817 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008818 if test "$enable_framework" ; then
8819 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008820 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8821 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008822 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008823 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008824 # No framework, use the Python app as bundle-loader
8825 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008826 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008827 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008828 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008829 Darwin/*)
8830 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8831 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008832
Ned Deily36820b62014-06-25 13:44:22 -07008833 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8834 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8835 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8836 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8837 if test ${dep_target_major} -eq 10 && \
8838 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008839 then
Ned Deily36820b62014-06-25 13:44:22 -07008840 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008841 LDSHARED='$(CC) -bundle'
8842 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008843 if test "$enable_framework" ; then
8844 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008845 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8846 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008847 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008848 else
8849 # No framework, use the Python app as bundle-loader
8850 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8851 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008852 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008853 fi
Ned Deily36820b62014-06-25 13:44:22 -07008854 else
8855 # building for OS X 10.3 and later
8856 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8857 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8858 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008859 fi
8860 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008861 Linux*|GNU*|QNX*)
8862 LDSHARED='$(CC) -shared'
8863 LDCXXSHARED='$(CXX) -shared';;
8864 BSD/OS*/4*)
8865 LDSHARED="gcc -shared"
8866 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008867 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008868 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008869 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008870 LDSHARED='$(CC) -shared'
8871 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008872 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008873 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008874 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008875 OpenBSD*)
8876 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8877 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008878 LDSHARED='$(CC) -shared $(CCSHARED)'
8879 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008880 else
8881 case `uname -r` in
8882 [01].* | 2.[0-7] | 2.[0-7].*)
8883 LDSHARED="ld -Bshareable ${LDFLAGS}"
8884 ;;
8885 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008886 LDSHARED='$(CC) -shared $(CCSHARED)'
8887 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008888 ;;
8889 esac
8890 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008891 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008892 LDSHARED='$(CC) -shared'
8893 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008894 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008895 if test "$GCC" = "yes" ; then
8896 LDSHARED='$(CC) -shared'
8897 LDCXXSHARED='$(CXX) -shared'
8898 else
8899 LDSHARED='$(CC) -G'
8900 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008901 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008902 SCO_SV*)
8903 LDSHARED='$(CC) -Wl,-G,-Bexport'
8904 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8905 CYGWIN*)
8906 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8907 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008908 *) LDSHARED="ld";;
8909 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8912$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008913LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008914BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008915# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008916# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8918$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008919if test -z "$CCSHARED"
8920then
Guido van Rossum07397971997-04-29 21:49:50 +00008921 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008922 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008923 then CCSHARED="-fPIC";
8924 elif test `uname -p` = sparc;
8925 then CCSHARED="-xcode=pic32";
8926 else CCSHARED="-Kpic";
8927 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008928 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008929 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008930 else CCSHARED="+z";
8931 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008932 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008933 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008934 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008935 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008936 if test "$GCC" = "yes"
8937 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008938 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008939 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008940 SCO_SV*)
8941 if test "$GCC" = "yes"
8942 then CCSHARED="-fPIC"
8943 else CCSHARED="-Kpic -belf"
8944 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008945 IRIX*/6*) case $CC in
8946 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008947 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008948 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008949 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8952$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008953# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008954# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8956$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008957if test -z "$LINKFORSHARED"
8958then
Guido van Rossum07397971997-04-29 21:49:50 +00008959 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008960 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008961 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008962 LINKFORSHARED="-Wl,-E -Wl,+s";;
8963# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008964 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008965 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008966 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008968 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008969
8970 # Issue #18075: the default maximum stack size (8MBytes) is too
8971 # small for the default recursion limit. Increase the stack size
8972 # to ensure that tests don't crash
8973 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8974
Jack Jansene578a632001-08-15 01:27:14 +00008975 if test "$enable_framework"
8976 then
Jack Jansenda49e192005-01-07 13:08:22 +00008977 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008978 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008979 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008980 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008981 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008982 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008983 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008984 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8985 then
8986 LINKFORSHARED="-Wl,--export-dynamic"
8987 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008988 SunOS/5*) case $CC in
8989 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008990 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008991 then
8992 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008993 fi;;
8994 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008995 CYGWIN*)
8996 if test $enable_shared = "no"
8997 then
8998 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8999 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009000 QNX*)
9001 # -Wl,-E causes the symbols to be added to the dynamic
9002 # symbol table so that they can be found when a module
9003 # is loaded. -N 2048K causes the stack size to be set
9004 # to 2048 kilobytes so that the stack doesn't overflow
9005 # when running test_compile.py.
9006 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009007 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9010$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009011
Michael W. Hudson54241132001-12-07 15:38:26 +00009012
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009013
Matthias Kloseb9621712010-04-24 17:59:49 +00009014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9015$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009016if test ! "$LIBRARY" = "$LDLIBRARY"
9017then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009018 case $ac_sys_system in
9019 CYGWIN*)
9020 # Cygwin needs CCSHARED when building extension DLLs
9021 # but not when building the interpreter DLL.
9022 CFLAGSFORSHARED='';;
9023 *)
9024 CFLAGSFORSHARED='$(CCSHARED)'
9025 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9028$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009029
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009030# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9031# library (with --enable-shared).
9032# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009033# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9034# if it is not required, since it creates a dependency of the shared library
9035# to LIBS. This, in turn, means that applications linking the shared libpython
9036# don't need to link LIBS explicitly. The default should be only changed
9037# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009038
Matthias Kloseb9621712010-04-24 17:59:49 +00009039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9040$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009041case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009042 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009043 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009044esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9046$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009047
9048
Guido van Rossum627b2d71993-12-24 10:39:16 +00009049# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9051$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009052if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009053 $as_echo_n "(cached) " >&6
9054else
9055 ac_check_lib_save_LIBS=$LIBS
9056LIBS="-lsendfile $LIBS"
9057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9058/* end confdefs.h. */
9059
9060/* Override any GCC internal prototype to avoid an error.
9061 Use char because int might match the return type of a GCC
9062 builtin and then its argument prototype would still apply. */
9063#ifdef __cplusplus
9064extern "C"
9065#endif
9066char sendfile ();
9067int
9068main ()
9069{
9070return sendfile ();
9071 ;
9072 return 0;
9073}
9074_ACEOF
9075if ac_fn_c_try_link "$LINENO"; then :
9076 ac_cv_lib_sendfile_sendfile=yes
9077else
9078 ac_cv_lib_sendfile_sendfile=no
9079fi
9080rm -f core conftest.err conftest.$ac_objext \
9081 conftest$ac_exeext conftest.$ac_ext
9082LIBS=$ac_check_lib_save_LIBS
9083fi
9084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9085$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009086if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009087 cat >>confdefs.h <<_ACEOF
9088#define HAVE_LIBSENDFILE 1
9089_ACEOF
9090
9091 LIBS="-lsendfile $LIBS"
9092
9093fi
9094
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9096$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009097if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009098 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009099else
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009101LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009105/* Override any GCC internal prototype to avoid an error.
9106 Use char because int might match the return type of a GCC
9107 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009108#ifdef __cplusplus
9109extern "C"
9110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009111char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009112int
9113main ()
9114{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009115return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 ;
9117 return 0;
9118}
9119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009120if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009122else
Matthias Kloseb9621712010-04-24 17:59:49 +00009123 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009125rm -f core conftest.err conftest.$ac_objext \
9126 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009127LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9130$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009131if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 cat >>confdefs.h <<_ACEOF
9133#define HAVE_LIBDL 1
9134_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009135
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009136 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009137
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009138fi
9139 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9141$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009142if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009143 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009144else
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009146LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009150/* Override any GCC internal prototype to avoid an error.
9151 Use char because int might match the return type of a GCC
9152 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009153#ifdef __cplusplus
9154extern "C"
9155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009156char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009157int
9158main ()
9159{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009160return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 ;
9162 return 0;
9163}
9164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009165if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009167else
Matthias Kloseb9621712010-04-24 17:59:49 +00009168 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009170rm -f core conftest.err conftest.$ac_objext \
9171 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009172LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9175$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009176if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 cat >>confdefs.h <<_ACEOF
9178#define HAVE_LIBDLD 1
9179_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009180
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009181 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009182
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009183fi
9184 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9186$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9187if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9188 $as_echo_n "(cached) " >&6
9189else
9190 ac_check_lib_save_LIBS=$LIBS
9191LIBS="-lcrypto $LIBS"
9192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9193/* end confdefs.h. */
9194
9195/* Override any GCC internal prototype to avoid an error.
9196 Use char because int might match the return type of a GCC
9197 builtin and then its argument prototype would still apply. */
9198#ifdef __cplusplus
9199extern "C"
9200#endif
9201char RAND_egd ();
9202int
9203main ()
9204{
9205return RAND_egd ();
9206 ;
9207 return 0;
9208}
9209_ACEOF
9210if ac_fn_c_try_link "$LINENO"; then :
9211 ac_cv_lib_crypto_RAND_egd=yes
9212else
9213 ac_cv_lib_crypto_RAND_egd=no
9214fi
9215rm -f core conftest.err conftest.$ac_objext \
9216 conftest$ac_exeext conftest.$ac_ext
9217LIBS=$ac_check_lib_save_LIBS
9218fi
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9220$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9221if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9222
9223$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9224
9225fi
9226
Martin v. Löwis519adae2003-09-20 10:47:47 +00009227
Georg Brandlb1441c72009-01-03 22:33:39 +00009228# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009229if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9231$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009232if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009234else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009235 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009237/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009239/* Override any GCC internal prototype to avoid an error.
9240 Use char because int might match the return type of a GCC
9241 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009242#ifdef __cplusplus
9243extern "C"
9244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009245char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009246int
9247main ()
9248{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009249return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009250 ;
9251 return 0;
9252}
9253_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009254for ac_lib in '' pthread rt posix4; do
9255 if test -z "$ac_lib"; then
9256 ac_res="none required"
9257 else
9258 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009259 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009261 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009262 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009264rm -f core conftest.err conftest.$ac_objext \
9265 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009266 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009267 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009269done
Victor Stinnere0be4232011-10-25 13:06:09 +02009270if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009272else
9273 ac_cv_search_sem_init=no
9274fi
9275rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009276LIBS=$ac_func_search_save_LIBS
9277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9279$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009280ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009281if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009282 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009283
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009284fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009285 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009286 # posix4 on Solaris 2.6
9287 # pthread (first!) on Linux
9288fi
9289
Martin v. Löwis19d17342003-06-14 21:03:05 +00009290# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9292$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009293if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009294 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009295else
9296 ac_check_lib_save_LIBS=$LIBS
9297LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009299/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009301/* Override any GCC internal prototype to avoid an error.
9302 Use char because int might match the return type of a GCC
9303 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009304#ifdef __cplusplus
9305extern "C"
9306#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009307char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009308int
9309main ()
9310{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009311return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009312 ;
9313 return 0;
9314}
9315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009316if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009317 ac_cv_lib_intl_textdomain=yes
9318else
Matthias Kloseb9621712010-04-24 17:59:49 +00009319 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009320fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009321rm -f core conftest.err conftest.$ac_objext \
9322 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009323LIBS=$ac_check_lib_save_LIBS
9324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9326$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009327if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009328
Matthias Kloseb9621712010-04-24 17:59:49 +00009329$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009330
Brett Cannonc6d936e2009-06-07 20:09:53 +00009331 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009332fi
9333
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009334
9335# checks for system dependent C++ extensions support
9336case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009337 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9338$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009340/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009341
Georg Brandl59e87bd2011-02-15 19:48:59 +00009342 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009343int
9344main ()
9345{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009346loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 ;
9348 return 0;
9349}
Matthias Kloseb159a552010-04-25 21:00:44 +00009350
Martin v. Löwis11437992002-04-12 09:54:03 +00009351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009352if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009353
Matthias Kloseb159a552010-04-25 21:00:44 +00009354
Matthias Kloseb9621712010-04-24 17:59:49 +00009355$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009356
Matthias Kloseb159a552010-04-25 21:00:44 +00009357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009358$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009359
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009360else
Matthias Kloseb159a552010-04-25 21:00:44 +00009361
9362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009363$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009364
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009366rm -f core conftest.err conftest.$ac_objext \
9367 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009368 *) ;;
9369esac
9370
Christian Heimes985ecdc2013-11-20 11:46:18 +01009371# check for systems that require aligned memory access
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9373$as_echo_n "checking aligned memory access is required... " >&6; }
9374if test "$cross_compiling" = yes; then :
9375 aligned_required=yes
9376else
9377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9378/* end confdefs.h. */
9379
9380int main()
9381{
9382 char s[16];
9383 int i, *p1, *p2;
9384 for (i=0; i < 16; i++)
9385 s[i] = i;
9386 p1 = (int*)(s+1);
9387 p2 = (int*)(s+2);
9388 if (*p1 == *p2)
9389 return 1;
9390 return 0;
9391}
9392
9393_ACEOF
9394if ac_fn_c_try_run "$LINENO"; then :
9395 aligned_required=no
9396else
9397 aligned_required=yes
9398fi
9399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9400 conftest.$ac_objext conftest.beam conftest.$ac_ext
9401fi
9402
9403
9404if test "$aligned_required" = yes ; then
9405
9406$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9407
9408fi
9409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9410$as_echo "$aligned_required" >&6; }
9411
9412
9413# str, bytes and memoryview hash algorithm
9414
9415
9416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9417$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9418
9419# Check whether --with-hash_algorithm was given.
9420if test "${with_hash_algorithm+set}" = set; then :
9421 withval=$with_hash_algorithm;
9422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9423$as_echo "$withval" >&6; }
9424case "$withval" in
9425 siphash24)
9426 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9427
9428 ;;
9429 fnv)
9430 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9431
9432 ;;
9433 *)
9434 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9435 ;;
9436esac
9437
9438else
9439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9440$as_echo "default" >&6; }
9441fi
9442
9443
Charles-François Natalid30b0222014-05-08 23:08:51 +01009444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9445$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9446
9447# Check whether --with-address_sanitizer was given.
9448if test "${with_address_sanitizer+set}" = set; then :
9449 withval=$with_address_sanitizer;
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9451$as_echo "$withval" >&6; }
9452BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9453LDFLAGS="-fsanitize=address $LDFLAGS"
9454
9455else
9456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9457$as_echo "no" >&6; }
9458fi
9459
9460
Guido van Rossum70c7f481998-03-26 18:44:10 +00009461# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9463$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009464if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009465 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009466else
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009468LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472/* Override any GCC internal prototype to avoid an error.
9473 Use char because int might match the return type of a GCC
9474 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009475#ifdef __cplusplus
9476extern "C"
9477#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009478char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009479int
9480main ()
9481{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 ;
9484 return 0;
9485}
9486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009487if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009489else
Matthias Kloseb9621712010-04-24 17:59:49 +00009490 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009492rm -f core conftest.err conftest.$ac_objext \
9493 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009494LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9497$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009498if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009499 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009500fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009501 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9503$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009504if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009505 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009506else
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009508LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512/* Override any GCC internal prototype to avoid an error.
9513 Use char because int might match the return type of a GCC
9514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009515#ifdef __cplusplus
9516extern "C"
9517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009518char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009519int
9520main ()
9521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 ;
9524 return 0;
9525}
9526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009529else
Matthias Kloseb9621712010-04-24 17:59:49 +00009530 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009532rm -f core conftest.err conftest.$ac_objext \
9533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009534LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9537$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009538if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009539 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009540fi
9541 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009542
Matthias Kloseb9621712010-04-24 17:59:49 +00009543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9544$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009546# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009547if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9550$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009551LIBS="$withval $LIBS"
9552
9553else
Matthias Kloseb9621712010-04-24 17:59:49 +00009554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9555$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556fi
9557
Guido van Rossum7f43da71994-08-01 12:15:30 +00009558
Victor Stinner8291b5e2015-03-20 16:03:14 +01009559
9560
9561
9562
9563
9564
9565
9566if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9567 if test -n "$ac_tool_prefix"; then
9568 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9569set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9571$as_echo_n "checking for $ac_word... " >&6; }
9572if ${ac_cv_path_PKG_CONFIG+:} false; then :
9573 $as_echo_n "(cached) " >&6
9574else
9575 case $PKG_CONFIG in
9576 [\\/]* | ?:[\\/]*)
9577 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9578 ;;
9579 *)
9580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9581for as_dir in $PATH
9582do
9583 IFS=$as_save_IFS
9584 test -z "$as_dir" && as_dir=.
9585 for ac_exec_ext in '' $ac_executable_extensions; do
9586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9587 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9589 break 2
9590 fi
9591done
9592 done
9593IFS=$as_save_IFS
9594
9595 ;;
9596esac
9597fi
9598PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9599if test -n "$PKG_CONFIG"; then
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9601$as_echo "$PKG_CONFIG" >&6; }
9602else
9603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9604$as_echo "no" >&6; }
9605fi
9606
9607
9608fi
9609if test -z "$ac_cv_path_PKG_CONFIG"; then
9610 ac_pt_PKG_CONFIG=$PKG_CONFIG
9611 # Extract the first word of "pkg-config", so it can be a program name with args.
9612set dummy pkg-config; ac_word=$2
9613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9614$as_echo_n "checking for $ac_word... " >&6; }
9615if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9616 $as_echo_n "(cached) " >&6
9617else
9618 case $ac_pt_PKG_CONFIG in
9619 [\\/]* | ?:[\\/]*)
9620 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9621 ;;
9622 *)
9623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9624for as_dir in $PATH
9625do
9626 IFS=$as_save_IFS
9627 test -z "$as_dir" && as_dir=.
9628 for ac_exec_ext in '' $ac_executable_extensions; do
9629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9630 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9632 break 2
9633 fi
9634done
9635 done
9636IFS=$as_save_IFS
9637
9638 ;;
9639esac
9640fi
9641ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9642if test -n "$ac_pt_PKG_CONFIG"; then
9643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9644$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9645else
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9647$as_echo "no" >&6; }
9648fi
9649
9650 if test "x$ac_pt_PKG_CONFIG" = x; then
9651 PKG_CONFIG=""
9652 else
9653 case $cross_compiling:$ac_tool_warned in
9654yes:)
9655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9657ac_tool_warned=yes ;;
9658esac
9659 PKG_CONFIG=$ac_pt_PKG_CONFIG
9660 fi
9661else
9662 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9663fi
9664
9665fi
9666if test -n "$PKG_CONFIG"; then
9667 _pkg_min_version=0.9.0
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9669$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9670 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9672$as_echo "yes" >&6; }
9673 else
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9675$as_echo "no" >&6; }
9676 PKG_CONFIG=""
9677 fi
9678fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009679
9680# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9682$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009683
9684# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009685if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009686 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009687else
9688 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009689fi
9690
9691
Matthias Kloseb9621712010-04-24 17:59:49 +00009692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9693$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009694
9695# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9697$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009698
9699# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009700if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009701 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009702else
9703 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009704fi
9705
9706
9707if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009708 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9709else
9710 LIBFFI_INCLUDEDIR=""
9711fi
9712
9713
Matthias Kloseb9621712010-04-24 17:59:49 +00009714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9715$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009716
Stefan Krah60187b52012-03-23 19:06:27 +01009717# Check for use of the system libmpdec library
9718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9719$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9720
9721# Check whether --with-system_libmpdec was given.
9722if test "${with_system_libmpdec+set}" = set; then :
9723 withval=$with_system_libmpdec;
9724else
9725 with_system_libmpdec="no"
9726fi
9727
9728
9729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9730$as_echo "$with_system_libmpdec" >&6; }
9731
Benjamin Peterson076ed002010-10-31 17:11:02 +00009732# Check for support for loadable sqlite extensions
9733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9734$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9735# Check whether --enable-loadable-sqlite-extensions was given.
9736if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9737 enableval=$enable_loadable_sqlite_extensions;
9738else
9739 enable_loadable_sqlite_extensions="no"
9740fi
9741
9742
9743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9744$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9745
Ned Deilyd819b932013-09-06 01:07:05 -07009746# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9747
9748
9749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9750$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9751
9752# Check whether --with-tcltk-includes was given.
9753if test "${with_tcltk_includes+set}" = set; then :
9754 withval=$with_tcltk_includes;
9755else
9756 with_tcltk_includes="default"
9757fi
9758
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9760$as_echo "$with_tcltk_includes" >&6; }
9761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9762$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9763
9764# Check whether --with-tcltk-libs was given.
9765if test "${with_tcltk_libs+set}" = set; then :
9766 withval=$with_tcltk_libs;
9767else
9768 with_tcltk_libs="default"
9769fi
9770
9771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9772$as_echo "$with_tcltk_libs" >&6; }
9773if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9774then
9775 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9776 then
9777 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9778 fi
9779 TCLTK_INCLUDES=""
9780 TCLTK_LIBS=""
9781else
9782 TCLTK_INCLUDES="$with_tcltk_includes"
9783 TCLTK_LIBS="$with_tcltk_libs"
9784fi
9785
Matthias Klose55708cc2009-04-30 08:06:49 +00009786# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9788$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009789
9790# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009791if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009792 withval=$with_dbmliborder;
9793if test x$with_dbmliborder = xyes
9794then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009795as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009796else
9797 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9798 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9799 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009800 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009801 fi
9802 done
9803fi
9804fi
9805
Matthias Kloseb9621712010-04-24 17:59:49 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9807$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009808
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009809# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009810
9811
Matthias Kloseb9621712010-04-24 17:59:49 +00009812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9813$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009816if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009817 withval=$with_signal_module;
9818fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009819
9820
9821if test -z "$with_signal_module"
9822then with_signal_module="yes"
9823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9825$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009826
9827if test "${with_signal_module}" = "yes"; then
9828 USE_SIGNAL_MODULE=""
9829 SIGNAL_OBJS=""
9830else
9831 USE_SIGNAL_MODULE="#"
9832 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9833fi
9834
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009835# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009836
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009837USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839
Martin v. Löwis11437992002-04-12 09:54:03 +00009840
9841# Templates for things AC_DEFINEd more than once.
9842# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009843
9844
Martin v. Löwis11437992002-04-12 09:54:03 +00009845
Matthias Kloseb9621712010-04-24 17:59:49 +00009846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9847$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009850if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009851 withval=$with_threads;
9852fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009853
9854
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009855# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009858if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859 withval=$with_thread; with_threads=$with_thread
9860fi
9861
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009862
9863if test -z "$with_threads"
9864then with_threads="yes"
9865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9867$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009868
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009869
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009870if test "$with_threads" = "no"
9871then
9872 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009873elif test "$ac_cv_pthread_is_default" = yes
9874then
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009876
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009877 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009879
9880 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009881 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009882elif test "$ac_cv_kpthread" = "yes"
9883then
9884 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009885 if test "$ac_cv_cxx_thread" = "yes"; then
9886 CXX="$CXX -Kpthread"
9887 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009889
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009890 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009891 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009892elif test "$ac_cv_kthread" = "yes"
9893then
9894 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009895 if test "$ac_cv_cxx_thread" = "yes"; then
9896 CXX="$CXX -Kthread"
9897 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009899
9900 posix_threads=yes
9901 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009902elif test "$ac_cv_pthread" = "yes"
9903then
9904 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009905 if test "$ac_cv_cxx_thread" = "yes"; then
9906 CXX="$CXX -pthread"
9907 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009908 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009909
9910 posix_threads=yes
9911 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009912else
9913 if test ! -z "$with_threads" -a -d "$with_threads"
9914 then LDFLAGS="$LDFLAGS -L$with_threads"
9915 fi
9916 if test ! -z "$withval" -a -d "$withval"
9917 then LDFLAGS="$LDFLAGS -L$withval"
9918 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009919
9920 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009921 # define _POSIX_THREADS in unistd.h. Some apparently don't
9922 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9924$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009926/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009927
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009928#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009929#ifdef _POSIX_THREADS
9930yes
9931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009932
9933_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009936 unistd_defines_pthreads=yes
9937else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009938 unistd_defines_pthreads=no
9939fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009940rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009941
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9943$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009944
Matthias Kloseb9621712010-04-24 17:59:49 +00009945 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009946
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009947 # Just looking for pthread_create in libpthread is not enough:
9948 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9949 # So we really have to include pthread.h, and then link.
9950 _libs=$LIBS
9951 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9953$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009955/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009956
9957#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009958#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009959
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009960void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009961int
9962main ()
9963{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009964
9965pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009966 ;
9967 return 0;
9968}
9969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009970if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009971
Matthias Kloseb9621712010-04-24 17:59:49 +00009972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9973$as_echo "yes" >&6; }
9974 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009975
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009976 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009977 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009978else
Martin v. Löwis11437992002-04-12 09:54:03 +00009979
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009980 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009982if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009984
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009985 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009986 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009987else
Guido van Rossumad678af1998-10-02 14:42:15 +00009988
Matthias Kloseb9621712010-04-24 17:59:49 +00009989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9990$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009991if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009992 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009993else
Martin v. Löwis11437992002-04-12 09:54:03 +00009994 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009995LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009999/* Override any GCC internal prototype to avoid an error.
10000 Use char because int might match the return type of a GCC
10001 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010002#ifdef __cplusplus
10003extern "C"
10004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010005char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010006int
10007main ()
10008{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 ;
10011 return 0;
10012}
10013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010016else
Matthias Kloseb9621712010-04-24 17:59:49 +000010017 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010019rm -f core conftest.err conftest.$ac_objext \
10020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010021LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10024$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010025if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010026 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010027
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010028 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010029 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010030 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010031else
Greg Steinadf63d62000-07-05 10:38:09 +000010032
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10034$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010035if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010036 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010037else
Martin v. Löwis11437992002-04-12 09:54:03 +000010038 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010039LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010043/* Override any GCC internal prototype to avoid an error.
10044 Use char because int might match the return type of a GCC
10045 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010046#ifdef __cplusplus
10047extern "C"
10048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010049char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010050int
10051main ()
10052{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010053return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010054 ;
10055 return 0;
10056}
10057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010058if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010059 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010060else
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010063rm -f core conftest.err conftest.$ac_objext \
10064 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010065LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10068$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010069if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010070 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010071
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010072 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010073 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010074 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010075else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010076
Matthias Kloseb9621712010-04-24 17:59:49 +000010077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10078$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010079if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010081else
Martin v. Löwis11437992002-04-12 09:54:03 +000010082 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010083LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087/* Override any GCC internal prototype to avoid an error.
10088 Use char because int might match the return type of a GCC
10089 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010090#ifdef __cplusplus
10091extern "C"
10092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010093char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010094int
10095main ()
10096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010098 ;
10099 return 0;
10100}
10101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010102if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010104else
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010107rm -f core conftest.err conftest.$ac_objext \
10108 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010109LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10112$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010113if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010115
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010116 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010117 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010118 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010119else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010120
Matthias Kloseb9621712010-04-24 17:59:49 +000010121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10122$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010123if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010124 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010125else
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010127LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131/* Override any GCC internal prototype to avoid an error.
10132 Use char because int might match the return type of a GCC
10133 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010134#ifdef __cplusplus
10135extern "C"
10136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010137char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010138int
10139main ()
10140{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010142 ;
10143 return 0;
10144}
10145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010146if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010148else
Matthias Kloseb9621712010-04-24 17:59:49 +000010149 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010151rm -f core conftest.err conftest.$ac_objext \
10152 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010153LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10156$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010157if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010159
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010160 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010161 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010162 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010163else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010164
Martin v. Löwis130fb172001-07-19 11:00:41 +000010165 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010166fi
10167
Guido van Rossum627b2d71993-12-24 10:39:16 +000010168
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010169fi
10170
Guido van Rossum0be3e491997-05-22 20:33:33 +000010171fi
10172
Guido van Rossum49545951997-12-02 19:28:29 +000010173fi
10174
Guido van Rossumb93a8621998-05-07 13:27:32 +000010175fi
10176
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010178rm -f core conftest.err conftest.$ac_objext \
10179 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010180
Matthias Kloseb9621712010-04-24 17:59:49 +000010181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10182$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010183if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010185else
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010187LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191/* Override any GCC internal prototype to avoid an error.
10192 Use char because int might match the return type of a GCC
10193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010194#ifdef __cplusplus
10195extern "C"
10196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010197char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010198int
10199main ()
10200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 ;
10203 return 0;
10204}
10205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010206if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010208else
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010211rm -f core conftest.err conftest.$ac_objext \
10212 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010213LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10216$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010217if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010219
Martin v. Löwis130fb172001-07-19 11:00:41 +000010220 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010221 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010222 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010223fi
10224
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010225
Neal Norwitza978ab02002-11-02 16:58:05 +000010226 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10228$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010229if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010230 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010231else
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010233LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237/* Override any GCC internal prototype to avoid an error.
10238 Use char because int might match the return type of a GCC
10239 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010240#ifdef __cplusplus
10241extern "C"
10242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010243char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010244int
10245main ()
10246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 ;
10249 return 0;
10250}
10251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010252if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010254else
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010257rm -f core conftest.err conftest.$ac_objext \
10258 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010259LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10262$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010263if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010265
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010266 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010267 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010268 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010269fi
10270
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010271 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010272fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010273
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010274if test "$posix_threads" = "yes"; then
10275 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010276
Matthias Kloseb9621712010-04-24 17:59:49 +000010277$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010278
10279 fi
10280
10281 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10282 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010283 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010284$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010285
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010286 ;;
10287 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010288$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010289
10290 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010291 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010292$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010293
10294 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010295 esac
10296
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10298$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010299 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010301else
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010303 ac_cv_pthread_system_supported=no
10304else
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010306/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010307
10308 #include <stdio.h>
10309 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010310 void *foo(void *parm) {
10311 return NULL;
10312 }
10313 main() {
10314 pthread_attr_t attr;
10315 pthread_t id;
10316 if (pthread_attr_init(&attr)) exit(-1);
10317 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10318 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10319 exit(0);
10320 }
10321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010322if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010323 ac_cv_pthread_system_supported=yes
10324else
Matthias Kloseb9621712010-04-24 17:59:49 +000010325 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10328 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010329fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010331
Guido van Rossum627b2d71993-12-24 10:39:16 +000010332fi
10333
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10335$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010336 if test "$ac_cv_pthread_system_supported" = "yes"; then
10337
Matthias Kloseb9621712010-04-24 17:59:49 +000010338$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010339
10340 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 for ac_func in pthread_sigmask
10342do :
10343 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010344if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010345 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010346#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010347_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010348 case $ac_sys_system in
10349 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010352
10353 ;;
10354 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010355fi
10356done
10357
Christian Heimesf77b4b22013-08-21 13:26:05 +020010358 for ac_func in pthread_atfork
10359do :
10360 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10361if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10362 cat >>confdefs.h <<_ACEOF
10363#define HAVE_PTHREAD_ATFORK 1
10364_ACEOF
10365
10366fi
10367done
10368
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010369fi
10370
10371
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010372# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010373
Matthias Kloseb9621712010-04-24 17:59:49 +000010374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10375$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010377if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010379 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010382 ipv6=no
10383 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10385$as_echo "yes" >&6; }
10386 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010387
10388 ipv6=yes
10389 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010391else
Martin v. Löwis11437992002-04-12 09:54:03 +000010392
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010394/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010395 /* AF_INET6 available check */
10396#include <sys/types.h>
10397#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010398int
10399main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010400{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010401int domain = AF_INET6;
10402 ;
10403 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010404}
Martin v. Löwis11437992002-04-12 09:54:03 +000010405_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010406if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010407
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10409$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010410 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010411
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010412else
Matthias Kloseb159a552010-04-25 21:00:44 +000010413
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10415$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010416 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010417
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010418fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010421if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10423$as_echo_n "checking if RFC2553 API is available... " >&6; }
10424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010425/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010426
10427 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010428#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010429int
10430main ()
10431{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010432struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010433 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 ;
10435 return 0;
10436}
Matthias Kloseb159a552010-04-25 21:00:44 +000010437
Martin v. Löwis11437992002-04-12 09:54:03 +000010438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010439if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010440
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010442$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010443 ipv6=yes
10444
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010445else
Matthias Kloseb159a552010-04-25 21:00:44 +000010446
10447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010448$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010449 ipv6=no
10450
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010453fi
10454
10455if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010457
10458fi
10459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010460fi
10461
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010462
10463ipv6type=unknown
10464ipv6lib=none
10465ipv6trylibc=no
10466
10467if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10469$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010470 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10471 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010472 case $i in
10473 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010475/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010476
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010477#include <netinet/in.h>
10478#ifdef IPV6_INRIA_VERSION
10479yes
10480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010481_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010484 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010485fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010486rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010487
10488 ;;
10489 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010491/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010492
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010493#include <netinet/in.h>
10494#ifdef __KAME__
10495yes
10496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010497_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010499 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010500 ipv6type=$i;
10501 ipv6lib=inet6
10502 ipv6libdir=/usr/local/v6/lib
10503 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010504fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010505rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010506
10507 ;;
10508 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010510/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010511
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010512#include <features.h>
10513#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10514yes
10515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010516_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010517if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010519 ipv6type=$i;
10520 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010521fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010522rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010523
10524 ;;
10525 linux-inet6)
10526 if test -d /usr/inet6; then
10527 ipv6type=$i
10528 ipv6lib=inet6
10529 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010530 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010531 fi
10532 ;;
10533 solaris)
10534 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010535 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010536 ipv6type=$i
10537 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010538 fi
10539 fi
10540 ;;
10541 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010543/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010544
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010545#include <sys/param.h>
10546#ifdef _TOSHIBA_INET6
10547yes
10548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010549_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010552 ipv6type=$i;
10553 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010554 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010555fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010556rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010557
10558 ;;
10559 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010561/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010562
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010563#include </usr/local/v6/include/sys/v6config.h>
10564#ifdef __V6D__
10565yes
10566#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010567_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010570 ipv6type=$i;
10571 ipv6lib=v6;
10572 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010573 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010574fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010575rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010576
10577 ;;
10578 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010580/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010581
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010582#include <sys/param.h>
10583#ifdef _ZETA_MINAMI_INET6
10584yes
10585#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010586_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010587if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010589 ipv6type=$i;
10590 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010591 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010592fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010593rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010594
10595 ;;
10596 esac
10597 if test "$ipv6type" != "unknown"; then
10598 break
10599 fi
10600 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10602$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010603fi
10604
10605if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10606 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10607 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10608 echo "using lib$ipv6lib"
10609 else
10610 if test $ipv6trylibc = "yes"; then
10611 echo "using libc"
10612 else
10613 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10614 echo "You need to fetch lib$ipv6lib.a from appropriate"
10615 echo 'ipv6 kit and compile beforehand.'
10616 exit 1
10617 fi
10618 fi
10619fi
10620
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10622$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10624/* end confdefs.h. */
10625 /* CAN_RAW_FD_FRAMES available check */
10626#include <linux/can/raw.h>
10627int
10628main ()
10629{
10630int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10631 ;
10632 return 0;
10633}
10634_ACEOF
10635if ac_fn_c_try_compile "$LINENO"; then :
10636
10637
10638$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10639
10640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10641$as_echo "yes" >&6; }
10642
10643else
10644
10645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10646$as_echo "no" >&6; }
10647
10648fi
10649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10650
Matthias Kloseb9621712010-04-24 17:59:49 +000010651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10652$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010654/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010655
10656 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010657int
10658main ()
10659{
10660FSIORefNum fRef = 0
10661 ;
10662 return 0;
10663}
Matthias Kloseb159a552010-04-25 21:00:44 +000010664
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010666if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010667
Matthias Kloseb159a552010-04-25 21:00:44 +000010668
Matthias Kloseb9621712010-04-24 17:59:49 +000010669$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010670
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10672$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010673
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010674else
Matthias Kloseb159a552010-04-25 21:00:44 +000010675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10677$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010678
10679fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10681
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010682# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10684$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010687if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688 withval=$with_doc_strings;
10689fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010690
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010691
10692if test -z "$with_doc_strings"
10693then with_doc_strings="yes"
10694fi
10695if test "$with_doc_strings" != "no"
10696then
10697
Matthias Kloseb9621712010-04-24 17:59:49 +000010698$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010699
10700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10702$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010703
Antoine Pitrou042b1282010-08-13 21:15:58 +000010704# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10706$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010709if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010711if test "$withval" != no
10712then
10713
Matthias Kloseb9621712010-04-24 17:59:49 +000010714$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10717$as_echo "yes" >&6; }
10718else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10719$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010720fi
10721else
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10723$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010724fi
10725
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010726
10727# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10729$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010731# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010732if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733 withval=$with_pymalloc;
10734fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010735
Neil Schemenauera35c6882001-02-27 04:45:05 +000010736
Neil Schemenauer16c22972002-03-22 15:34:49 +000010737if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010738then
10739 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010740fi
10741if test "$with_pymalloc" != "no"
10742then
Martin v. Löwis11437992002-04-12 09:54:03 +000010743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010745
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010746 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10749$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010750
Benjamin Peterson05159c42009-12-03 03:01:27 +000010751# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10753$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010754
10755# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010756if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010757 withval=$with_valgrind;
10758else
10759 with_valgrind=no
10760fi
10761
Matthias Kloseb9621712010-04-24 17:59:49 +000010762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10763$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010764if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 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 +020010766if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010767
Matthias Kloseb9621712010-04-24 17:59:49 +000010768$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010769
10770else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010771 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010772
10773fi
10774
10775
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010776 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010777fi
10778
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010779# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010780
Guido van Rossum98935bf2001-09-05 19:13:16 +000010781DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010782
Guido van Rossume97ee181999-12-20 21:27:22 +000010783# the dlopen() function means we might want to use dynload_shlib.o. some
10784# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010785for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010786do :
10787 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010788if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010790#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010791_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010792
Guido van Rossume97ee181999-12-20 21:27:22 +000010793fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010794done
Guido van Rossume97ee181999-12-20 21:27:22 +000010795
Michael W. Hudson54241132001-12-07 15:38:26 +000010796
Guido van Rossume97ee181999-12-20 21:27:22 +000010797# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10798# loading of modules.
10799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10801$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010802if test -z "$DYNLOADFILE"
10803then
10804 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010805 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10806 if test "$ac_cv_func_dlopen" = yes
10807 then DYNLOADFILE="dynload_shlib.o"
10808 else DYNLOADFILE="dynload_aix.o"
10809 fi
10810 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010811 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010812 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10813 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010814 *)
10815 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10816 # out any dynamic loading
10817 if test "$ac_cv_func_dlopen" = yes
10818 then DYNLOADFILE="dynload_shlib.o"
10819 else DYNLOADFILE="dynload_stub.o"
10820 fi
10821 ;;
10822 esac
10823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10825$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010826if test "$DYNLOADFILE" != "dynload_stub.o"
10827then
Martin v. Löwis11437992002-04-12 09:54:03 +000010828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010830
10831fi
10832
Neil Schemenauer4e425612001-06-19 15:44:15 +000010833# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10834
Michael W. Hudson54241132001-12-07 15:38:26 +000010835
Matthias Kloseb9621712010-04-24 17:59:49 +000010836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10837$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010838if test -z "$MACHDEP_OBJS"
10839then
Jack Jansene578a632001-08-15 01:27:14 +000010840 MACHDEP_OBJS=$extra_machdep_objs
10841else
10842 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010843fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010844if test -z "$MACHDEP_OBJS"; then
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10846$as_echo "none" >&6; }
10847else
10848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10849$as_echo "$MACHDEP_OBJS" >&6; }
10850fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010851
Guido van Rossum627b2d71993-12-24 10:39:16 +000010852# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010853for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010854 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010855 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010856 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010857 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010858 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010859 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010860 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10861 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010862 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010863 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010864 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010865 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010866 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010867 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010868 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10869 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010870 sigaction sigaltstack siginterrupt sigpending sigrelse \
10871 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010872 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010873 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010874 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010875do :
10876 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10877ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010878if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010880#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010881_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010882
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010883fi
10884done
10885
Michael W. Hudson54241132001-12-07 15:38:26 +000010886
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010887ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10888 #include <dirent.h>
10889"
10890if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10891
10892$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10893
10894fi
10895
10896
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010897# For some functions, having a definition is not sufficient, since
10898# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10900$as_echo_n "checking for chroot... " >&6; }
10901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010902/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010903#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010904int
10905main ()
10906{
10907void *x=chroot
10908 ;
10909 return 0;
10910}
10911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010912if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010913
Matthias Kloseb9621712010-04-24 17:59:49 +000010914$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010915
Matthias Kloseb159a552010-04-25 21:00:44 +000010916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010917$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010918else
Matthias Kloseb9621712010-04-24 17:59:49 +000010919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10920$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010921
10922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10925$as_echo_n "checking for link... " >&6; }
10926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010927/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010928#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010929int
10930main ()
10931{
10932void *x=link
10933 ;
10934 return 0;
10935}
10936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010937if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010940
Matthias Kloseb159a552010-04-25 21:00:44 +000010941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010942$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010943else
Matthias Kloseb9621712010-04-24 17:59:49 +000010944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10945$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010946
10947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10950$as_echo_n "checking for symlink... " >&6; }
10951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010952/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010953#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010954int
10955main ()
10956{
10957void *x=symlink
10958 ;
10959 return 0;
10960}
10961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010965
Matthias Kloseb159a552010-04-25 21:00:44 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010967$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010968else
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010971
10972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10975$as_echo_n "checking for fchdir... " >&6; }
10976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010977/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010978#include <unistd.h>
10979int
10980main ()
10981{
10982void *x=fchdir
10983 ;
10984 return 0;
10985}
10986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010987if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010988
Matthias Kloseb9621712010-04-24 17:59:49 +000010989$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010990
Matthias Kloseb159a552010-04-25 21:00:44 +000010991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010992$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010993else
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10995$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010996
10997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11000$as_echo_n "checking for fsync... " >&6; }
11001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011002/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011003#include <unistd.h>
11004int
11005main ()
11006{
11007void *x=fsync
11008 ;
11009 return 0;
11010}
11011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011015
Matthias Kloseb159a552010-04-25 21:00:44 +000011016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011018else
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11020$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011021
11022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11025$as_echo_n "checking for fdatasync... " >&6; }
11026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011027/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011028#include <unistd.h>
11029int
11030main ()
11031{
11032void *x=fdatasync
11033 ;
11034 return 0;
11035}
11036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011037if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011038
Matthias Kloseb9621712010-04-24 17:59:49 +000011039$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011040
Matthias Kloseb159a552010-04-25 21:00:44 +000011041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011042$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011043else
Matthias Kloseb9621712010-04-24 17:59:49 +000011044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11045$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011046
11047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11050$as_echo_n "checking for epoll... " >&6; }
11051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011052/* end confdefs.h. */
11053#include <sys/epoll.h>
11054int
11055main ()
11056{
11057void *x=epoll_create
11058 ;
11059 return 0;
11060}
11061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011062if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011063
Matthias Kloseb9621712010-04-24 17:59:49 +000011064$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011065
Matthias Kloseb159a552010-04-25 21:00:44 +000011066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011067$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011068else
Matthias Kloseb9621712010-04-24 17:59:49 +000011069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11070$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011071
11072fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11075$as_echo_n "checking for epoll_create1... " >&6; }
11076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11077/* end confdefs.h. */
11078#include <sys/epoll.h>
11079int
11080main ()
11081{
11082void *x=epoll_create1
11083 ;
11084 return 0;
11085}
11086_ACEOF
11087if ac_fn_c_try_compile "$LINENO"; then :
11088
11089$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11090
11091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11092$as_echo "yes" >&6; }
11093else
11094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11095$as_echo "no" >&6; }
11096
11097fi
11098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11100$as_echo_n "checking for kqueue... " >&6; }
11101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011102/* end confdefs.h. */
11103
11104#include <sys/types.h>
11105#include <sys/event.h>
11106
11107int
11108main ()
11109{
11110int x=kqueue()
11111 ;
11112 return 0;
11113}
11114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011115if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011116
Matthias Kloseb9621712010-04-24 17:59:49 +000011117$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011118
Matthias Kloseb159a552010-04-25 21:00:44 +000011119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011120$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011121else
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11123$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011124
11125fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11128$as_echo_n "checking for prlimit... " >&6; }
11129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11130/* end confdefs.h. */
11131
11132#include <sys/time.h>
11133#include <sys/resource.h>
11134
11135int
11136main ()
11137{
11138void *x=prlimit
11139 ;
11140 return 0;
11141}
11142_ACEOF
11143if ac_fn_c_try_compile "$LINENO"; then :
11144
11145$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11146
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11148$as_echo "yes" >&6; }
11149else
11150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11151$as_echo "no" >&6; }
11152
11153fi
11154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11155
Martin v. Löwisd5843682002-11-21 20:41:28 +000011156# On some systems (eg. FreeBSD 5), we would find a definition of the
11157# functions ctermid_r, setgroups in the library, but no prototype
11158# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11159# address to avoid compiler warnings and potential miscompilations
11160# because of the missing prototypes.
11161
Matthias Kloseb9621712010-04-24 17:59:49 +000011162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11163$as_echo_n "checking for ctermid_r... " >&6; }
11164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011165/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011166
Martin v. Löwisd5843682002-11-21 20:41:28 +000011167#include <stdio.h>
11168
Martin v. Löwisd5843682002-11-21 20:41:28 +000011169int
11170main ()
11171{
11172void* p = ctermid_r
11173 ;
11174 return 0;
11175}
11176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011178
Matthias Kloseb9621712010-04-24 17:59:49 +000011179$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011180
Matthias Kloseb159a552010-04-25 21:00:44 +000011181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011182$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011183else
Matthias Kloseb9621712010-04-24 17:59:49 +000011184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11185$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011186
11187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11189
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11191$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011192if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011193 $as_echo_n "(cached) " >&6
11194else
11195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011196/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011197#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011198int
11199main ()
11200{
11201void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011202
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011203 ;
11204 return 0;
11205}
11206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011207if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011208 ac_cv_flock_decl=yes
11209else
11210 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011211
11212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011214
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011215fi
11216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11217$as_echo "$ac_cv_flock_decl" >&6; }
11218if test "x${ac_cv_flock_decl}" = xyes; then
11219 for ac_func in flock
11220do :
11221 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011222if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011223 cat >>confdefs.h <<_ACEOF
11224#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011225_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011226
Antoine Pitroua3000072010-09-07 14:52:42 +000011227else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011229$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011230if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011231 $as_echo_n "(cached) " >&6
11232else
11233 ac_check_lib_save_LIBS=$LIBS
11234LIBS="-lbsd $LIBS"
11235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11236/* end confdefs.h. */
11237
11238/* Override any GCC internal prototype to avoid an error.
11239 Use char because int might match the return type of a GCC
11240 builtin and then its argument prototype would still apply. */
11241#ifdef __cplusplus
11242extern "C"
11243#endif
11244char flock ();
11245int
11246main ()
11247{
11248return flock ();
11249 ;
11250 return 0;
11251}
11252_ACEOF
11253if ac_fn_c_try_link "$LINENO"; then :
11254 ac_cv_lib_bsd_flock=yes
11255else
11256 ac_cv_lib_bsd_flock=no
11257fi
11258rm -f core conftest.err conftest.$ac_objext \
11259 conftest$ac_exeext conftest.$ac_ext
11260LIBS=$ac_check_lib_save_LIBS
11261fi
11262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11263$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011264if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011265 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011266
11267
11268$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11269
11270
11271fi
11272
11273
11274fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011275done
11276
Antoine Pitroua3000072010-09-07 14:52:42 +000011277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11280$as_echo_n "checking for getpagesize... " >&6; }
11281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011282/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011283
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011284#include <unistd.h>
11285
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011286int
11287main ()
11288{
11289void* p = getpagesize
11290 ;
11291 return 0;
11292}
11293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011294if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011295
Matthias Kloseb9621712010-04-24 17:59:49 +000011296$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011297
Matthias Kloseb159a552010-04-25 21:00:44 +000011298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011299$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011300else
Matthias Kloseb9621712010-04-24 17:59:49 +000011301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11302$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011303
11304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011306
Victor Stinner984890f2011-11-24 13:53:38 +010011307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11308$as_echo_n "checking for broken unsetenv... " >&6; }
11309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11310/* end confdefs.h. */
11311
11312#include <stdlib.h>
11313
11314int
11315main ()
11316{
11317int res = unsetenv("DUMMY")
11318 ;
11319 return 0;
11320}
11321_ACEOF
11322if ac_fn_c_try_compile "$LINENO"; then :
11323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11324$as_echo "no" >&6; }
11325else
11326
11327$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11328
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11330$as_echo "yes" >&6; }
11331
11332fi
11333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11334
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011335for ac_prog in true
11336do
11337 # Extract the first word of "$ac_prog", so it can be a program name with args.
11338set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11340$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011341if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011342 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011343else
11344 if test -n "$TRUE"; then
11345 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11346else
11347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11348for as_dir in $PATH
11349do
11350 IFS=$as_save_IFS
11351 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011352 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011353 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011354 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011355 $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 +000011356 break 2
11357 fi
11358done
Matthias Kloseb9621712010-04-24 17:59:49 +000011359 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011361
11362fi
11363fi
11364TRUE=$ac_cv_prog_TRUE
11365if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11367$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011368else
Matthias Kloseb9621712010-04-24 17:59:49 +000011369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11370$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011371fi
11372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011374 test -n "$TRUE" && break
11375done
11376test -n "$TRUE" || TRUE="/bin/true"
11377
11378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11380$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011381if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011382 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011383else
11384 ac_check_lib_save_LIBS=$LIBS
11385LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011387/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011389/* Override any GCC internal prototype to avoid an error.
11390 Use char because int might match the return type of a GCC
11391 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011392#ifdef __cplusplus
11393extern "C"
11394#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011395char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011396int
11397main ()
11398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011400 ;
11401 return 0;
11402}
11403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011404if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011405 ac_cv_lib_c_inet_aton=yes
11406else
Matthias Kloseb9621712010-04-24 17:59:49 +000011407 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011409rm -f core conftest.err conftest.$ac_objext \
11410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011411LIBS=$ac_check_lib_save_LIBS
11412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11414$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011415if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011416 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011417else
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11419$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011420if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011421 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011422else
11423 ac_check_lib_save_LIBS=$LIBS
11424LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011426/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428/* Override any GCC internal prototype to avoid an error.
11429 Use char because int might match the return type of a GCC
11430 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011431#ifdef __cplusplus
11432extern "C"
11433#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011434char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011435int
11436main ()
11437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011439 ;
11440 return 0;
11441}
11442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011443if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011444 ac_cv_lib_resolv_inet_aton=yes
11445else
Matthias Kloseb9621712010-04-24 17:59:49 +000011446 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011448rm -f core conftest.err conftest.$ac_objext \
11449 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011450LIBS=$ac_check_lib_save_LIBS
11451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11453$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011454if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011455 cat >>confdefs.h <<_ACEOF
11456#define HAVE_LIBRESOLV 1
11457_ACEOF
11458
11459 LIBS="-lresolv $LIBS"
11460
11461fi
11462
11463
11464fi
11465
11466
Christian Heimesd0764e22007-12-04 15:00:33 +000011467# On Tru64, chflags seems to be present, but calling it will
11468# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11470$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011471if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011473else
Matthias Kloseb9621712010-04-24 17:59:49 +000011474 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011475 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011476else
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011478/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011479
Christian Heimesd0764e22007-12-04 15:00:33 +000011480#include <sys/stat.h>
11481#include <unistd.h>
11482int main(int argc, char*argv[])
11483{
11484 if(chflags(argv[0], 0) != 0)
11485 return 1;
11486 return 0;
11487}
Ned Deily3eb67d52011-06-28 00:00:28 -070011488
Christian Heimesd0764e22007-12-04 15:00:33 +000011489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011490if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011491 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011492else
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11496 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011497fi
11498
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011499
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11502$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011503if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011505if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011506 ac_cv_have_chflags="yes"
11507else
11508 ac_cv_have_chflags="no"
11509fi
11510
11511fi
11512if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011515
11516fi
11517
Matthias Kloseb9621712010-04-24 17:59:49 +000011518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11519$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011520if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011521 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011522else
Matthias Kloseb9621712010-04-24 17:59:49 +000011523 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011524 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011525else
Matthias Kloseb9621712010-04-24 17:59:49 +000011526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011527/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011528
Christian Heimesd0764e22007-12-04 15:00:33 +000011529#include <sys/stat.h>
11530#include <unistd.h>
11531int main(int argc, char*argv[])
11532{
11533 if(lchflags(argv[0], 0) != 0)
11534 return 1;
11535 return 0;
11536}
Ned Deily3eb67d52011-06-28 00:00:28 -070011537
Christian Heimesd0764e22007-12-04 15:00:33 +000011538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011539if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011540 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011541else
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011546fi
11547
11548
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11551$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011552if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011553 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011554if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011555 ac_cv_have_lchflags="yes"
11556else
11557 ac_cv_have_lchflags="no"
11558fi
11559
11560fi
11561if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011562
Matthias Kloseb9621712010-04-24 17:59:49 +000011563$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011564
11565fi
11566
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011567case $ac_sys_system/$ac_sys_release in
11568Darwin/*)
11569 _CUR_CFLAGS="${CFLAGS}"
11570 _CUR_LDFLAGS="${LDFLAGS}"
11571 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11572 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11573 ;;
11574esac
11575
Matthias Kloseb9621712010-04-24 17:59:49 +000011576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11577$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011578if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011580else
11581 ac_check_lib_save_LIBS=$LIBS
11582LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011584/* end confdefs.h. */
11585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586/* Override any GCC internal prototype to avoid an error.
11587 Use char because int might match the return type of a GCC
11588 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011589#ifdef __cplusplus
11590extern "C"
11591#endif
11592char inflateCopy ();
11593int
11594main ()
11595{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011597 ;
11598 return 0;
11599}
11600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011601if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011602 ac_cv_lib_z_inflateCopy=yes
11603else
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011606rm -f core conftest.err conftest.$ac_objext \
11607 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011608LIBS=$ac_check_lib_save_LIBS
11609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11611$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011612if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011613
Matthias Kloseb9621712010-04-24 17:59:49 +000011614$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011615
11616fi
11617
11618
11619case $ac_sys_system/$ac_sys_release in
11620Darwin/*)
11621 CFLAGS="${_CUR_CFLAGS}"
11622 LDFLAGS="${_CUR_LDFLAGS}"
11623 ;;
11624esac
11625
Matthias Kloseb9621712010-04-24 17:59:49 +000011626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11627$as_echo_n "checking for hstrerror... " >&6; }
11628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011629/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011630
Martin v. Löwise9416172003-05-03 10:12:45 +000011631#include <netdb.h>
11632
Martin v. Löwise9416172003-05-03 10:12:45 +000011633int
11634main ()
11635{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011636void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011637 ;
11638 return 0;
11639}
11640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011644
Matthias Kloseb159a552010-04-25 21:00:44 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011646$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011647else
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011650
11651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011652rm -f core conftest.err conftest.$ac_objext \
11653 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011654
Matthias Kloseb9621712010-04-24 17:59:49 +000011655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11656$as_echo_n "checking for inet_aton... " >&6; }
11657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011658/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011659
Martin v. Löwis86d66262006-02-17 08:40:11 +000011660#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011661#include <sys/socket.h>
11662#include <netinet/in.h>
11663#include <arpa/inet.h>
11664
Martin v. Löwise9416172003-05-03 10:12:45 +000011665int
11666main ()
11667{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011668void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011669 ;
11670 return 0;
11671}
11672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011673if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011674
Matthias Kloseb9621712010-04-24 17:59:49 +000011675$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011676
Matthias Kloseb159a552010-04-25 21:00:44 +000011677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011678$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011679else
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11681$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011682
11683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011684rm -f core conftest.err conftest.$ac_objext \
11685 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011686
Matthias Kloseb9621712010-04-24 17:59:49 +000011687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11688$as_echo_n "checking for inet_pton... " >&6; }
11689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011690/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011691
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011692#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011693#include <sys/socket.h>
11694#include <netinet/in.h>
11695#include <arpa/inet.h>
11696
Martin v. Löwise9416172003-05-03 10:12:45 +000011697int
11698main ()
11699{
11700void* p = inet_pton
11701 ;
11702 return 0;
11703}
11704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011705if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011706
Matthias Kloseb9621712010-04-24 17:59:49 +000011707$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011708
Matthias Kloseb159a552010-04-25 21:00:44 +000011709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011710$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011711else
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11713$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011714
11715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011717
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011718# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11720$as_echo_n "checking for setgroups... " >&6; }
11721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011722/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011723
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011724#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011725#ifdef HAVE_GRP_H
11726#include <grp.h>
11727#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011728
Martin v. Löwisd5843682002-11-21 20:41:28 +000011729int
11730main ()
11731{
11732void* p = setgroups
11733 ;
11734 return 0;
11735}
11736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011738
Matthias Kloseb9621712010-04-24 17:59:49 +000011739$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011740
Matthias Kloseb159a552010-04-25 21:00:44 +000011741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011742$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011743else
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11745$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011746
11747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011749
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011750# check for openpty and forkpty
11751
11752for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011753do :
11754 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011755if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011757#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011758_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011759
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011760else
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11762$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011763if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011765else
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011767LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011771/* Override any GCC internal prototype to avoid an error.
11772 Use char because int might match the return type of a GCC
11773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011774#ifdef __cplusplus
11775extern "C"
11776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011777char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011778int
11779main ()
11780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011781return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011791rm -f core conftest.err conftest.$ac_objext \
11792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011793LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11796$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011797if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011799 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011800else
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11802$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011803if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011805else
11806 ac_check_lib_save_LIBS=$LIBS
11807LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011809/* end confdefs.h. */
11810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011811/* Override any GCC internal prototype to avoid an error.
11812 Use char because int might match the return type of a GCC
11813 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011814#ifdef __cplusplus
11815extern "C"
11816#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011817char openpty ();
11818int
11819main ()
11820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011821return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011822 ;
11823 return 0;
11824}
11825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011826if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011827 ac_cv_lib_bsd_openpty=yes
11828else
Matthias Kloseb9621712010-04-24 17:59:49 +000011829 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011831rm -f core conftest.err conftest.$ac_objext \
11832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011833LIBS=$ac_check_lib_save_LIBS
11834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11836$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011837if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011839 LIBS="$LIBS -lbsd"
11840fi
11841
11842
11843fi
11844
Fred Drake8cef4cf2000-06-28 16:40:38 +000011845
11846fi
11847done
11848
11849for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011850do :
11851 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011852if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011853 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011854#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011855_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011856
Fred Drake8cef4cf2000-06-28 16:40:38 +000011857else
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11859$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011860if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011862else
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011864LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011868/* Override any GCC internal prototype to avoid an error.
11869 Use char because int might match the return type of a GCC
11870 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011871#ifdef __cplusplus
11872extern "C"
11873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011874char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011875int
11876main ()
11877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011878return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011879 ;
11880 return 0;
11881}
11882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011883if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011884 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011885else
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011888rm -f core conftest.err conftest.$ac_objext \
11889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011890LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11893$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011894if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011895 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011896 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011897else
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11899$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011900if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011902else
11903 ac_check_lib_save_LIBS=$LIBS
11904LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011906/* end confdefs.h. */
11907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011908/* Override any GCC internal prototype to avoid an error.
11909 Use char because int might match the return type of a GCC
11910 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011911#ifdef __cplusplus
11912extern "C"
11913#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011914char forkpty ();
11915int
11916main ()
11917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011918return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011919 ;
11920 return 0;
11921}
11922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011924 ac_cv_lib_bsd_forkpty=yes
11925else
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011928rm -f core conftest.err conftest.$ac_objext \
11929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011930LIBS=$ac_check_lib_save_LIBS
11931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11933$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011934if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011935 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011936 LIBS="$LIBS -lbsd"
11937fi
11938
11939
11940fi
11941
Fred Drake8cef4cf2000-06-28 16:40:38 +000011942
11943fi
11944done
11945
Jack Jansendd19cf82001-12-06 22:36:17 +000011946
Christian Heimesb186d002008-03-18 15:15:01 +000011947# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011948for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011949do :
11950 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011951if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011952 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011953#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011954_ACEOF
11955
11956fi
11957done
11958
11959
Michael W. Hudson54241132001-12-07 15:38:26 +000011960# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011961for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011962do :
11963 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11964ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011965if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011967#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011968_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011969
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011970fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011971done
11972
Michael W. Hudson54241132001-12-07 15:38:26 +000011973
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011974ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011975if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011976 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011977
Martin v. Löwis1142de32002-03-29 16:28:31 +000011978else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011979 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011980 *" dup2.$ac_objext "* ) ;;
11981 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011983esac
11984
Martin v. Löwis1142de32002-03-29 16:28:31 +000011985fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011986
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011987ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011988if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011989 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11990
11991else
11992 case " $LIBOBJS " in
11993 *" strdup.$ac_objext "* ) ;;
11994 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11995 ;;
11996esac
11997
11998fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011999
12000
12001for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012002do :
12003 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012004if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012006#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012009/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012011int
12012main ()
12013{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012014getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012015 ;
12016 return 0;
12017}
12018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012019if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012020
Matthias Kloseb9621712010-04-24 17:59:49 +000012021$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012022
Guido van Rossum627b2d71993-12-24 10:39:16 +000012023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012025
Guido van Rossum627b2d71993-12-24 10:39:16 +000012026fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012027done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012028
Jack Jansen150753c2003-03-29 22:07:47 +000012029for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012030do :
12031 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012032if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012033 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012034#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012037/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012038#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012039int
12040main ()
12041{
12042setpgrp(0,0);
12043 ;
12044 return 0;
12045}
12046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012050
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012053
12054fi
12055done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012056
Thomas Wouters3a584202000-08-05 23:28:51 +000012057for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012058do :
12059 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if test "x$ac_cv_func_gettimeofday" = 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_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012065/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012066#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012067int
12068main ()
12069{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012070gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012071 ;
12072 return 0;
12073}
12074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012075if ac_fn_c_try_compile "$LINENO"; then :
12076
Guido van Rossum627b2d71993-12-24 10:39:16 +000012077else
Skip Montanaro6dead952003-09-25 14:50:04 +000012078
Matthias Kloseb9621712010-04-24 17:59:49 +000012079$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012080
Martin v. Löwis11437992002-04-12 09:54:03 +000012081
Guido van Rossum627b2d71993-12-24 10:39:16 +000012082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012084
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012085fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012086done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012087
Michael W. Hudson54241132001-12-07 15:38:26 +000012088
Victor Stinnere0be4232011-10-25 13:06:09 +020012089for ac_func in clock_gettime
12090do :
12091 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12092if test "x$ac_cv_func_clock_gettime" = xyes; then :
12093 cat >>confdefs.h <<_ACEOF
12094#define HAVE_CLOCK_GETTIME 1
12095_ACEOF
12096
12097else
12098
12099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12100$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12101if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12102 $as_echo_n "(cached) " >&6
12103else
12104 ac_check_lib_save_LIBS=$LIBS
12105LIBS="-lrt $LIBS"
12106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12107/* end confdefs.h. */
12108
12109/* Override any GCC internal prototype to avoid an error.
12110 Use char because int might match the return type of a GCC
12111 builtin and then its argument prototype would still apply. */
12112#ifdef __cplusplus
12113extern "C"
12114#endif
12115char clock_gettime ();
12116int
12117main ()
12118{
12119return clock_gettime ();
12120 ;
12121 return 0;
12122}
12123_ACEOF
12124if ac_fn_c_try_link "$LINENO"; then :
12125 ac_cv_lib_rt_clock_gettime=yes
12126else
12127 ac_cv_lib_rt_clock_gettime=no
12128fi
12129rm -f core conftest.err conftest.$ac_objext \
12130 conftest$ac_exeext conftest.$ac_ext
12131LIBS=$ac_check_lib_save_LIBS
12132fi
12133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12134$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12135if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12136
Victor Stinner7efb8332014-08-29 15:41:08 +020012137 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012138 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12139
12140
12141$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12142
12143
12144fi
12145
12146
12147fi
12148done
12149
12150
12151for ac_func in clock_getres
12152do :
12153 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12154if test "x$ac_cv_func_clock_getres" = xyes; then :
12155 cat >>confdefs.h <<_ACEOF
12156#define HAVE_CLOCK_GETRES 1
12157_ACEOF
12158
12159else
12160
12161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12162$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12163if ${ac_cv_lib_rt_clock_getres+:} false; then :
12164 $as_echo_n "(cached) " >&6
12165else
12166 ac_check_lib_save_LIBS=$LIBS
12167LIBS="-lrt $LIBS"
12168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12169/* end confdefs.h. */
12170
12171/* Override any GCC internal prototype to avoid an error.
12172 Use char because int might match the return type of a GCC
12173 builtin and then its argument prototype would still apply. */
12174#ifdef __cplusplus
12175extern "C"
12176#endif
12177char clock_getres ();
12178int
12179main ()
12180{
12181return clock_getres ();
12182 ;
12183 return 0;
12184}
12185_ACEOF
12186if ac_fn_c_try_link "$LINENO"; then :
12187 ac_cv_lib_rt_clock_getres=yes
12188else
12189 ac_cv_lib_rt_clock_getres=no
12190fi
12191rm -f core conftest.err conftest.$ac_objext \
12192 conftest$ac_exeext conftest.$ac_ext
12193LIBS=$ac_check_lib_save_LIBS
12194fi
12195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12196$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12197if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12198
12199 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12200
12201
12202fi
12203
12204
12205fi
12206done
12207
12208
Matthias Kloseb9621712010-04-24 17:59:49 +000012209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12210$as_echo_n "checking for major... " >&6; }
12211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012212/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012213
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012214#if defined(MAJOR_IN_MKDEV)
12215#include <sys/mkdev.h>
12216#elif defined(MAJOR_IN_SYSMACROS)
12217#include <sys/sysmacros.h>
12218#else
12219#include <sys/types.h>
12220#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012221
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012222int
12223main ()
12224{
12225
12226 makedev(major(0),minor(0));
12227
12228 ;
12229 return 0;
12230}
12231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012233
12234
Matthias Kloseb9621712010-04-24 17:59:49 +000012235$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012236
Matthias Kloseb9621712010-04-24 17:59:49 +000012237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12238$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012239
12240else
Skip Montanaro6dead952003-09-25 14:50:04 +000012241
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12243$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012244
12245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012246rm -f core conftest.err conftest.$ac_objext \
12247 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012248
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012249# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012250# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12252$as_echo_n "checking for getaddrinfo... " >&6; }
12253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012254/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012255
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012256#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012257#include <sys/socket.h>
12258#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012259#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012260
Martin v. Löwis11437992002-04-12 09:54:03 +000012261int
12262main ()
12263{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012264getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 ;
12266 return 0;
12267}
12268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012269if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012270 have_getaddrinfo=yes
12271else
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012274rm -f core conftest.err conftest.$ac_objext \
12275 conftest$ac_exeext conftest.$ac_ext
12276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12277$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012278if test $have_getaddrinfo = yes
12279then
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12281$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012282 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012284else
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012286
12287if test "${enable_ipv6+set}" = set; then
12288 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12289else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012290 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012291fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012292else
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012294/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012295
Stefan Krah19c21392012-11-22 23:47:32 +010012296#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012297#include <sys/types.h>
12298#include <netdb.h>
12299#include <string.h>
12300#include <sys/socket.h>
12301#include <netinet/in.h>
12302
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012303int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012304{
12305 int passive, gaierr, inet4 = 0, inet6 = 0;
12306 struct addrinfo hints, *ai, *aitop;
12307 char straddr[INET6_ADDRSTRLEN], strport[16];
12308
12309 for (passive = 0; passive <= 1; passive++) {
12310 memset(&hints, 0, sizeof(hints));
12311 hints.ai_family = AF_UNSPEC;
12312 hints.ai_flags = passive ? AI_PASSIVE : 0;
12313 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012314 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012315 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12316 (void)gai_strerror(gaierr);
12317 goto bad;
12318 }
12319 for (ai = aitop; ai; ai = ai->ai_next) {
12320 if (ai->ai_addr == NULL ||
12321 ai->ai_addrlen == 0 ||
12322 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12323 straddr, sizeof(straddr), strport, sizeof(strport),
12324 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12325 goto bad;
12326 }
12327 switch (ai->ai_family) {
12328 case AF_INET:
12329 if (strcmp(strport, "54321") != 0) {
12330 goto bad;
12331 }
12332 if (passive) {
12333 if (strcmp(straddr, "0.0.0.0") != 0) {
12334 goto bad;
12335 }
12336 } else {
12337 if (strcmp(straddr, "127.0.0.1") != 0) {
12338 goto bad;
12339 }
12340 }
12341 inet4++;
12342 break;
12343 case AF_INET6:
12344 if (strcmp(strport, "54321") != 0) {
12345 goto bad;
12346 }
12347 if (passive) {
12348 if (strcmp(straddr, "::") != 0) {
12349 goto bad;
12350 }
12351 } else {
12352 if (strcmp(straddr, "::1") != 0) {
12353 goto bad;
12354 }
12355 }
12356 inet6++;
12357 break;
12358 case AF_UNSPEC:
12359 goto bad;
12360 break;
12361 default:
12362 /* another family support? */
12363 break;
12364 }
12365 }
12366 }
12367
12368 if (!(inet4 == 0 || inet4 == 2))
12369 goto bad;
12370 if (!(inet6 == 0 || inet6 == 2))
12371 goto bad;
12372
12373 if (aitop)
12374 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012375 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012376
12377 bad:
12378 if (aitop)
12379 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012380 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012381}
12382
Martin v. Löwis11437992002-04-12 09:54:03 +000012383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012384if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012385 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012386else
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12390 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012393fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012394
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12398$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12399
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012400if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012401then
12402 if test $ipv6 = yes
12403 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012404 echo 'Fatal: You must get working getaddrinfo() function.'
12405 echo ' or you can specify "--disable-ipv6"'.
12406 exit 1
12407 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012408else
Martin v. Löwis11437992002-04-12 09:54:03 +000012409
Matthias Kloseb9621712010-04-24 17:59:49 +000012410$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012411
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012412fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012413
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012414for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012415do :
12416 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012417if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012419#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012420_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012421
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012422fi
12423done
12424
Michael W. Hudson54241132001-12-07 15:38:26 +000012425
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012426# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12428$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012429if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012431else
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012433/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012434#include <sys/types.h>
12435#include <sys/time.h>
12436#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
Martin v. Löwis11437992002-04-12 09:54:03 +000012438int
12439main ()
12440{
12441if ((struct tm *) 0)
12442return 0;
12443 ;
12444 return 0;
12445}
12446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012447if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012448 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012449else
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12455$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012456if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012459
12460fi
12461
Matthias Kloseb9621712010-04-24 17:59:49 +000012462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12463$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012464if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012465 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012466else
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012468/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012469#include <sys/types.h>
12470#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012471
Martin v. Löwis11437992002-04-12 09:54:03 +000012472int
12473main ()
12474{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475struct tm tm;
12476 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012478 ;
12479 return 0;
12480}
12481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012482if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012483 ac_cv_struct_tm=time.h
12484else
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12490$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012491if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012492
Matthias Kloseb9621712010-04-24 17:59:49 +000012493$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494
12495fi
12496
Matthias Kloseb9621712010-04-24 17:59:49 +000012497ac_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 +000012498#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012499
Matthias Kloseb9621712010-04-24 17:59:49 +000012500"
Victor Stinnere0be4232011-10-25 13:06:09 +020012501if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
12503cat >>confdefs.h <<_ACEOF
12504#define HAVE_STRUCT_TM_TM_ZONE 1
12505_ACEOF
12506
12507
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012508fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012509
Martin v. Löwis11437992002-04-12 09:54:03 +000012510if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12511
Matthias Kloseb9621712010-04-24 17:59:49 +000012512$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012513
12514else
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12516"
Victor Stinnere0be4232011-10-25 13:06:09 +020012517if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012518 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012519else
Matthias Kloseb9621712010-04-24 17:59:49 +000012520 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521fi
12522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012524#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525_ACEOF
12526
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12528$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012529if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012531else
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012533/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012534#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535#if !HAVE_DECL_TZNAME
12536extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012538
Martin v. Löwis11437992002-04-12 09:54:03 +000012539int
12540main ()
12541{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012543 ;
12544 return 0;
12545}
12546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012547if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012548 ac_cv_var_tzname=yes
12549else
Matthias Kloseb9621712010-04-24 17:59:49 +000012550 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012551fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012552rm -f core conftest.err conftest.$ac_objext \
12553 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12556$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012557 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012558
Matthias Kloseb9621712010-04-24 17:59:49 +000012559$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012560
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012561 fi
12562fi
12563
Matthias Kloseb9621712010-04-24 17:59:49 +000012564ac_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 +020012565if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012566
12567cat >>confdefs.h <<_ACEOF
12568#define HAVE_STRUCT_STAT_ST_RDEV 1
12569_ACEOF
12570
12571
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012572fi
12573
Matthias Kloseb9621712010-04-24 17:59:49 +000012574ac_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 +020012575if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012576
Martin v. Löwis11437992002-04-12 09:54:03 +000012577cat >>confdefs.h <<_ACEOF
12578#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12579_ACEOF
12580
12581
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012582fi
12583
Matthias Kloseb9621712010-04-24 17:59:49 +000012584ac_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 +020012585if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012586
12587cat >>confdefs.h <<_ACEOF
12588#define HAVE_STRUCT_STAT_ST_FLAGS 1
12589_ACEOF
12590
12591
12592fi
12593
Matthias Kloseb9621712010-04-24 17:59:49 +000012594ac_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 +020012595if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012596
12597cat >>confdefs.h <<_ACEOF
12598#define HAVE_STRUCT_STAT_ST_GEN 1
12599_ACEOF
12600
12601
12602fi
12603
Matthias Kloseb9621712010-04-24 17:59:49 +000012604ac_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 +020012605if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012606
12607cat >>confdefs.h <<_ACEOF
12608#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12609_ACEOF
12610
12611
12612fi
12613
Matthias Kloseb9621712010-04-24 17:59:49 +000012614ac_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 +020012615if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012616
Martin v. Löwis11437992002-04-12 09:54:03 +000012617cat >>confdefs.h <<_ACEOF
12618#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12619_ACEOF
12620
12621
Matthias Kloseb9621712010-04-24 17:59:49 +000012622$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012623
12624else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012625 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012626 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012627 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12628 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012629esac
12630
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012631fi
12632
Michael W. Hudson54241132001-12-07 15:38:26 +000012633
Martin v. Löwis11437992002-04-12 09:54:03 +000012634
Matthias Kloseb9621712010-04-24 17:59:49 +000012635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12636$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012637if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012638 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012639else
Matthias Kloseb159a552010-04-25 21:00:44 +000012640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012642/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012643#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012644int
12645main ()
12646{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012647return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012648 ;
12649 return 0;
12650}
12651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012652if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012653 ac_cv_header_time_altzone=yes
12654else
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659fi
12660
Matthias Kloseb9621712010-04-24 17:59:49 +000012661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12662$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012663if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012664
Matthias Kloseb9621712010-04-24 17:59:49 +000012665$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666
12667fi
12668
Guido van Rossumda88dad1995-01-26 00:46:29 +000012669was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12671$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012673/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012674
12675#include <sys/types.h>
12676#include <sys/select.h>
12677#include <sys/time.h>
12678
Martin v. Löwis11437992002-04-12 09:54:03 +000012679int
12680main ()
12681{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012682;
Martin v. Löwis11437992002-04-12 09:54:03 +000012683 ;
12684 return 0;
12685}
12686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012687if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012688
12689
Matthias Kloseb9621712010-04-24 17:59:49 +000012690$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012691
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012692 was_it_defined=yes
12693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12697$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012698
Matthias Kloseb9621712010-04-24 17:59:49 +000012699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12700$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012701if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012703else
Matthias Kloseb9621712010-04-24 17:59:49 +000012704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012705/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012706#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012707int
12708main ()
12709{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012710struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012711 ;
12712 return 0;
12713}
12714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012716 ac_cv_struct_addrinfo=yes
12717else
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12721fi
12722
Matthias Kloseb9621712010-04-24 17:59:49 +000012723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12724$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012725if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012726
Matthias Kloseb9621712010-04-24 17:59:49 +000012727$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012728
12729fi
12730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12732$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012733if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012735else
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012737/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012738
12739# include <sys/types.h>
12740# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012741int
12742main ()
12743{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012744struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012745 ;
12746 return 0;
12747}
12748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012749if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012750 ac_cv_struct_sockaddr_storage=yes
12751else
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12755fi
12756
Matthias Kloseb9621712010-04-24 17:59:49 +000012757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12758$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012759if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012762
12763fi
12764
Guido van Rossum627b2d71993-12-24 10:39:16 +000012765# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12768$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012769if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012771else
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012774$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012775int
12776main ()
12777{
12778static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012779test_array [0] = 0;
12780return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012781
12782 ;
12783 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012784}
Martin v. Löwis11437992002-04-12 09:54:03 +000012785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012786if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012787 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012788else
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12794$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012795if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012796 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012797
12798fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12801$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012802if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012804else
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012806/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012807
Martin v. Löwis11437992002-04-12 09:54:03 +000012808int
12809main ()
12810{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012811
Martin v. Löwis11437992002-04-12 09:54:03 +000012812#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012813 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012815 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012816 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012817 char const *const *pcpcc;
12818 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 /* NEC SVR4.0.2 mips cc rejects this. */
12820 struct point {int x, y;};
12821 static struct point const zero = {0,0};
12822 /* AIX XL C 1.02.0.0 rejects this.
12823 It does not let you subtract one const X* pointer from another in
12824 an arm of an if-expression whose if-part is not a constant
12825 expression */
12826 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012829 ++pcpcc;
12830 ppc = (char**) pcpcc;
12831 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012832 { /* SCO 3.2v4 cc rejects this sort of thing. */
12833 char tx;
12834 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012836
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012839 }
12840 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12841 int x[] = {25, 17};
12842 const int *foo = &x[0];
12843 ++foo;
12844 }
12845 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12846 typedef const int *iptr;
12847 iptr p = 0;
12848 ++p;
12849 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012850 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012851 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012852 struct s { int j; const int *ap[3]; } bx;
12853 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 }
12855 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12856 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012860#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012861
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 ;
12863 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012864}
Martin v. Löwis11437992002-04-12 09:54:03 +000012865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012866if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012867 ac_cv_c_const=yes
12868else
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12874$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012875if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012876
Matthias Kloseb9621712010-04-24 17:59:49 +000012877$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012878
12879fi
12880
Michael W. Hudson54241132001-12-07 15:38:26 +000012881
Guido van Rossumda88dad1995-01-26 00:46:29 +000012882works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12884$as_echo_n "checking for working volatile... " >&6; }
12885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012886/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012887
Martin v. Löwis11437992002-04-12 09:54:03 +000012888int
12889main ()
12890{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012891volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 ;
12893 return 0;
12894}
12895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012896if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012897 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012898else
Skip Montanaro6dead952003-09-25 14:50:04 +000012899
Matthias Kloseb9621712010-04-24 17:59:49 +000012900$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012901
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012902
Guido van Rossum627b2d71993-12-24 10:39:16 +000012903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12906$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012907
Guido van Rossumda88dad1995-01-26 00:46:29 +000012908works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12910$as_echo_n "checking for working signed char... " >&6; }
12911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012912/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012913
Martin v. Löwis11437992002-04-12 09:54:03 +000012914int
12915main ()
12916{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012917signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 ;
12919 return 0;
12920}
12921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012922if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012923 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012924else
Skip Montanaro6dead952003-09-25 14:50:04 +000012925
Matthias Kloseb9621712010-04-24 17:59:49 +000012926$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012927
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012928
Guido van Rossum7f43da71994-08-01 12:15:30 +000012929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12932$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012933
Guido van Rossumda88dad1995-01-26 00:46:29 +000012934have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12936$as_echo_n "checking for prototypes... " >&6; }
12937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012938/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012939int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012940int
12941main ()
12942{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012943return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 ;
12945 return 0;
12946}
12947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012948if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012949
Matthias Kloseb9621712010-04-24 17:59:49 +000012950$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012951
Matthias Kloseb159a552010-04-25 21:00:44 +000012952 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12956$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012957
Guido van Rossumda88dad1995-01-26 00:46:29 +000012958works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12960$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012962/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012963
12964#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012965int foo(int x, ...) {
12966 va_list va;
12967 va_start(va, x);
12968 va_arg(va, int);
12969 va_arg(va, char *);
12970 va_arg(va, double);
12971 return 0;
12972}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012973
Martin v. Löwis11437992002-04-12 09:54:03 +000012974int
12975main ()
12976{
Guido van Rossum90eea071996-08-30 20:58:57 +000012977return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 ;
12979 return 0;
12980}
12981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012982if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012983
12984
Matthias Kloseb9621712010-04-24 17:59:49 +000012985$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012986
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012987 works=yes
12988
Guido van Rossum627b2d71993-12-24 10:39:16 +000012989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12992$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012993
Martin v. Löwisd6320502004-08-12 13:45:08 +000012994# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12996$as_echo_n "checking for socketpair... " >&6; }
12997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012998/* end confdefs.h. */
12999
13000#include <sys/types.h>
13001#include <sys/socket.h>
13002
13003int
13004main ()
13005{
13006void *x=socketpair
13007 ;
13008 return 0;
13009}
13010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013011if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013014
Matthias Kloseb159a552010-04-25 21:00:44 +000013015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013016$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013017else
Matthias Kloseb9621712010-04-24 17:59:49 +000013018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13019$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013020
13021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013023
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013024# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13026$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013028/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013029#include <sys/types.h>
13030#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013031int
13032main ()
13033{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013034struct sockaddr x;
13035x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 ;
13037 return 0;
13038}
13039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013040if ac_fn_c_try_compile "$LINENO"; then :
13041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13042$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013043
Matthias Kloseb9621712010-04-24 17:59:49 +000013044$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013045
13046else
Matthias Kloseb9621712010-04-24 17:59:49 +000013047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13048$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013049
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013052
Guido van Rossumda88dad1995-01-26 00:46:29 +000013053va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13055$as_echo_n "checking whether va_list is an array... " >&6; }
13056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013057/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013058
13059#ifdef HAVE_STDARG_PROTOTYPES
13060#include <stdarg.h>
13061#else
13062#include <varargs.h>
13063#endif
13064
Martin v. Löwis11437992002-04-12 09:54:03 +000013065int
13066main ()
13067{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013068va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 ;
13070 return 0;
13071}
13072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013073if ac_fn_c_try_compile "$LINENO"; then :
13074
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013075else
Skip Montanaro6dead952003-09-25 14:50:04 +000013076
Martin v. Löwis11437992002-04-12 09:54:03 +000013077
Matthias Kloseb9621712010-04-24 17:59:49 +000013078$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013079
Guido van Rossumda88dad1995-01-26 00:46:29 +000013080 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013081
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13085$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013086
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013087# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013088
13089
Matthias Kloseb9621712010-04-24 17:59:49 +000013090ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013091if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13096$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013097 OLD_CFLAGS=$CFLAGS
13098 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013100/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013101
13102# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013103
Martin v. Löwis11437992002-04-12 09:54:03 +000013104int
13105main ()
13106{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013107
13108 char *name;
13109 struct hostent *he, *res;
13110 char buffer[2048];
13111 int buflen = 2048;
13112 int h_errnop;
13113
13114 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013115
13116 ;
13117 return 0;
13118}
13119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013120if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013123
Martin v. Löwis11437992002-04-12 09:54:03 +000013124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13128$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013129
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013130else
Skip Montanaro6dead952003-09-25 14:50:04 +000013131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13133$as_echo "no" >&6; }
13134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13135$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013137/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013138
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013139# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013140
Martin v. Löwis11437992002-04-12 09:54:03 +000013141int
13142main ()
13143{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013144
13145 char *name;
13146 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013147 char buffer[2048];
13148 int buflen = 2048;
13149 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013150
Matthias Kloseb159a552010-04-25 21:00:44 +000013151 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013152
13153 ;
13154 return 0;
13155}
13156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013157if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013160
Martin v. Löwis11437992002-04-12 09:54:03 +000013161
Matthias Kloseb159a552010-04-25 21:00:44 +000013162$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013163
Matthias Kloseb9621712010-04-24 17:59:49 +000013164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13165$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013166
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013167else
Skip Montanaro6dead952003-09-25 14:50:04 +000013168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13170$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13172$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13174/* end confdefs.h. */
13175
13176# include <netdb.h>
13177
13178int
13179main ()
13180{
13181
13182 char *name;
13183 struct hostent *he;
13184 struct hostent_data data;
13185
13186 (void) gethostbyname_r(name, he, &data);
13187
13188 ;
13189 return 0;
13190}
13191_ACEOF
13192if ac_fn_c_try_compile "$LINENO"; then :
13193
13194 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13195
13196
13197$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13198
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13200$as_echo "yes" >&6; }
13201
13202else
13203
13204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13205$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013206
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013209
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013215 CFLAGS=$OLD_CFLAGS
13216
13217else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219 for ac_func in gethostbyname
13220do :
13221 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013222if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013223 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013224#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013225_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013226
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013227fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013228done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013229
Michael W. Hudson54241132001-12-07 15:38:26 +000013230
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013231fi
13232
Michael W. Hudson54241132001-12-07 15:38:26 +000013233
13234
13235
13236
13237
13238
Guido van Rossum627b2d71993-12-24 10:39:16 +000013239# checks for system services
13240# (none yet)
13241
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013242# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013243ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013244if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013245
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013246else
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13248$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013249if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013251else
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013253LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013257/* Override any GCC internal prototype to avoid an error.
13258 Use char because int might match the return type of a GCC
13259 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013260#ifdef __cplusplus
13261extern "C"
13262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013263char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013264int
13265main ()
13266{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013267return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013268 ;
13269 return 0;
13270}
13271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013272if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013273 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013274else
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013277rm -f core conftest.err conftest.$ac_objext \
13278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013279LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13282$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013283if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013284 cat >>confdefs.h <<_ACEOF
13285#define HAVE_LIBIEEE 1
13286_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013287
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013288 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289
Guido van Rossum627b2d71993-12-24 10:39:16 +000013290fi
13291
Michael W. Hudson54241132001-12-07 15:38:26 +000013292
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013293fi
13294
Michael W. Hudson54241132001-12-07 15:38:26 +000013295
Guido van Rossum7f253911997-05-09 02:42:48 +000013296# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13298$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013300# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013301if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013302 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013303if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013304then
13305
Matthias Kloseb9621712010-04-24 17:59:49 +000013306$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013307
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13309$as_echo "yes" >&6; }
13310else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13311$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013312fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013313else
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13315$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013316fi
13317
Guido van Rossum7f253911997-05-09 02:42:48 +000013318
Guido van Rossum7f43da71994-08-01 12:15:30 +000013319# check for --with-libm=...
13320
Guido van Rossum563e7081996-09-10 18:20:48 +000013321case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013322Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013323*) LIBM=-lm
13324esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13326$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013328# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013329if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013330 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013331if test "$withval" = no
13332then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13334$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013335elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013336then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13338$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013339else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013340fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013341else
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13343$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344fi
13345
Guido van Rossum7f43da71994-08-01 12:15:30 +000013346
13347# check for --with-libc=...
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13350$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013353if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013354 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013355if test "$withval" = no
13356then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13358$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013359elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013360then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13362$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013363else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013364fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013365else
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13367$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368fi
13369
Guido van Rossum7f43da71994-08-01 12:15:30 +000013370
Stefan Krah1919b7e2012-03-21 18:25:23 +010013371# **************************************
13372# * Check for gcc x64 inline assembler *
13373# **************************************
13374
13375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13376$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13378/* end confdefs.h. */
13379
13380int
13381main ()
13382{
13383
13384 __asm__ __volatile__ ("movq %rcx, %rax");
13385
13386 ;
13387 return 0;
13388}
13389_ACEOF
13390if ac_fn_c_try_compile "$LINENO"; then :
13391 have_gcc_asm_for_x64=yes
13392else
13393 have_gcc_asm_for_x64=no
13394fi
13395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13397$as_echo "$have_gcc_asm_for_x64" >&6; }
13398if test "$have_gcc_asm_for_x64" = yes
13399then
13400
13401$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13402
13403fi
13404
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013405# **************************************************
13406# * Check for various properties of floating point *
13407# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13410$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013411if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013413else
13414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013416 ac_cv_little_endian_double=no
13417else
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013419/* end confdefs.h. */
13420
13421#include <string.h>
13422int main() {
13423 double x = 9006104071832581.0;
13424 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13425 return 0;
13426 else
13427 return 1;
13428}
13429
13430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013431if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013432 ac_cv_little_endian_double=yes
13433else
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13437 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013438fi
13439
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013440fi
13441
Matthias Kloseb9621712010-04-24 17:59:49 +000013442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13443$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013444if test "$ac_cv_little_endian_double" = yes
13445then
13446
Matthias Kloseb9621712010-04-24 17:59:49 +000013447$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013448
13449fi
13450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13452$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013453if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013454 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013455else
13456
Matthias Kloseb9621712010-04-24 17:59:49 +000013457if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013458 ac_cv_big_endian_double=no
13459else
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013461/* end confdefs.h. */
13462
13463#include <string.h>
13464int main() {
13465 double x = 9006104071832581.0;
13466 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13467 return 0;
13468 else
13469 return 1;
13470}
13471
13472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013473if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013474 ac_cv_big_endian_double=yes
13475else
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13479 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013480fi
13481
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013482fi
13483
Matthias Kloseb9621712010-04-24 17:59:49 +000013484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13485$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013486if test "$ac_cv_big_endian_double" = yes
13487then
13488
Matthias Kloseb9621712010-04-24 17:59:49 +000013489$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013490
13491fi
13492
13493# Some ARM platforms use a mixed-endian representation for doubles.
13494# While Python doesn't currently have full support for these platforms
13495# (see e.g., issue 1762561), we can at least make sure that float <-> string
13496# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13498$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013499if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013501else
13502
Matthias Kloseb9621712010-04-24 17:59:49 +000013503if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013504 ac_cv_mixed_endian_double=no
13505else
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013507/* end confdefs.h. */
13508
13509#include <string.h>
13510int main() {
13511 double x = 9006104071832581.0;
13512 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13513 return 0;
13514 else
13515 return 1;
13516}
13517
13518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013519if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013520 ac_cv_mixed_endian_double=yes
13521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13525 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013526fi
13527
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013528fi
13529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13531$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013532if test "$ac_cv_mixed_endian_double" = yes
13533then
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013536
13537fi
13538
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013539# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013540# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013541# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013542# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013543# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013544# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013545
13546# This inline assembler syntax may also work for suncc and icc,
13547# so we try it on all platforms.
13548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13550$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013552/* end confdefs.h. */
13553
13554int
13555main ()
13556{
13557
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013558 unsigned short cw;
13559 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13560 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013561
13562 ;
13563 return 0;
13564}
13565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013566if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013567 have_gcc_asm_for_x87=yes
13568else
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013570fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13573$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013574if test "$have_gcc_asm_for_x87" = yes
13575then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013578
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013580
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13582$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13584/* end confdefs.h. */
13585
13586int
13587main ()
13588{
13589
13590 unsigned int fpcr;
13591 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13592 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13593
13594 ;
13595 return 0;
13596}
13597_ACEOF
13598if ac_fn_c_try_compile "$LINENO"; then :
13599 have_gcc_asm_for_mc68881=yes
13600else
13601 have_gcc_asm_for_mc68881=no
13602fi
13603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13605$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13606if test "$have_gcc_asm_for_mc68881" = yes
13607then
13608
13609$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13610
13611fi
13612
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013613# Detect whether system arithmetic is subject to x87-style double
13614# rounding issues. The result of this test has little meaning on non
13615# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13616# mode is round-to-nearest and double rounding issues are present, and
13617# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13619$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013620# $BASECFLAGS may affect the result
13621ac_save_cc="$CC"
13622CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013623if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013624 ac_cv_x87_double_rounding=no
13625else
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013627/* end confdefs.h. */
13628
13629#include <stdlib.h>
13630#include <math.h>
13631int main() {
13632 volatile double x, y, z;
13633 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13634 x = 0.99999999999999989; /* 1-2**-53 */
13635 y = 1./x;
13636 if (y != 1.)
13637 exit(0);
13638 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13639 x = 1e16;
13640 y = 2.99999;
13641 z = x + y;
13642 if (z != 1e16+4.)
13643 exit(0);
13644 /* both tests show evidence of double rounding */
13645 exit(1);
13646}
13647
13648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013649if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013650 ac_cv_x87_double_rounding=no
13651else
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013656fi
13657
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013658CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13660$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013661if test "$ac_cv_x87_double_rounding" = yes
13662then
13663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013665
13666fi
13667
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013668# ************************************
13669# * Check for mathematical functions *
13670# ************************************
13671
13672LIBS_SAVE=$LIBS
13673LIBS="$LIBS $LIBM"
13674
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013675for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13676do :
13677 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13678ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013679if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013680 cat >>confdefs.h <<_ACEOF
13681#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13682_ACEOF
13683
13684fi
13685done
13686
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013687for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013688do :
13689 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13690ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013691if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013692 cat >>confdefs.h <<_ACEOF
13693#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13694_ACEOF
13695
13696fi
13697done
13698
13699ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13700"
Victor Stinnere0be4232011-10-25 13:06:09 +020013701if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013702 ac_have_decl=1
13703else
13704 ac_have_decl=0
13705fi
13706
13707cat >>confdefs.h <<_ACEOF
13708#define HAVE_DECL_ISINF $ac_have_decl
13709_ACEOF
13710ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13711"
Victor Stinnere0be4232011-10-25 13:06:09 +020013712if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013713 ac_have_decl=1
13714else
13715 ac_have_decl=0
13716fi
13717
13718cat >>confdefs.h <<_ACEOF
13719#define HAVE_DECL_ISNAN $ac_have_decl
13720_ACEOF
13721ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13722"
Victor Stinnere0be4232011-10-25 13:06:09 +020013723if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013724 ac_have_decl=1
13725else
13726 ac_have_decl=0
13727fi
13728
13729cat >>confdefs.h <<_ACEOF
13730#define HAVE_DECL_ISFINITE $ac_have_decl
13731_ACEOF
13732
13733
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013734# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13735# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13737$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013738if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013740else
13741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013743 ac_cv_tanh_preserves_zero_sign=no
13744else
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013746/* end confdefs.h. */
13747
13748#include <math.h>
13749#include <stdlib.h>
13750int main() {
13751 /* return 0 if either negative zeros don't exist
13752 on this platform or if negative zeros exist
13753 and tanh(-0.) == -0. */
13754 if (atan2(0., -1.) == atan2(-0., -1.) ||
13755 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13756 else exit(1);
13757}
13758
13759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013760if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013761 ac_cv_tanh_preserves_zero_sign=yes
13762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13766 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013767fi
13768
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013769fi
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13772$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013773if test "$ac_cv_tanh_preserves_zero_sign" = yes
13774then
13775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013777
13778fi
13779
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013780if test "$ac_cv_func_log1p" = yes
13781then
13782 # On some versions of AIX, log1p(-0.) returns 0. instead of
13783 # -0. See issue #9920.
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13785$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013786 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013787 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013788else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013789
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013790 if test "$cross_compiling" = yes; then :
13791 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013792else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13794/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013795
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013796 #include <math.h>
13797 #include <stdlib.h>
13798 int main() {
13799 /* Fail if the signs of log1p(-0.) and -0. can be
13800 distinguished. */
13801 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13802 return 0;
13803 else
13804 return 1;
13805 }
13806
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013807_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013808if ac_fn_c_try_run "$LINENO"; then :
13809 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013810else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013811 ac_cv_log1p_drops_zero_sign=yes
13812fi
13813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13814 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013815fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013816
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013817fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013818
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13820$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13821fi
13822if test "$ac_cv_log1p_drops_zero_sign" = yes
13823then
13824
13825$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13826
13827fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013828
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013829LIBS=$LIBS_SAVE
13830
Mark Dickinsona614f042009-11-28 12:48:43 +000013831# For multiprocessing module, check that sem_open
13832# actually works. For FreeBSD versions <= 7.2,
13833# the kernel module that provides POSIX semaphores
13834# isn't loaded by default, so an attempt to call
13835# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13837$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013838if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013839 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013840else
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013842 ac_cv_posix_semaphores_enabled=yes
13843else
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013845/* end confdefs.h. */
13846
13847#include <unistd.h>
13848#include <fcntl.h>
13849#include <stdio.h>
13850#include <semaphore.h>
13851#include <sys/stat.h>
13852
13853int main(void) {
13854 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13855 if (a == SEM_FAILED) {
13856 perror("sem_open");
13857 return 1;
13858 }
13859 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013860 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013861 return 0;
13862}
13863
13864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013865if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013866 ac_cv_posix_semaphores_enabled=yes
13867else
Matthias Kloseb9621712010-04-24 17:59:49 +000013868 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13871 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013872fi
13873
13874
Mark Dickinsona614f042009-11-28 12:48:43 +000013875fi
13876
Matthias Kloseb9621712010-04-24 17:59:49 +000013877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13878$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013879if test $ac_cv_posix_semaphores_enabled = no
13880then
13881
Matthias Kloseb9621712010-04-24 17:59:49 +000013882$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013883
13884fi
13885
Mark Dickinson10683072009-04-18 21:18:19 +000013886# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13888$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013889if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013891else
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013893 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013894else
Matthias Kloseb9621712010-04-24 17:59:49 +000013895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013896/* end confdefs.h. */
13897
13898#include <unistd.h>
13899#include <fcntl.h>
13900#include <stdio.h>
13901#include <semaphore.h>
13902#include <sys/stat.h>
13903
13904int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013905 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013906 int count;
13907 int res;
13908 if(a==SEM_FAILED){
13909 perror("sem_open");
13910 return 1;
13911
13912 }
13913 res = sem_getvalue(a, &count);
13914 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013915 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013916 return res==-1 ? 1 : 0;
13917}
13918
Mark Dickinson10683072009-04-18 21:18:19 +000013919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013920if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013921 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013922else
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13926 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013927fi
13928
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013929
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013930fi
13931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13933$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013934if test $ac_cv_broken_sem_getvalue = yes
13935then
13936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013938
13939fi
13940
Mark Dickinsonbd792642009-03-18 20:06:12 +000013941# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13943$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013944# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013945if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013946 enableval=$enable_big_digits; case $enable_big_digits in
13947yes)
13948 enable_big_digits=30 ;;
13949no)
13950 enable_big_digits=15 ;;
1395115|30)
13952 ;;
13953*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013954 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 +000013955esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13957$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013958
13959cat >>confdefs.h <<_ACEOF
13960#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13961_ACEOF
13962
13963
13964else
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13966$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013967fi
13968
13969
Guido van Rossumef2255b2000-03-10 22:30:29 +000013970# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013971ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013972if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013973
13974
Matthias Kloseb9621712010-04-24 17:59:49 +000013975$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013976
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013977 wchar_h="yes"
13978
Guido van Rossumef2255b2000-03-10 22:30:29 +000013979else
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013981
13982fi
13983
Michael W. Hudson54241132001-12-07 15:38:26 +000013984
Martin v. Löwis11437992002-04-12 09:54:03 +000013985
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013986# determine wchar_t size
13987if test "$wchar_h" = yes
13988then
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013990# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13991# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13992# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13994$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013995if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013997else
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13999"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014000
Martin v. Löwis11437992002-04-12 09:54:03 +000014001else
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 if test "$ac_cv_type_wchar_t" = yes; then
14003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014005as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014006See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014007 else
14008 ac_cv_sizeof_wchar_t=0
14009 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014011
Martin v. Löwis11437992002-04-12 09:54:03 +000014012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14014$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014015
14016
14017
Martin v. Löwis11437992002-04-12 09:54:03 +000014018cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014019#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014020_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014021
Michael W. Hudson54241132001-12-07 15:38:26 +000014022
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014023fi
14024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14026$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014027have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014029/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014030
14031#include <tcl.h>
14032#if TCL_UTF_MAX != 6
14033# error "NOT UCS4_TCL"
14034#endif
14035int
14036main ()
14037{
14038
14039 ;
14040 return 0;
14041}
14042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014043if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014044
14045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014047
14048 have_ucs4_tcl=yes
14049
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14053$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014054
Skip Montanaro6dead952003-09-25 14:50:04 +000014055# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014056if test "$wchar_h" = yes
14057then
14058 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14060$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014061 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014062 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014063else
14064
Matthias Kloseb9621712010-04-24 17:59:49 +000014065 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014066 ac_cv_wchar_t_signed=yes
14067else
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014069/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014070
14071 #include <wchar.h>
14072 int main()
14073 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014074 /* Success: exit code 0 */
14075 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014076 }
14077
14078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014079if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014080 ac_cv_wchar_t_signed=yes
14081else
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14085 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014086fi
14087
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014088fi
14089
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14091$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092fi
14093
Georg Brandl52d168a2008-01-07 18:10:24 +000014094# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014095if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014096 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014097then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014098 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014099
Matthias Kloseb9621712010-04-24 17:59:49 +000014100$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014101
Georg Brandl52d168a2008-01-07 18:10:24 +000014102else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014103 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014104fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14106$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014107
14108# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14110$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014111if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014112 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014113else
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 ac_cv_c_bigendian=unknown
14115 # See if we're dealing with a universal compiler.
14116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14117/* end confdefs.h. */
14118#ifndef __APPLE_CC__
14119 not a universal capable compiler
14120 #endif
14121 typedef int dummy;
14122
Skip Montanaro6dead952003-09-25 14:50:04 +000014123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014124if ac_fn_c_try_compile "$LINENO"; then :
14125
14126 # Check for potential -arch flags. It is not universal unless
14127 # there are at least two -arch flags with different values.
14128 ac_arch=
14129 ac_prev=
14130 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14131 if test -n "$ac_prev"; then
14132 case $ac_word in
14133 i?86 | x86_64 | ppc | ppc64)
14134 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14135 ac_arch=$ac_word
14136 else
14137 ac_cv_c_bigendian=universal
14138 break
14139 fi
14140 ;;
14141 esac
14142 ac_prev=
14143 elif test "x$ac_word" = "x-arch"; then
14144 ac_prev=arch
14145 fi
14146 done
14147fi
14148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14149 if test $ac_cv_c_bigendian = unknown; then
14150 # See if sys/param.h defines the BYTE_ORDER macro.
14151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014152/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014153#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014155
Martin v. Löwis11437992002-04-12 09:54:03 +000014156int
14157main ()
14158{
Matthias Kloseb9621712010-04-24 17:59:49 +000014159#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14160 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14161 && LITTLE_ENDIAN)
14162 bogus endian macros
14163 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014164
14165 ;
14166 return 0;
14167}
14168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014169if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014170 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014172/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014173#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014174 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014175
Martin v. Löwis11437992002-04-12 09:54:03 +000014176int
14177main ()
14178{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014179#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 not big endian
14181 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014182
14183 ;
14184 return 0;
14185}
14186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014187if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014188 ac_cv_c_bigendian=yes
14189else
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014193fi
14194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14195 fi
14196 if test $ac_cv_c_bigendian = unknown; then
14197 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014199/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014200#include <limits.h>
14201
Martin v. Löwis11437992002-04-12 09:54:03 +000014202int
14203main ()
14204{
Matthias Kloseb9621712010-04-24 17:59:49 +000014205#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14206 bogus endian macros
14207 #endif
14208
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 ;
14210 return 0;
14211}
14212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014213if ac_fn_c_try_compile "$LINENO"; then :
14214 # It does; now see whether it defined to _BIG_ENDIAN or not.
14215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14216/* end confdefs.h. */
14217#include <limits.h>
14218
14219int
14220main ()
14221{
14222#ifndef _BIG_ENDIAN
14223 not big endian
14224 #endif
14225
14226 ;
14227 return 0;
14228}
14229_ACEOF
14230if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014231 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014232else
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14236fi
14237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14238 fi
14239 if test $ac_cv_c_bigendian = unknown; then
14240 # Compile a test program.
14241 if test "$cross_compiling" = yes; then :
14242 # Try to guess by grepping values from an object file.
14243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14244/* end confdefs.h. */
14245short int ascii_mm[] =
14246 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14247 short int ascii_ii[] =
14248 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14249 int use_ascii (int i) {
14250 return ascii_mm[i] + ascii_ii[i];
14251 }
14252 short int ebcdic_ii[] =
14253 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14254 short int ebcdic_mm[] =
14255 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14256 int use_ebcdic (int i) {
14257 return ebcdic_mm[i] + ebcdic_ii[i];
14258 }
14259 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014260
Matthias Kloseb9621712010-04-24 17:59:49 +000014261int
14262main ()
14263{
14264return use_ascii (foo) == use_ebcdic (foo);
14265 ;
14266 return 0;
14267}
14268_ACEOF
14269if ac_fn_c_try_compile "$LINENO"; then :
14270 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14271 ac_cv_c_bigendian=yes
14272 fi
14273 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14274 if test "$ac_cv_c_bigendian" = unknown; then
14275 ac_cv_c_bigendian=no
14276 else
14277 # finding both strings is unlikely to happen, but who knows?
14278 ac_cv_c_bigendian=unknown
14279 fi
14280 fi
14281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014283else
Matthias Kloseb9621712010-04-24 17:59:49 +000014284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014285/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014286$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014287int
14288main ()
14289{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 /* Are we little or big endian? From Harbison&Steele. */
14292 union
14293 {
14294 long int l;
14295 char c[sizeof (long int)];
14296 } u;
14297 u.l = 1;
14298 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014299
14300 ;
14301 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014302}
Martin v. Löwis11437992002-04-12 09:54:03 +000014303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014304if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014305 ac_cv_c_bigendian=no
14306else
Matthias Kloseb9621712010-04-24 17:59:49 +000014307 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14310 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312
Matthias Kloseb9621712010-04-24 17:59:49 +000014313 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14316$as_echo "$ac_cv_c_bigendian" >&6; }
14317 case $ac_cv_c_bigendian in #(
14318 yes)
14319 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14320;; #(
14321 no)
14322 ;; #(
14323 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014324
Matthias Kloseb9621712010-04-24 17:59:49 +000014325$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 ;; #(
14328 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014329 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014330 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014332
Michael W. Hudson54241132001-12-07 15:38:26 +000014333
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014334# ABI version string for Python extension modules. This appears between the
14335# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14336# from the following attributes which affect the ABI of this Python build (in
14337# this order):
14338#
14339# * The Python implementation (always 'cpython-' for us)
14340# * The major and minor version numbers
14341# * --with-pydebug (adds a 'd')
14342# * --with-pymalloc (adds a 'm')
14343# * --with-wide-unicode (adds a 'u')
14344#
14345# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014346# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14347# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014348
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14350$as_echo_n "checking ABIFLAGS... " >&6; }
14351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14352$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14354$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014355SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14357$as_echo "$SOABI" >&6; }
14358
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014359
14360case $ac_sys_system in
14361 Linux*|GNU*)
14362 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14363 *)
14364 EXT_SUFFIX=${SHLIB_SUFFIX};;
14365esac
14366
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14368$as_echo_n "checking LDVERSION... " >&6; }
14369LDVERSION='$(VERSION)$(ABIFLAGS)'
14370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14371$as_echo "$LDVERSION" >&6; }
14372
doko@python.org87421192013-01-26 11:39:31 +010014373
14374LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14375
14376
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014377# Check whether right shifting a negative integer extends the sign bit
14378# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14380$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014381if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014383else
Martin v. Löwis11437992002-04-12 09:54:03 +000014384
Matthias Kloseb9621712010-04-24 17:59:49 +000014385if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014386 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014387else
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014389/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014390
14391int main()
14392{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014393 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014394}
14395
Martin v. Löwis11437992002-04-12 09:54:03 +000014396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014397if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014398 ac_cv_rshift_extends_sign=yes
14399else
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14403 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014404fi
14405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406fi
14407
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14409$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014410if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014411then
Martin v. Löwis11437992002-04-12 09:54:03 +000014412
Matthias Kloseb9621712010-04-24 17:59:49 +000014413$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014414
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014415fi
14416
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014417# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14419$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014420if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014422else
Martin v. Löwis11437992002-04-12 09:54:03 +000014423
Matthias Kloseb9621712010-04-24 17:59:49 +000014424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014425/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014426#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014427int
14428main ()
14429{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014430
14431 FILE *f = fopen("/dev/null", "r");
14432 flockfile(f);
14433 getc_unlocked(f);
14434 funlockfile(f);
14435
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 ;
14437 return 0;
14438}
14439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014440if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014441 ac_cv_have_getc_unlocked=yes
14442else
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 ac_cv_have_getc_unlocked=no
14444fi
14445rm -f core conftest.err conftest.$ac_objext \
14446 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14450$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014451if test "$ac_cv_have_getc_unlocked" = yes
14452then
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
Matthias Kloseb9621712010-04-24 17:59:49 +000014454$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014455
14456fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014457
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014458# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014459# save the value of LIBS so we don't actually link Python with readline
14460LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014461
Gregory P. Smith18820942008-09-07 06:24:49 +000014462# On some systems we need to link readline to a termcap compatible
14463# library. NOTE: Keep the precedence of listed libraries synchronised
14464# with setup.py.
14465py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14467$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014468for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014469 if test -z "$py_libtermcap"; then
14470 READLINE_LIBS="-lreadline"
14471 else
14472 READLINE_LIBS="-lreadline -l$py_libtermcap"
14473 fi
14474 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014476/* end confdefs.h. */
14477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014478/* Override any GCC internal prototype to avoid an error.
14479 Use char because int might match the return type of a GCC
14480 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014481#ifdef __cplusplus
14482extern "C"
14483#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014484char readline ();
14485int
14486main ()
14487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014488return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014489 ;
14490 return 0;
14491}
14492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014493if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014494 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014496rm -f core conftest.err conftest.$ac_objext \
14497 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014498 if test $py_cv_lib_readline = yes; then
14499 break
14500 fi
14501done
14502# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14503#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014504if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14506$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014507else
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14509$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014510
Matthias Kloseb9621712010-04-24 17:59:49 +000014511$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014512
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014513fi
14514
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014515# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14517$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014518if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014520else
14521 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014522LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014524/* end confdefs.h. */
14525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526/* Override any GCC internal prototype to avoid an error.
14527 Use char because int might match the return type of a GCC
14528 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014529#ifdef __cplusplus
14530extern "C"
14531#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014532char rl_callback_handler_install ();
14533int
14534main ()
14535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014537 ;
14538 return 0;
14539}
14540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014541if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014542 ac_cv_lib_readline_rl_callback_handler_install=yes
14543else
Matthias Kloseb9621712010-04-24 17:59:49 +000014544 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014546rm -f core conftest.err conftest.$ac_objext \
14547 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014548LIBS=$ac_check_lib_save_LIBS
14549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14551$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014552if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014555
14556fi
14557
14558
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014559# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014561/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014562#include <readline/readline.h>
14563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014564if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014565 have_readline=yes
14566else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014567 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014568
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014569fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014570rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014571if test $have_readline = yes
14572then
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014574/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014575#include <readline/readline.h>
14576
14577_ACEOF
14578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014579 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014580
Matthias Kloseb9621712010-04-24 17:59:49 +000014581$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014582
14583fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014584rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014587/* end confdefs.h. */
14588#include <readline/readline.h>
14589
14590_ACEOF
14591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014595
14596fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014597rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014598
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014599fi
14600
Martin v. Löwis0daad592001-09-30 21:09:59 +000014601# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14603$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014604if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014606else
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014608LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612/* Override any GCC internal prototype to avoid an error.
14613 Use char because int might match the return type of a GCC
14614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014615#ifdef __cplusplus
14616extern "C"
14617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014618char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014619int
14620main ()
14621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014622return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014623 ;
14624 return 0;
14625}
14626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014627if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014628 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014629else
Matthias Kloseb9621712010-04-24 17:59:49 +000014630 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014632rm -f core conftest.err conftest.$ac_objext \
14633 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014634LIBS=$ac_check_lib_save_LIBS
14635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14637$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014638if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014639
Matthias Kloseb9621712010-04-24 17:59:49 +000014640$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014641
Martin v. Löwis0daad592001-09-30 21:09:59 +000014642fi
14643
Michael W. Hudson54241132001-12-07 15:38:26 +000014644
Thomas Wouters89d996e2007-09-08 17:39:28 +000014645# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14647$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014648if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014649 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014650else
14651 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014652LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014654/* end confdefs.h. */
14655
14656/* Override any GCC internal prototype to avoid an error.
14657 Use char because int might match the return type of a GCC
14658 builtin and then its argument prototype would still apply. */
14659#ifdef __cplusplus
14660extern "C"
14661#endif
14662char rl_completion_display_matches_hook ();
14663int
14664main ()
14665{
14666return rl_completion_display_matches_hook ();
14667 ;
14668 return 0;
14669}
14670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014671if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014672 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14673else
Matthias Kloseb9621712010-04-24 17:59:49 +000014674 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014676rm -f core conftest.err conftest.$ac_objext \
14677 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014678LIBS=$ac_check_lib_save_LIBS
14679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14681$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014682if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014683
Matthias Kloseb9621712010-04-24 17:59:49 +000014684$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014685
14686fi
14687
14688
Martin v. Löwis0daad592001-09-30 21:09:59 +000014689# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14691$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014692if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014694else
Martin v. Löwis11437992002-04-12 09:54:03 +000014695 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014696LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700/* Override any GCC internal prototype to avoid an error.
14701 Use char because int might match the return type of a GCC
14702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014703#ifdef __cplusplus
14704extern "C"
14705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014706char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014707int
14708main ()
14709{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014710return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 ;
14712 return 0;
14713}
14714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014715if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014716 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014717else
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014720rm -f core conftest.err conftest.$ac_objext \
14721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014722LIBS=$ac_check_lib_save_LIBS
14723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14725$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014726if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014729
Guido van Rossum353ae582001-07-10 16:45:32 +000014730fi
14731
Jack Jansendd19cf82001-12-06 22:36:17 +000014732
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014733# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014735/* end confdefs.h. */
14736#include <readline/readline.h>
14737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014738if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014739 have_readline=yes
14740else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014741 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014742
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014743fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014744rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014745if test $have_readline = yes
14746then
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014748/* end confdefs.h. */
14749#include <readline/readline.h>
14750
14751_ACEOF
14752if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014754
Matthias Kloseb9621712010-04-24 17:59:49 +000014755$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014756
14757fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014758rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014759
14760fi
14761
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14763$as_echo_n "checking for append_history in -lreadline... " >&6; }
14764if ${ac_cv_lib_readline_append_history+:} false; then :
14765 $as_echo_n "(cached) " >&6
14766else
14767 ac_check_lib_save_LIBS=$LIBS
14768LIBS="-lreadline $READLINE_LIBS $LIBS"
14769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14770/* end confdefs.h. */
14771
14772/* Override any GCC internal prototype to avoid an error.
14773 Use char because int might match the return type of a GCC
14774 builtin and then its argument prototype would still apply. */
14775#ifdef __cplusplus
14776extern "C"
14777#endif
14778char append_history ();
14779int
14780main ()
14781{
14782return append_history ();
14783 ;
14784 return 0;
14785}
14786_ACEOF
14787if ac_fn_c_try_link "$LINENO"; then :
14788 ac_cv_lib_readline_append_history=yes
14789else
14790 ac_cv_lib_readline_append_history=no
14791fi
14792rm -f core conftest.err conftest.$ac_objext \
14793 conftest$ac_exeext conftest.$ac_ext
14794LIBS=$ac_check_lib_save_LIBS
14795fi
14796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14797$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14798if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14799
14800$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14801
14802fi
14803
14804
Martin v. Löwis82bca632006-02-10 20:49:30 +000014805# End of readline checks: restore LIBS
14806LIBS=$LIBS_no_readline
14807
Matthias Kloseb9621712010-04-24 17:59:49 +000014808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14809$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014810if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014812else
Martin v. Löwis11437992002-04-12 09:54:03 +000014813
Matthias Kloseb9621712010-04-24 17:59:49 +000014814if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014815 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014816else
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014818/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014819
14820int main()
14821{
14822 int val1 = nice(1);
14823 if (val1 != -1 && val1 == nice(2))
14824 exit(0);
14825 exit(1);
14826}
14827
Martin v. Löwis11437992002-04-12 09:54:03 +000014828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014829if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014830 ac_cv_broken_nice=yes
14831else
Matthias Kloseb9621712010-04-24 17:59:49 +000014832 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014836fi
14837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838fi
14839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14841$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014842if test "$ac_cv_broken_nice" = yes
14843then
Martin v. Löwis11437992002-04-12 09:54:03 +000014844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014846
14847fi
14848
Matthias Kloseb9621712010-04-24 17:59:49 +000014849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14850$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014851if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014853else
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014855 ac_cv_broken_poll=no
14856else
Matthias Kloseb9621712010-04-24 17:59:49 +000014857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014858/* end confdefs.h. */
14859
14860#include <poll.h>
14861
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014862int main()
14863{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014864 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014865 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014866
14867 close (42);
14868
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014869 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014870 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014871 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014872 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014873 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014874 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014875 return 1;
14876}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014877
14878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014879if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014880 ac_cv_broken_poll=yes
14881else
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014888fi
14889
Matthias Kloseb9621712010-04-24 17:59:49 +000014890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14891$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014892if test "$ac_cv_broken_poll" = yes
14893then
14894
Matthias Kloseb9621712010-04-24 17:59:49 +000014895$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014896
14897fi
14898
Brett Cannon43802422005-02-10 20:48:03 +000014899# 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 +000014900# (which is not required by ISO C or UNIX spec) and/or if we support
14901# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014902ac_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 +000014903#include <$ac_cv_struct_tm>
14904
Matthias Kloseb9621712010-04-24 17:59:49 +000014905"
Victor Stinnere0be4232011-10-25 13:06:09 +020014906if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014907
14908cat >>confdefs.h <<_ACEOF
14909#define HAVE_STRUCT_TM_TM_ZONE 1
14910_ACEOF
14911
14912
14913fi
14914
14915if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14916
Matthias Kloseb9621712010-04-24 17:59:49 +000014917$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014918
14919else
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14921"
Victor Stinnere0be4232011-10-25 13:06:09 +020014922if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924else
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926fi
14927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014929#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930_ACEOF
14931
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14933$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014934if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936else
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014938/* end confdefs.h. */
14939#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940#if !HAVE_DECL_TZNAME
14941extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014942#endif
14943
14944int
14945main ()
14946{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014948 ;
14949 return 0;
14950}
14951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014952if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014953 ac_cv_var_tzname=yes
14954else
Matthias Kloseb9621712010-04-24 17:59:49 +000014955 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014957rm -f core conftest.err conftest.$ac_objext \
14958 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14961$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014962 if test $ac_cv_var_tzname = yes; then
14963
Matthias Kloseb9621712010-04-24 17:59:49 +000014964$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014965
14966 fi
14967fi
14968
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014969
Martin v. Löwis1d459062005-03-14 21:23:33 +000014970# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14972$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014973if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014975else
14976
Matthias Kloseb9621712010-04-24 17:59:49 +000014977if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014978 ac_cv_working_tzset=no
14979else
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014981/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014982
14983#include <stdlib.h>
14984#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014985#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014986
14987#if HAVE_TZNAME
14988extern char *tzname[];
14989#endif
14990
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014991int main()
14992{
Brett Cannon18367812003-09-19 00:59:16 +000014993 /* Note that we need to ensure that not only does tzset(3)
14994 do 'something' with localtime, but it works as documented
14995 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014996 This includes making sure that tzname is set properly if
14997 tm->tm_zone does not exist since it is the alternative way
14998 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014999
15000 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015001 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015002 */
15003
Martin v. Löwis1d459062005-03-14 21:23:33 +000015004 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015005 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15006
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015007 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015008 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015009 if (localtime(&groundhogday)->tm_hour != 0)
15010 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015011#if HAVE_TZNAME
15012 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15013 if (strcmp(tzname[0], "UTC") ||
15014 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15015 exit(1);
15016#endif
Brett Cannon18367812003-09-19 00:59:16 +000015017
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015018 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015019 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015020 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015021 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015022#if HAVE_TZNAME
15023 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15024 exit(1);
15025#endif
Brett Cannon18367812003-09-19 00:59:16 +000015026
15027 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15028 tzset();
15029 if (localtime(&groundhogday)->tm_hour != 11)
15030 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015031#if HAVE_TZNAME
15032 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15033 exit(1);
15034#endif
15035
15036#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015037 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15038 exit(1);
15039 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15040 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015041#endif
Brett Cannon18367812003-09-19 00:59:16 +000015042
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015043 exit(0);
15044}
15045
15046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015047if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015048 ac_cv_working_tzset=yes
15049else
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15053 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015054fi
15055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056fi
15057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15059$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015060if test "$ac_cv_working_tzset" = yes
15061then
15062
Matthias Kloseb9621712010-04-24 17:59:49 +000015063$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015064
15065fi
15066
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015067# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15069$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015070if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015071 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015072else
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015074/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015075#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015076int
15077main ()
15078{
15079
15080struct stat st;
15081st.st_mtim.tv_nsec = 1;
15082
15083 ;
15084 return 0;
15085}
15086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015087if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015088 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015089else
Matthias Kloseb9621712010-04-24 17:59:49 +000015090 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15093fi
15094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15096$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015097if test "$ac_cv_stat_tv_nsec" = yes
15098then
15099
Matthias Kloseb9621712010-04-24 17:59:49 +000015100$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015101
15102fi
15103
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015104# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15106$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015107if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015108 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015109else
Matthias Kloseb9621712010-04-24 17:59:49 +000015110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015111/* end confdefs.h. */
15112#include <sys/stat.h>
15113int
15114main ()
15115{
15116
15117struct stat st;
15118st.st_mtimespec.tv_nsec = 1;
15119
15120 ;
15121 return 0;
15122}
15123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015124if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015125 ac_cv_stat_tv_nsec2=yes
15126else
Matthias Kloseb9621712010-04-24 17:59:49 +000015127 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15130fi
15131
Matthias Kloseb9621712010-04-24 17:59:49 +000015132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15133$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015134if test "$ac_cv_stat_tv_nsec2" = yes
15135then
15136
Matthias Kloseb9621712010-04-24 17:59:49 +000015137$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015138
15139fi
15140
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015141# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015142ac_save_cppflags="$CPPFLAGS"
15143CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015144
15145for ac_header in curses.h ncurses.h
15146do :
15147 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15148ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15149if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15150 cat >>confdefs.h <<_ACEOF
15151#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15152_ACEOF
15153
15154fi
15155
15156done
15157
15158
15159# On Solaris, term.h requires curses.h
15160for ac_header in term.h
15161do :
15162 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15163#ifdef HAVE_CURSES_H
15164#include <curses.h>
15165#endif
15166
15167"
15168if test "x$ac_cv_header_term_h" = xyes; then :
15169 cat >>confdefs.h <<_ACEOF
15170#define HAVE_TERM_H 1
15171_ACEOF
15172
15173fi
15174
15175done
15176
15177
Jack Jansen666b1e72001-10-31 12:11:48 +000015178# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15180$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015181if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015182 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015183else
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015185/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015186#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015187int
15188main ()
15189{
Jack Jansen666b1e72001-10-31 12:11:48 +000015190
15191 int rtn;
15192 rtn = mvwdelch(0,0,0);
15193
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 ;
15195 return 0;
15196}
15197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015198if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015199 ac_cv_mvwdelch_is_expression=yes
15200else
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15204fi
15205
Matthias Kloseb9621712010-04-24 17:59:49 +000015206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15207$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015208
15209if test "$ac_cv_mvwdelch_is_expression" = yes
15210then
Martin v. Löwis11437992002-04-12 09:54:03 +000015211
Matthias Kloseb9621712010-04-24 17:59:49 +000015212$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015213
15214fi
15215
Matthias Kloseb9621712010-04-24 17:59:49 +000015216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15217$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015218if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015220else
Matthias Kloseb9621712010-04-24 17:59:49 +000015221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015222/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015223#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015224int
15225main ()
15226{
Jack Jansen666b1e72001-10-31 12:11:48 +000015227
15228 WINDOW *w;
15229 w->_flags = 0;
15230
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 ;
15232 return 0;
15233}
15234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015235if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015236 ac_cv_window_has_flags=yes
15237else
Matthias Kloseb9621712010-04-24 17:59:49 +000015238 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15241fi
15242
Matthias Kloseb9621712010-04-24 17:59:49 +000015243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15244$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015245
Jack Jansen666b1e72001-10-31 12:11:48 +000015246
15247if test "$ac_cv_window_has_flags" = yes
15248then
Martin v. Löwis11437992002-04-12 09:54:03 +000015249
Matthias Kloseb9621712010-04-24 17:59:49 +000015250$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015251
15252fi
15253
Matthias Kloseb9621712010-04-24 17:59:49 +000015254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15255$as_echo_n "checking for is_term_resized... " >&6; }
15256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015257/* end confdefs.h. */
15258#include <curses.h>
15259int
15260main ()
15261{
15262void *x=is_term_resized
15263 ;
15264 return 0;
15265}
15266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015268
Matthias Kloseb9621712010-04-24 17:59:49 +000015269$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015270
Matthias Kloseb159a552010-04-25 21:00:44 +000015271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015272$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015273else
Matthias Kloseb9621712010-04-24 17:59:49 +000015274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15275$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015276
15277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15279
Matthias Kloseb9621712010-04-24 17:59:49 +000015280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15281$as_echo_n "checking for resize_term... " >&6; }
15282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015283/* end confdefs.h. */
15284#include <curses.h>
15285int
15286main ()
15287{
15288void *x=resize_term
15289 ;
15290 return 0;
15291}
15292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015293if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015294
Matthias Kloseb9621712010-04-24 17:59:49 +000015295$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015296
Matthias Kloseb159a552010-04-25 21:00:44 +000015297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015298$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015299else
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15301$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015302
15303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15305
Matthias Kloseb9621712010-04-24 17:59:49 +000015306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15307$as_echo_n "checking for resizeterm... " >&6; }
15308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015309/* end confdefs.h. */
15310#include <curses.h>
15311int
15312main ()
15313{
15314void *x=resizeterm
15315 ;
15316 return 0;
15317}
15318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015319if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015320
Matthias Kloseb9621712010-04-24 17:59:49 +000015321$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015322
Matthias Kloseb159a552010-04-25 21:00:44 +000015323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015324$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015325else
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15327$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015328
15329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015331# last curses configure check
15332CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15335$as_echo "$as_me: checking for device files" >&6;}
15336
15337if test "x$cross_compiling" = xyes; then
15338 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15340$as_echo_n "checking for /dev/ptmx... " >&6; }
15341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15342$as_echo "not set" >&6; }
15343 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15344 fi
15345 if test "${ac_cv_file__dev_ptc+set}" != set; then
15346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15347$as_echo_n "checking for /dev/ptc... " >&6; }
15348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15349$as_echo "not set" >&6; }
15350 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15351 fi
15352fi
15353
Matthias Kloseb9621712010-04-24 17:59:49 +000015354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15355$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015356if ${ac_cv_file__dev_ptmx+:} false; then :
15357 $as_echo_n "(cached) " >&6
15358else
15359 test "$cross_compiling" = yes &&
15360 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15361if test -r "/dev/ptmx"; then
15362 ac_cv_file__dev_ptmx=yes
15363else
15364 ac_cv_file__dev_ptmx=no
15365fi
15366fi
15367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15368$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15369if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015370
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015371fi
15372
15373if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015374
Matthias Kloseb9621712010-04-24 17:59:49 +000015375$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015376
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15379$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015380if ${ac_cv_file__dev_ptc+:} false; then :
15381 $as_echo_n "(cached) " >&6
15382else
15383 test "$cross_compiling" = yes &&
15384 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15385if test -r "/dev/ptc"; then
15386 ac_cv_file__dev_ptc=yes
15387else
15388 ac_cv_file__dev_ptc=no
15389fi
15390fi
15391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15392$as_echo "$ac_cv_file__dev_ptc" >&6; }
15393if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015394
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015395fi
15396
15397if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015398
Matthias Kloseb9621712010-04-24 17:59:49 +000015399$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015400
Neal Norwitz865400f2003-03-21 01:42:58 +000015401fi
15402
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015403if test "$have_long_long" = yes
15404then
Matthias Kloseb9621712010-04-24 17:59:49 +000015405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15406$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015407 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015409else
Matthias Kloseb9621712010-04-24 17:59:49 +000015410 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015411 ac_cv_have_long_long_format="cross -- assuming no"
15412 if test x$GCC = xyes; then
15413 save_CFLAGS=$CFLAGS
15414 CFLAGS="$CFLAGS -Werror -Wformat"
15415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15416/* end confdefs.h. */
15417
15418 #include <stdio.h>
15419 #include <stddef.h>
15420
15421int
15422main ()
15423{
15424
15425 char *buffer;
15426 sprintf(buffer, "%lld", (long long)123);
15427 sprintf(buffer, "%lld", (long long)-123);
15428 sprintf(buffer, "%llu", (unsigned long long)123);
15429
15430 ;
15431 return 0;
15432}
15433_ACEOF
15434if ac_fn_c_try_compile "$LINENO"; then :
15435 ac_cv_have_long_long_format=yes
15436
15437fi
15438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15439 CFLAGS=$save_CFLAGS
15440 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015441else
Matthias Kloseb9621712010-04-24 17:59:49 +000015442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015443/* end confdefs.h. */
15444
15445 #include <stdio.h>
15446 #include <stddef.h>
15447 #include <string.h>
15448
15449 #ifdef HAVE_SYS_TYPES_H
15450 #include <sys/types.h>
15451 #endif
15452
15453 int main()
15454 {
15455 char buffer[256];
15456
15457 if (sprintf(buffer, "%lld", (long long)123) < 0)
15458 return 1;
15459 if (strcmp(buffer, "123"))
15460 return 1;
15461
15462 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15463 return 1;
15464 if (strcmp(buffer, "-123"))
15465 return 1;
15466
15467 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15468 return 1;
15469 if (strcmp(buffer, "123"))
15470 return 1;
15471
15472 return 0;
15473 }
15474
15475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015476if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015477 ac_cv_have_long_long_format=yes
15478else
Matthias Kloseb9621712010-04-24 17:59:49 +000015479 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015481rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15482 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015483fi
15484
15485
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015486fi
15487
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15489$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015490fi
15491
Mark Dickinson89d7d412009-12-31 20:50:59 +000015492if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015493then
15494
Matthias Kloseb9621712010-04-24 17:59:49 +000015495$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015496
15497fi
15498
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015499if test $ac_sys_system = Darwin
15500then
15501 LIBS="$LIBS -framework CoreFoundation"
15502fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015503
Matthias Kloseb9621712010-04-24 17:59:49 +000015504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15505$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015506if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015507 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015508else
Matthias Kloseb9621712010-04-24 17:59:49 +000015509 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015510 ac_cv_have_size_t_format="cross -- assuming yes"
15511
Thomas Wouters477c8d52006-05-27 19:21:47 +000015512else
Matthias Kloseb9621712010-04-24 17:59:49 +000015513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015514/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015515
Thomas Wouters477c8d52006-05-27 19:21:47 +000015516#include <stdio.h>
15517#include <stddef.h>
15518#include <string.h>
15519
Christian Heimes2c181612007-12-17 20:04:13 +000015520#ifdef HAVE_SYS_TYPES_H
15521#include <sys/types.h>
15522#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015523
15524#ifdef HAVE_SSIZE_T
15525typedef ssize_t Py_ssize_t;
15526#elif SIZEOF_VOID_P == SIZEOF_LONG
15527typedef long Py_ssize_t;
15528#else
15529typedef int Py_ssize_t;
15530#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015531
Christian Heimes2c181612007-12-17 20:04:13 +000015532int main()
15533{
15534 char buffer[256];
15535
Thomas Wouters477c8d52006-05-27 19:21:47 +000015536 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15537 return 1;
15538
Thomas Wouters89f507f2006-12-13 04:49:30 +000015539 if (strcmp(buffer, "123"))
15540 return 1;
15541
15542 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15543 return 1;
15544
15545 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015546 return 1;
15547
15548 return 0;
15549}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015550
Thomas Wouters477c8d52006-05-27 19:21:47 +000015551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015552if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015553 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015554else
Matthias Kloseb9621712010-04-24 17:59:49 +000015555 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15558 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015559fi
15560
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15563$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015564if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015565
Matthias Kloseb9621712010-04-24 17:59:49 +000015566$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015567
15568fi
15569
Matthias Kloseb9621712010-04-24 17:59:49 +000015570ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015571#ifdef HAVE_SYS_TYPES_H
15572#include <sys/types.h>
15573#endif
15574#ifdef HAVE_SYS_SOCKET_H
15575#include <sys/socket.h>
15576#endif
15577
Matthias Kloseb9621712010-04-24 17:59:49 +000015578"
Victor Stinnere0be4232011-10-25 13:06:09 +020015579if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015580
Martin v. Löwis11437992002-04-12 09:54:03 +000015581else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015582
Matthias Kloseb9621712010-04-24 17:59:49 +000015583$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015584
15585fi
15586
Michael W. Hudson54241132001-12-07 15:38:26 +000015587
Matthias Kloseb9621712010-04-24 17:59:49 +000015588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15589$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015590if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015591 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015592else
Matthias Kloseb9621712010-04-24 17:59:49 +000015593 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015594 ac_cv_broken_mbstowcs=no
15595else
Matthias Kloseb9621712010-04-24 17:59:49 +000015596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015597/* end confdefs.h. */
15598
Stefan Krah19c21392012-11-22 23:47:32 +010015599#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015600#include<stdlib.h>
15601int main() {
15602 size_t len = -1;
15603 const char *str = "text";
15604 len = mbstowcs(NULL, str, 0);
15605 return (len != 4);
15606}
15607
15608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015609if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015610 ac_cv_broken_mbstowcs=no
15611else
Matthias Kloseb9621712010-04-24 17:59:49 +000015612 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15615 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015616fi
15617
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015618fi
15619
Matthias Kloseb9621712010-04-24 17:59:49 +000015620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15621$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015622if test "$ac_cv_broken_mbstowcs" = yes
15623then
15624
Matthias Kloseb9621712010-04-24 17:59:49 +000015625$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015626
15627fi
15628
Antoine Pitroub52ec782009-01-25 16:34:23 +000015629# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15631$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015632
15633# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015634if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015635 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015636if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015637then
15638
Matthias Kloseb9621712010-04-24 17:59:49 +000015639$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015640
Matthias Kloseb9621712010-04-24 17:59:49 +000015641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15642$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015643fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015644if test "$withval" = no
15645then
15646
15647$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15648
Matthias Kloseb9621712010-04-24 17:59:49 +000015649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15650$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015651fi
15652
Antoine Pitrou042b1282010-08-13 21:15:58 +000015653else
15654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15655$as_echo "no value specified" >&6; }
15656fi
15657
Antoine Pitroub52ec782009-01-25 16:34:23 +000015658
Matthias Kloseb17289e2012-03-15 19:51:34 +010015659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15660$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15661if ${ac_cv_computed_gotos+:} false; then :
15662 $as_echo_n "(cached) " >&6
15663else
15664 if test "$cross_compiling" = yes; then :
15665 if test "${with_computed_gotos+set}" = set; then
15666 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15667 else
15668 ac_cv_computed_gotos=no
15669 fi
15670else
15671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15672/* end confdefs.h. */
15673
15674int main(int argc, char **argv)
15675{
15676 static void *targets[1] = { &&LABEL1 };
15677 goto LABEL2;
15678LABEL1:
15679 return 0;
15680LABEL2:
15681 goto *targets[0];
15682 return 1;
15683}
15684
15685_ACEOF
15686if ac_fn_c_try_run "$LINENO"; then :
15687 ac_cv_computed_gotos=yes
15688else
15689 ac_cv_computed_gotos=no
15690fi
15691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15692 conftest.$ac_objext conftest.beam conftest.$ac_ext
15693fi
15694
15695fi
15696
15697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15698$as_echo "$ac_cv_computed_gotos" >&6; }
15699case "$ac_cv_computed_gotos" in yes*)
15700
15701$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15702
15703esac
15704
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015705case $ac_sys_system in
15706AIX*)
15707
15708$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15709 ;;
15710esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015711
Michael W. Hudson54241132001-12-07 15:38:26 +000015712
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015713
15714
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015715for h in `(cd $srcdir;echo Python/thread_*.h)`
15716do
15717 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15718done
15719
Michael W. Hudson54241132001-12-07 15:38:26 +000015720
Ned Deily0db50cf2014-07-25 12:41:31 -070015721SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15723$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015724for dir in $SRCDIRS; do
15725 if test ! -d $dir; then
15726 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015727 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015728done
Matthias Kloseb9621712010-04-24 17:59:49 +000015729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15730$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015731
Stefan Krah1919b7e2012-03-21 18:25:23 +010015732# Availability of -O2:
15733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15734$as_echo_n "checking for -O2... " >&6; }
15735saved_cflags="$CFLAGS"
15736CFLAGS="-O2"
15737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15738/* end confdefs.h. */
15739
15740int
15741main ()
15742{
15743
15744
15745 ;
15746 return 0;
15747}
15748_ACEOF
15749if ac_fn_c_try_compile "$LINENO"; then :
15750 have_O2=yes
15751else
15752 have_O2=no
15753fi
15754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15756$as_echo "$have_O2" >&6; }
15757CFLAGS="$saved_cflags"
15758
15759# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15760# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15762$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15763saved_cflags="$CFLAGS"
15764CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15765if test "$have_O2" = no; then
15766 CFLAGS=""
15767fi
15768if test "$cross_compiling" = yes; then :
15769 have_glibc_memmove_bug=undefined
15770else
15771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15772/* end confdefs.h. */
15773
15774#include <stdio.h>
15775#include <stdlib.h>
15776#include <string.h>
15777void foo(void *p, void *q) { memmove(p, q, 19); }
15778int main() {
15779 char a[32] = "123456789000000000";
15780 foo(&a[9], a);
15781 if (strcmp(a, "123456789123456789000000000") != 0)
15782 return 1;
15783 foo(a, &a[9]);
15784 if (strcmp(a, "123456789000000000") != 0)
15785 return 1;
15786 return 0;
15787}
15788
15789_ACEOF
15790if ac_fn_c_try_run "$LINENO"; then :
15791 have_glibc_memmove_bug=no
15792else
15793 have_glibc_memmove_bug=yes
15794fi
15795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15796 conftest.$ac_objext conftest.beam conftest.$ac_ext
15797fi
15798
15799CFLAGS="$saved_cflags"
15800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15801$as_echo "$have_glibc_memmove_bug" >&6; }
15802if test "$have_glibc_memmove_bug" = yes; then
15803
15804$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15805
15806fi
15807
15808if test "$have_gcc_asm_for_x87" = yes; then
15809 # Some versions of gcc miscompile inline asm:
15810 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15811 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15812 case $CC in
15813 *gcc*)
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15815$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15816 saved_cflags="$CFLAGS"
15817 CFLAGS="-O2"
15818 if test "$cross_compiling" = yes; then :
15819 have_ipa_pure_const_bug=undefined
15820else
15821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15822/* end confdefs.h. */
15823
15824 __attribute__((noinline)) int
15825 foo(int *p) {
15826 int r;
15827 asm ( "movl \$6, (%1)\n\t"
15828 "xorl %0, %0\n\t"
15829 : "=r" (r) : "r" (p) : "memory"
15830 );
15831 return r;
15832 }
15833 int main() {
15834 int p = 8;
15835 if ((foo(&p) ? : p) != 6)
15836 return 1;
15837 return 0;
15838 }
15839
15840_ACEOF
15841if ac_fn_c_try_run "$LINENO"; then :
15842 have_ipa_pure_const_bug=no
15843else
15844 have_ipa_pure_const_bug=yes
15845fi
15846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15847 conftest.$ac_objext conftest.beam conftest.$ac_ext
15848fi
15849
15850 CFLAGS="$saved_cflags"
15851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15852$as_echo "$have_ipa_pure_const_bug" >&6; }
15853 if test "$have_ipa_pure_const_bug" = yes; then
15854
15855$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15856
15857 fi
15858 ;;
15859 esac
15860fi
15861
Victor Stinner4f5366e2015-01-09 02:13:19 +010015862# Check for stdatomic.h
15863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
15864$as_echo_n "checking for stdatomic.h... " >&6; }
15865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866/* end confdefs.h. */
15867
15868
15869 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010015870 atomic_int value = ATOMIC_VAR_INIT(1);
15871 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010015872 int main() {
15873 int loaded_value = atomic_load(&value);
15874 return 0;
15875 }
15876
15877
15878_ACEOF
15879if ac_fn_c_try_link "$LINENO"; then :
15880 have_stdatomic_h=yes
15881else
15882 have_stdatomic_h=no
15883fi
15884rm -f core conftest.err conftest.$ac_objext \
15885 conftest$ac_exeext conftest.$ac_ext
15886
15887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
15888$as_echo "$have_stdatomic_h" >&6; }
15889
15890if test "$have_stdatomic_h" = yes; then
15891
15892$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
15893
15894fi
15895
15896# Check for GCC >= 4.7 __atomic builtins
15897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
15898$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
15899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15900/* end confdefs.h. */
15901
15902
15903 volatile int val = 1;
15904 int main() {
15905 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
15906 return 0;
15907 }
15908
15909
15910_ACEOF
15911if ac_fn_c_try_link "$LINENO"; then :
15912 have_builtin_atomic=yes
15913else
15914 have_builtin_atomic=no
15915fi
15916rm -f core conftest.err conftest.$ac_objext \
15917 conftest$ac_exeext conftest.$ac_ext
15918
15919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
15920$as_echo "$have_builtin_atomic" >&6; }
15921
15922if test "$have_builtin_atomic" = yes; then
15923
15924$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
15925
15926fi
15927
Ned Deily322f5ba2013-11-21 23:01:59 -080015928# ensurepip option
15929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15930$as_echo_n "checking for ensurepip... " >&6; }
15931
15932# Check whether --with-ensurepip was given.
15933if test "${with_ensurepip+set}" = set; then :
15934 withval=$with_ensurepip;
15935else
15936 with_ensurepip=upgrade
15937fi
15938
15939case $with_ensurepip in #(
15940 yes|upgrade) :
15941 ENSUREPIP=upgrade ;; #(
15942 install) :
15943 ENSUREPIP=install ;; #(
15944 no) :
15945 ENSUREPIP=no ;; #(
15946 *) :
15947 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15948esac
15949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15950$as_echo "$ENSUREPIP" >&6; }
15951
15952
Victor Stinner35a97c02015-03-08 02:59:09 +010015953# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
15954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
15955$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
15956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15957/* end confdefs.h. */
15958
15959
15960 #include <dirent.h>
15961
15962 int main() {
15963 struct dirent entry;
15964 return entry.d_type == DT_UNKNOWN;
15965 }
15966
15967
15968_ACEOF
15969if ac_fn_c_try_link "$LINENO"; then :
15970 have_dirent_d_type=yes
15971else
15972 have_dirent_d_type=no
15973fi
15974rm -f core conftest.err conftest.$ac_objext \
15975 conftest$ac_exeext conftest.$ac_ext
15976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
15977$as_echo "$have_dirent_d_type" >&6; }
15978
15979if test "$have_dirent_d_type" = yes; then
15980
15981$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
15982
15983fi
15984
Victor Stinner9eb57c52015-03-19 22:21:49 +010015985# check if the Linux getrandom() syscall is available
15986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
15987$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
15988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15989/* end confdefs.h. */
15990
15991
15992 #include <sys/syscall.h>
15993
15994 int main() {
15995 const int flags = 0;
15996 char buffer[1];
15997 int n;
15998 /* ignore the result, Python checks for ENOSYS at runtime */
15999 (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
16000 return 0;
16001 }
16002
16003
16004_ACEOF
16005if ac_fn_c_try_link "$LINENO"; then :
16006 have_getrandom_syscall=yes
16007else
16008 have_getrandom_syscall=no
16009fi
16010rm -f core conftest.err conftest.$ac_objext \
16011 conftest$ac_exeext conftest.$ac_ext
16012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16013$as_echo "$have_getrandom_syscall" >&6; }
16014
16015if test "$have_getrandom_syscall" = yes; then
16016
16017$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16018
16019fi
16020
Guido van Rossum627b2d71993-12-24 10:39:16 +000016021# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016022ac_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 +000016023
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016024ac_config_files="$ac_config_files Modules/ld_so_aix"
16025
Martin v. Löwis11437992002-04-12 09:54:03 +000016026cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016027# This file is a shell script that caches the results of configure
16028# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016029# scripts and configure runs, see configure's option --config-cache.
16030# It is not useful on other systems. If it contains results you don't
16031# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016032#
Martin v. Löwis11437992002-04-12 09:54:03 +000016033# config.status only pays attention to the cache file if you give it
16034# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016035#
Skip Montanaro6dead952003-09-25 14:50:04 +000016036# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016037# loading this file, other *unset* `ac_cv_foo' will be assigned the
16038# following values.
16039
16040_ACEOF
16041
Guido van Rossumf78abae1997-01-21 22:02:36 +000016042# The following way of writing the cache mishandles newlines in values,
16043# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016044# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016045# Ultrix sh set writes to stderr and can't be redirected directly,
16046# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016047(
16048 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16049 eval ac_val=\$$ac_var
16050 case $ac_val in #(
16051 *${as_nl}*)
16052 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016053 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16054$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016055 esac
16056 case $ac_var in #(
16057 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016058 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16059 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016060 esac ;;
16061 esac
16062 done
16063
Martin v. Löwis11437992002-04-12 09:54:03 +000016064 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016065 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16066 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016067 # `set' does not quote correctly, so add quotes: double-quote
16068 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016070 "s/'/'\\\\''/g;
16071 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016072 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016073 *)
16074 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016075 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016076 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016077 esac |
16078 sort
16079) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016081 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016082 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016083 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016084 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16085 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016086 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16087 :end' >>confcache
16088if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16089 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016090 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016091 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16092$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016093 if test ! -f "$cache_file" || test -h "$cache_file"; then
16094 cat confcache >"$cache_file"
16095 else
16096 case $cache_file in #(
16097 */* | ?:*)
16098 mv -f confcache "$cache_file"$$ &&
16099 mv -f "$cache_file"$$ "$cache_file" ;; #(
16100 *)
16101 mv -f confcache "$cache_file" ;;
16102 esac
16103 fi
16104 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016105 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016106 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16107$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016108 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016109fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016110rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016111
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016112test "x$prefix" = xNONE && prefix=$ac_default_prefix
16113# Let make expand exec_prefix.
16114test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016115
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016116DEFS=-DHAVE_CONFIG_H
16117
Skip Montanaro6dead952003-09-25 14:50:04 +000016118ac_libobjs=
16119ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016120U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016121for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16122 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016125 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16126 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016127 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16128 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016129done
16130LIBOBJS=$ac_libobjs
16131
16132LTLIBOBJS=$ac_ltlibobjs
16133
16134
Martin v. Löwis11437992002-04-12 09:54:03 +000016135
Matthias Kloseb9621712010-04-24 17:59:49 +000016136
Victor Stinnere0be4232011-10-25 13:06:09 +020016137: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016138ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016139ac_clean_files_save=$ac_clean_files
16140ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016141{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16142$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16143as_write_fail=0
16144cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016145#! $SHELL
16146# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016147# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016148# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016149# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016150
Martin v. Löwis11437992002-04-12 09:54:03 +000016151debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016152ac_cs_recheck=false
16153ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016154
Matthias Kloseb9621712010-04-24 17:59:49 +000016155SHELL=\${CONFIG_SHELL-$SHELL}
16156export SHELL
16157_ASEOF
16158cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16159## -------------------- ##
16160## M4sh Initialization. ##
16161## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163# Be more Bourne compatible
16164DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016165if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016166 emulate sh
16167 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016168 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016169 # is contrary to our usage. Disable this feature.
16170 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016171 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016172else
Matthias Kloseb9621712010-04-24 17:59:49 +000016173 case `(set -o) 2>/dev/null` in #(
16174 *posix*) :
16175 set -o posix ;; #(
16176 *) :
16177 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016179fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016180
16181
Matthias Kloseb9621712010-04-24 17:59:49 +000016182as_nl='
16183'
16184export as_nl
16185# Printing a long string crashes Solaris 7 /usr/bin/printf.
16186as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16187as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16188as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16189# Prefer a ksh shell builtin over an external printf program on Solaris,
16190# but without wasting forks for bash or zsh.
16191if test -z "$BASH_VERSION$ZSH_VERSION" \
16192 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16193 as_echo='print -r --'
16194 as_echo_n='print -rn --'
16195elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16196 as_echo='printf %s\n'
16197 as_echo_n='printf %s'
16198else
16199 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16200 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16201 as_echo_n='/usr/ucb/echo -n'
16202 else
16203 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16204 as_echo_n_body='eval
16205 arg=$1;
16206 case $arg in #(
16207 *"$as_nl"*)
16208 expr "X$arg" : "X\\(.*\\)$as_nl";
16209 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16210 esac;
16211 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16212 '
16213 export as_echo_n_body
16214 as_echo_n='sh -c $as_echo_n_body as_echo'
16215 fi
16216 export as_echo_body
16217 as_echo='sh -c $as_echo_body as_echo'
16218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016219
16220# The user is always right.
16221if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016222 PATH_SEPARATOR=:
16223 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16224 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16225 PATH_SEPARATOR=';'
16226 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016229
16230# IFS
16231# We need space, tab and new line, in precisely that order. Quoting is
16232# there to prevent editors from complaining about space-tab.
16233# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16234# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016235IFS=" "" $as_nl"
16236
16237# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016238as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016239case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016240 *[\\/]* ) as_myself=$0 ;;
16241 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016242for as_dir in $PATH
16243do
16244 IFS=$as_save_IFS
16245 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016246 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16247 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016250 ;;
16251esac
16252# We did not find ourselves, most probably we were run as `sh COMMAND'
16253# in which case we are not to be found in the path.
16254if test "x$as_myself" = x; then
16255 as_myself=$0
16256fi
16257if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016258 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16259 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016260fi
16261
Matthias Kloseb9621712010-04-24 17:59:49 +000016262# Unset variables that we do not need and which cause bugs (e.g. in
16263# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16264# suppresses any "Segmentation fault" message there. '((' could
16265# trigger a bug in pdksh 5.2.14.
16266for as_var in BASH_ENV ENV MAIL MAILPATH
16267do eval test x\${$as_var+set} = xset \
16268 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269done
16270PS1='$ '
16271PS2='> '
16272PS4='+ '
16273
16274# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016275LC_ALL=C
16276export LC_ALL
16277LANGUAGE=C
16278export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279
Matthias Kloseb9621712010-04-24 17:59:49 +000016280# CDPATH.
16281(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16282
16283
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016284# as_fn_error STATUS ERROR [LINENO LOG_FD]
16285# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016286# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16287# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016288# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016289as_fn_error ()
16290{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016291 as_status=$1; test $as_status -eq 0 && as_status=1
16292 if test "$4"; then
16293 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16294 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016295 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016296 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016297 as_fn_exit $as_status
16298} # as_fn_error
16299
16300
16301# as_fn_set_status STATUS
16302# -----------------------
16303# Set $? to STATUS, without forking.
16304as_fn_set_status ()
16305{
16306 return $1
16307} # as_fn_set_status
16308
16309# as_fn_exit STATUS
16310# -----------------
16311# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16312as_fn_exit ()
16313{
16314 set +e
16315 as_fn_set_status $1
16316 exit $1
16317} # as_fn_exit
16318
16319# as_fn_unset VAR
16320# ---------------
16321# Portably unset VAR.
16322as_fn_unset ()
16323{
16324 { eval $1=; unset $1;}
16325}
16326as_unset=as_fn_unset
16327# as_fn_append VAR VALUE
16328# ----------------------
16329# Append the text in VALUE to the end of the definition contained in VAR. Take
16330# advantage of any shell optimizations that allow amortized linear growth over
16331# repeated appends, instead of the typical quadratic growth present in naive
16332# implementations.
16333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16334 eval 'as_fn_append ()
16335 {
16336 eval $1+=\$2
16337 }'
16338else
16339 as_fn_append ()
16340 {
16341 eval $1=\$$1\$2
16342 }
16343fi # as_fn_append
16344
16345# as_fn_arith ARG...
16346# ------------------
16347# Perform arithmetic evaluation on the ARGs, and store the result in the
16348# global $as_val. Take advantage of shells that can avoid forks. The arguments
16349# must be portable across $(()) and expr.
16350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16351 eval 'as_fn_arith ()
16352 {
16353 as_val=$(( $* ))
16354 }'
16355else
16356 as_fn_arith ()
16357 {
16358 as_val=`expr "$@" || test $? -eq 1`
16359 }
16360fi # as_fn_arith
16361
16362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016363if expr a : '\(a\)' >/dev/null 2>&1 &&
16364 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16365 as_expr=expr
16366else
16367 as_expr=false
16368fi
16369
16370if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16371 as_basename=basename
16372else
16373 as_basename=false
16374fi
16375
Matthias Kloseb9621712010-04-24 17:59:49 +000016376if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16377 as_dirname=dirname
16378else
16379 as_dirname=false
16380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016382as_me=`$as_basename -- "$0" ||
16383$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16384 X"$0" : 'X\(//\)$' \| \
16385 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016386$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016387 sed '/^.*\/\([^/][^/]*\)\/*$/{
16388 s//\1/
16389 q
16390 }
16391 /^X\/\(\/\/\)$/{
16392 s//\1/
16393 q
16394 }
16395 /^X\/\(\/\).*/{
16396 s//\1/
16397 q
16398 }
16399 s/.*/./; q'`
16400
Matthias Kloseb9621712010-04-24 17:59:49 +000016401# Avoid depending upon Character Ranges.
16402as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16403as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16404as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16405as_cr_digits='0123456789'
16406as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407
16408ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016409case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016410-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016411 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016412 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016413 xy) ECHO_C='\c';;
16414 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16415 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416 esac;;
16417*)
16418 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016419esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016420
Martin v. Löwis11437992002-04-12 09:54:03 +000016421rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016422if test -d conf$$.dir; then
16423 rm -f conf$$.dir/conf$$.file
16424else
16425 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016426 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016428if (echo >conf$$.file) 2>/dev/null; then
16429 if ln -s conf$$.file conf$$ 2>/dev/null; then
16430 as_ln_s='ln -s'
16431 # ... but there are two gotchas:
16432 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16433 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016434 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016435 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016436 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016437 elif ln conf$$.file conf$$ 2>/dev/null; then
16438 as_ln_s=ln
16439 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016440 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016441 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016442else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016443 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016445rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16446rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016447
Matthias Kloseb9621712010-04-24 17:59:49 +000016448
16449# as_fn_mkdir_p
16450# -------------
16451# Create "$as_dir" as a directory, including parents if necessary.
16452as_fn_mkdir_p ()
16453{
16454
16455 case $as_dir in #(
16456 -*) as_dir=./$as_dir;;
16457 esac
16458 test -d "$as_dir" || eval $as_mkdir_p || {
16459 as_dirs=
16460 while :; do
16461 case $as_dir in #(
16462 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16463 *) as_qdir=$as_dir;;
16464 esac
16465 as_dirs="'$as_qdir' $as_dirs"
16466 as_dir=`$as_dirname -- "$as_dir" ||
16467$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16468 X"$as_dir" : 'X\(//\)[^/]' \| \
16469 X"$as_dir" : 'X\(//\)$' \| \
16470 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16471$as_echo X"$as_dir" |
16472 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16473 s//\1/
16474 q
16475 }
16476 /^X\(\/\/\)[^/].*/{
16477 s//\1/
16478 q
16479 }
16480 /^X\(\/\/\)$/{
16481 s//\1/
16482 q
16483 }
16484 /^X\(\/\).*/{
16485 s//\1/
16486 q
16487 }
16488 s/.*/./; q'`
16489 test -d "$as_dir" && break
16490 done
16491 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016492 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016493
16494
16495} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016496if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016498else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016500 as_mkdir_p=false
16501fi
16502
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016503
16504# as_fn_executable_p FILE
16505# -----------------------
16506# Test if FILE is an executable regular file.
16507as_fn_executable_p ()
16508{
16509 test -f "$1" && test -x "$1"
16510} # as_fn_executable_p
16511as_test_x='test -x'
16512as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016513
16514# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016515as_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 +000016516
16517# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016518as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016519
16520
Martin v. Löwis11437992002-04-12 09:54:03 +000016521exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016522## ----------------------------------- ##
16523## Main body of $CONFIG_STATUS script. ##
16524## ----------------------------------- ##
16525_ASEOF
16526test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016527
Matthias Kloseb9621712010-04-24 17:59:49 +000016528cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16529# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016530# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531# values after options handling.
16532ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016533This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016534generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016535
16536 CONFIG_FILES = $CONFIG_FILES
16537 CONFIG_HEADERS = $CONFIG_HEADERS
16538 CONFIG_LINKS = $CONFIG_LINKS
16539 CONFIG_COMMANDS = $CONFIG_COMMANDS
16540 $ $0 $@
16541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542on `(hostname || uname -n) 2>/dev/null | sed 1q`
16543"
16544
Martin v. Löwis11437992002-04-12 09:54:03 +000016545_ACEOF
16546
Matthias Kloseb9621712010-04-24 17:59:49 +000016547case $ac_config_files in *"
16548"*) set x $ac_config_files; shift; ac_config_files=$*;;
16549esac
16550
16551case $ac_config_headers in *"
16552"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16553esac
16554
16555
16556cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016557# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016558config_files="$ac_config_files"
16559config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016562
Matthias Kloseb9621712010-04-24 17:59:49 +000016563cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016564ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016565\`$as_me' instantiates files and other configuration actions
16566from templates according to the current configuration. Unless the files
16567and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016568
Matthias Kloseb9621712010-04-24 17:59:49 +000016569Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016570
16571 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016572 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016573 --config print configuration, then exit
16574 -q, --quiet, --silent
16575 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016576 -d, --debug don't remove temporary files
16577 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016578 --file=FILE[:TEMPLATE]
16579 instantiate the configuration file FILE
16580 --header=FILE[:TEMPLATE]
16581 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016582
16583Configuration files:
16584$config_files
16585
16586Configuration headers:
16587$config_headers
16588
Matthias Kloseb9621712010-04-24 17:59:49 +000016589Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016592cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16593ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016594ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016595python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016596configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016597 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016598
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016599Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016600This config.status script is free software; the Free Software Foundation
16601gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016602
16603ac_pwd='$ac_pwd'
16604srcdir='$srcdir'
16605INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016606MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016607test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016608_ACEOF
16609
Matthias Kloseb9621712010-04-24 17:59:49 +000016610cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16611# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016612ac_need_defaults=:
16613while test $# != 0
16614do
16615 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016616 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016617 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16618 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016619 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016620 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016621 --*=)
16622 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16623 ac_optarg=
16624 ac_shift=:
16625 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016627 ac_option=$1
16628 ac_optarg=$2
16629 ac_shift=shift
16630 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016631 esac
16632
Skip Montanaro6dead952003-09-25 14:50:04 +000016633 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016635 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16636 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016638 $as_echo "$ac_cs_version"; exit ;;
16639 --config | --confi | --conf | --con | --co | --c )
16640 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016641 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016642 debug=: ;;
16643 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016644 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016645 case $ac_optarg in
16646 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016647 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016648 esac
16649 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 ac_need_defaults=false;;
16651 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016652 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016653 case $ac_optarg in
16654 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16655 esac
16656 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016657 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016658 --he | --h)
16659 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016660 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016661Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016663 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016664 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16665 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16666 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016667
16668 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016669 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016670Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016671
Matthias Kloseb9621712010-04-24 17:59:49 +000016672 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016673 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016674
16675 esac
16676 shift
16677done
16678
Skip Montanaro6dead952003-09-25 14:50:04 +000016679ac_configure_extra_args=
16680
16681if $ac_cs_silent; then
16682 exec 6>/dev/null
16683 ac_configure_extra_args="$ac_configure_extra_args --silent"
16684fi
16685
16686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016687cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016688if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016689 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016690 shift
16691 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16692 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016694 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016695fi
16696
Martin v. Löwis11437992002-04-12 09:54:03 +000016697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016698cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016699exec 5>>config.log
16700{
16701 echo
16702 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16703## Running $as_me. ##
16704_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016705 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016709cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016711
Matthias Kloseb9621712010-04-24 17:59:49 +000016712cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713
16714# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016715for ac_config_target in $ac_config_targets
16716do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016717 case $ac_config_target in
16718 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16719 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16720 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016721 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16722 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016723 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16724 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016725 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016726 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016727 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728
Victor Stinnere0be4232011-10-25 13:06:09 +020016729 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016730 esac
16731done
16732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016733
Martin v. Löwis11437992002-04-12 09:54:03 +000016734# If the user did not use the arguments to specify the items to instantiate,
16735# then the envvar interface is used. Set only those that are not.
16736# We use the long form for the default assignment because of an extremely
16737# bizarre bug on SunOS 4.1.3.
16738if $ac_need_defaults; then
16739 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16740 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16741fi
16742
Skip Montanaro6dead952003-09-25 14:50:04 +000016743# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016744# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016745# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746# Hook for its removal unless debugging.
16747# Note that there is a small window in which the directory will not be cleaned:
16748# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016749$debug ||
16750{
Victor Stinnere0be4232011-10-25 13:06:09 +020016751 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016752 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016753 : "${ac_tmp:=$tmp}"
16754 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016755' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016756 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016757}
Martin v. Löwis11437992002-04-12 09:54:03 +000016758# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016759
Martin v. Löwis11437992002-04-12 09:54:03 +000016760{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016761 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016762 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016763} ||
16764{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765 tmp=./conf$$-$RANDOM
16766 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016767} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016768ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016769
Matthias Kloseb9621712010-04-24 17:59:49 +000016770# Set up the scripts for CONFIG_FILES section.
16771# No need to generate them if there are no CONFIG_FILES.
16772# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016773if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016774
Matthias Kloseb9621712010-04-24 17:59:49 +000016775
16776ac_cr=`echo X | tr X '\015'`
16777# On cygwin, bash can eat \r inside `` if the user requested igncr.
16778# But we know of no other shell where ac_cr would be empty at this
16779# point, so we can use a bashism as a fallback.
16780if test "x$ac_cr" = x; then
16781 eval ac_cr=\$\'\\r\'
16782fi
16783ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16784if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016785 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016786else
16787 ac_cs_awk_cr=$ac_cr
16788fi
16789
Victor Stinnere0be4232011-10-25 13:06:09 +020016790echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016791_ACEOF
16792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016793
Matthias Kloseb9621712010-04-24 17:59:49 +000016794{
16795 echo "cat >conf$$subs.awk <<_ACEOF" &&
16796 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16797 echo "_ACEOF"
16798} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016799 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16800ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801ac_delim='%!_!# '
16802for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016803 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016804 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016805
Matthias Kloseb9621712010-04-24 17:59:49 +000016806 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16807 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808 break
16809 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016810 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016811 else
16812 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016813 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814done
Matthias Kloseb9621712010-04-24 17:59:49 +000016815rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816
Matthias Kloseb9621712010-04-24 17:59:49 +000016817cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016818cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016820sed -n '
16821h
16822s/^/S["/; s/!.*/"]=/
16823p
16824g
16825s/^[^!]*!//
16826:repl
16827t repl
16828s/'"$ac_delim"'$//
16829t delim
16830:nl
16831h
16832s/\(.\{148\}\)..*/\1/
16833t more1
16834s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16835p
16836n
16837b repl
16838:more1
16839s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16840p
16841g
16842s/.\{148\}//
16843t nl
16844:delim
16845h
16846s/\(.\{148\}\)..*/\1/
16847t more2
16848s/["\\]/\\&/g; s/^/"/; s/$/"/
16849p
16850b
16851:more2
16852s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16853p
16854g
16855s/.\{148\}//
16856t delim
16857' <conf$$subs.awk | sed '
16858/^[^""]/{
16859 N
16860 s/\n//
16861}
16862' >>$CONFIG_STATUS || ac_write_fail=1
16863rm -f conf$$subs.awk
16864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16865_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016866cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016867 for (key in S) S_is_set[key] = 1
16868 FS = ""
16869
16870}
16871{
16872 line = $ 0
16873 nfields = split(line, field, "@")
16874 substed = 0
16875 len = length(field[1])
16876 for (i = 2; i < nfields; i++) {
16877 key = field[i]
16878 keylen = length(key)
16879 if (S_is_set[key]) {
16880 value = S[key]
16881 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16882 len += length(value) + length(field[++i])
16883 substed = 1
16884 } else
16885 len += 1 + keylen
16886 }
16887
16888 print line
16889}
16890
16891_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16894if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16895 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16896else
16897 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016898fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016899 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016900_ACEOF
16901
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016902# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16903# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016904# trailing colons and then remove the whole line if VPATH becomes empty
16905# (actually we leave an empty line to preserve line numbers).
16906if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016907 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16908h
16909s///
16910s/^/:/
16911s/[ ]*$/:/
16912s/:\$(srcdir):/:/g
16913s/:\${srcdir}:/:/g
16914s/:@srcdir@:/:/g
16915s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016917x
16918s/\(=[ ]*\).*/\1/
16919G
16920s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016921s/^[^=]*=[ ]*$//
16922}'
16923fi
16924
Matthias Kloseb9621712010-04-24 17:59:49 +000016925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016926fi # test -n "$CONFIG_FILES"
16927
Matthias Kloseb9621712010-04-24 17:59:49 +000016928# Set up the scripts for CONFIG_HEADERS section.
16929# No need to generate them if there are no CONFIG_HEADERS.
16930# This happens for instance with `./config.status Makefile'.
16931if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016932cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016933BEGIN {
16934_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935
Matthias Kloseb9621712010-04-24 17:59:49 +000016936# Transform confdefs.h into an awk script `defines.awk', embedded as
16937# here-document in config.status, that substitutes the proper values into
16938# config.h.in to produce config.h.
16939
16940# Create a delimiter string that does not exist in confdefs.h, to ease
16941# handling of long lines.
16942ac_delim='%!_!# '
16943for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016944 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16945 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016946 break
16947 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016948 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016949 else
16950 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16951 fi
16952done
16953
16954# For the awk script, D is an array of macro values keyed by name,
16955# likewise P contains macro parameters if any. Preserve backslash
16956# newline sequences.
16957
16958ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16959sed -n '
16960s/.\{148\}/&'"$ac_delim"'/g
16961t rset
16962:rset
16963s/^[ ]*#[ ]*define[ ][ ]*/ /
16964t def
16965d
16966:def
16967s/\\$//
16968t bsnl
16969s/["\\]/\\&/g
16970s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16971D["\1"]=" \3"/p
16972s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16973d
16974:bsnl
16975s/["\\]/\\&/g
16976s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16977D["\1"]=" \3\\\\\\n"\\/p
16978t cont
16979s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16980t cont
16981d
16982:cont
16983n
16984s/.\{148\}/&'"$ac_delim"'/g
16985t clear
16986:clear
16987s/\\$//
16988t bsnlc
16989s/["\\]/\\&/g; s/^/"/; s/$/"/p
16990d
16991:bsnlc
16992s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16993b cont
16994' <confdefs.h | sed '
16995s/'"$ac_delim"'/"\\\
16996"/g' >>$CONFIG_STATUS || ac_write_fail=1
16997
16998cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16999 for (key in D) D_is_set[key] = 1
17000 FS = ""
17001}
17002/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17003 line = \$ 0
17004 split(line, arg, " ")
17005 if (arg[1] == "#") {
17006 defundef = arg[2]
17007 mac1 = arg[3]
17008 } else {
17009 defundef = substr(arg[1], 2)
17010 mac1 = arg[2]
17011 }
17012 split(mac1, mac2, "(") #)
17013 macro = mac2[1]
17014 prefix = substr(line, 1, index(line, defundef) - 1)
17015 if (D_is_set[macro]) {
17016 # Preserve the white space surrounding the "#".
17017 print prefix "define", macro P[macro] D[macro]
17018 next
17019 } else {
17020 # Replace #undef with comments. This is necessary, for example,
17021 # in the case of _POSIX_SOURCE, which is predefined and required
17022 # on some systems where configure will not decide to define it.
17023 if (defundef == "undef") {
17024 print "/*", prefix defundef, macro, "*/"
17025 next
17026 }
17027 }
17028}
17029{ print }
17030_ACAWK
17031_ACEOF
17032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017033 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017034fi # test -n "$CONFIG_HEADERS"
17035
17036
17037eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17038shift
17039for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017040do
17041 case $ac_tag in
17042 :[FHLC]) ac_mode=$ac_tag; continue;;
17043 esac
17044 case $ac_mode$ac_tag in
17045 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017046 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047 :[FH]-) ac_tag=-:-;;
17048 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17049 esac
17050 ac_save_IFS=$IFS
17051 IFS=:
17052 set x $ac_tag
17053 IFS=$ac_save_IFS
17054 shift
17055 ac_file=$1
17056 shift
17057
17058 case $ac_mode in
17059 :L) ac_source=$1;;
17060 :[FH])
17061 ac_file_inputs=
17062 for ac_f
17063 do
17064 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017065 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017066 *) # Look for the file first in the build tree, then in the source tree
17067 # (if the path is not absolute). The absolute path cannot be DOS-style,
17068 # because $ac_f cannot contain `:'.
17069 test -f "$ac_f" ||
17070 case $ac_f in
17071 [\\/$]*) false;;
17072 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17073 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017074 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017076 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17077 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017078 done
17079
17080 # Let's still pretend it is `configure' which instantiates (i.e., don't
17081 # use $as_me), people would be surprised to read:
17082 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017083 configure_input='Generated from '`
17084 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17085 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086 if test x"$ac_file" != x-; then
17087 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017088 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17089$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017091 # Neutralize special characters interpreted by sed in replacement strings.
17092 case $configure_input in #(
17093 *\&* | *\|* | *\\* )
17094 ac_sed_conf_input=`$as_echo "$configure_input" |
17095 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17096 *) ac_sed_conf_input=$configure_input;;
17097 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098
17099 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017100 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17101 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017102 esac
17103 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017104 esac
17105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017106 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017107$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017108 X"$ac_file" : 'X\(//\)[^/]' \| \
17109 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017110 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017111$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017112 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17113 s//\1/
17114 q
17115 }
17116 /^X\(\/\/\)[^/].*/{
17117 s//\1/
17118 q
17119 }
17120 /^X\(\/\/\)$/{
17121 s//\1/
17122 q
17123 }
17124 /^X\(\/\).*/{
17125 s//\1/
17126 q
17127 }
17128 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017129 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017130 ac_builddir=.
17131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132case "$ac_dir" in
17133.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17134*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017135 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017137 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017138 case $ac_top_builddir_sub in
17139 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17140 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17141 esac ;;
17142esac
17143ac_abs_top_builddir=$ac_pwd
17144ac_abs_builddir=$ac_pwd$ac_dir_suffix
17145# for backward compatibility:
17146ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017147
17148case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017149 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017150 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017151 ac_top_srcdir=$ac_top_builddir_sub
17152 ac_abs_top_srcdir=$ac_pwd ;;
17153 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017154 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017155 ac_top_srcdir=$srcdir
17156 ac_abs_top_srcdir=$srcdir ;;
17157 *) # Relative name.
17158 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17159 ac_top_srcdir=$ac_top_build_prefix$srcdir
17160 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017161esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017162ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017163
Martin v. Löwis11437992002-04-12 09:54:03 +000017164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017165 case $ac_mode in
17166 :F)
17167 #
17168 # CONFIG_FILE
17169 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017170
17171 case $INSTALL in
17172 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017174 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017175 ac_MKDIR_P=$MKDIR_P
17176 case $MKDIR_P in
17177 [\\/$]* | ?:[\\/]* ) ;;
17178 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17179 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017180_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017181
Matthias Kloseb9621712010-04-24 17:59:49 +000017182cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183# If the template does not know about datarootdir, expand it.
17184# FIXME: This hack should be removed a few years after 2.60.
17185ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017186ac_sed_dataroot='
17187/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017188 p
17189 q
17190}
17191/@datadir@/p
17192/@docdir@/p
17193/@infodir@/p
17194/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017195/@mandir@/p'
17196case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017197*datarootdir*) ac_datarootdir_seen=yes;;
17198*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017199 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17200$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017202cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017203 ac_datarootdir_hack='
17204 s&@datadir@&$datadir&g
17205 s&@docdir@&$docdir&g
17206 s&@infodir@&$infodir&g
17207 s&@localedir@&$localedir&g
17208 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017209 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210esac
17211_ACEOF
17212
17213# Neutralize VPATH when `$srcdir' = `.'.
17214# Shell code in configure.ac might set extrasub.
17215# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017216cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17217ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017218$extrasub
17219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017220cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017221:t
17222/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017223s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017225s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226s&@srcdir@&$ac_srcdir&;t t
17227s&@abs_srcdir@&$ac_abs_srcdir&;t t
17228s&@top_srcdir@&$ac_top_srcdir&;t t
17229s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17230s&@builddir@&$ac_builddir&;t t
17231s&@abs_builddir@&$ac_abs_builddir&;t t
17232s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17233s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017234s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017235$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017236"
Victor Stinnere0be4232011-10-25 13:06:09 +020017237eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17238 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017241 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17242 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17243 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017245which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017246$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017247which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017248
Victor Stinnere0be4232011-10-25 13:06:09 +020017249 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017250 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017251 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17252 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017253 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017254 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017255 ;;
17256 :H)
17257 #
17258 # CONFIG_HEADER
17259 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017260 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017261 {
17262 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017263 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17264 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017265 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017266 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017267 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17268$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017269 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017270 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017271 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017272 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017273 fi
17274 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017275 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017276 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017277 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017278 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281
17282 esac
17283
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017284
17285 case $ac_file$ac_mode in
17286 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17287
17288 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289done # for ac_tag
17290
Guido van Rossum627b2d71993-12-24 10:39:16 +000017291
Matthias Kloseb9621712010-04-24 17:59:49 +000017292as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017293_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017294ac_clean_files=$ac_clean_files_save
17295
Matthias Kloseb9621712010-04-24 17:59:49 +000017296test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017297 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017298
Martin v. Löwis11437992002-04-12 09:54:03 +000017299
17300# configure is writing to config.log, and then calls config.status.
17301# config.status does its own redirection, appending to config.log.
17302# Unfortunately, on DOS this fails, as config.log is still kept open
17303# by configure, so config.status won't be able to write to it; its
17304# output is simply discarded. So we exec the FD to /dev/null,
17305# effectively closing config.log, so it can be properly (re)opened and
17306# appended to by config.status. When coming back to configure, we
17307# need to make the FD available again.
17308if test "$no_create" != yes; then
17309 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017310 ac_config_status_args=
17311 test "$silent" = yes &&
17312 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017313 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017314 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017315 exec 5>>config.log
17316 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17317 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017318 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017319fi
17320if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17321 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17322$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017323fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017324
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017325
Christian Heimes75ed8902013-11-20 01:11:18 +010017326echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017327if test ! -f Modules/Setup
17328then
17329 cp $srcdir/Modules/Setup.dist Modules/Setup
17330fi
17331
Christian Heimes75ed8902013-11-20 01:11:18 +010017332echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017333if test ! -f Modules/Setup.local
17334then
17335 echo "# Edit this file for local setup changes" >Modules/Setup.local
17336fi
17337
Christian Heimes75ed8902013-11-20 01:11:18 +010017338echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017339$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17340 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017341 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017342mv config.c Modules