blob: ceb042f485df2995813f63fcc8a9258b072aa9ad [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.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
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'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
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
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000677ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000678LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100679MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000680INSTALL_DATA
681INSTALL_SCRIPT
682INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530683OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200684PYTHON
685ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200686ac_ct_READELF
687READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000688ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200689ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000690AR
691RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000692USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000693GNULD
694LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000695LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000696RUNSHARED
697INSTSONAME
698LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000699PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000700BLDLIBRARY
701DLLLIBRARY
702LDLIBRARY
703LIBRARY
704BUILDEXEEXT
705EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200706NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200707MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200708PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200709PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200710MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200711ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000712MAINCC
713CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714GREP
715CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000716OBJEXT
717EXEEXT
718ac_ct_CC
719CPPFLAGS
720LDFLAGS
721CFLAGS
722CC
723EXPORT_MACOSX_DEPLOYMENT_TARGET
724CONFIGURE_MACOSX_DEPLOYMENT_TARGET
725SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200726_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000727MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000728FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000729FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800730FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000731FRAMEWORKALTINSTALLLAST
732FRAMEWORKALTINSTALLFIRST
733FRAMEWORKINSTALLLAST
734FRAMEWORKINSTALLFIRST
735PYTHONFRAMEWORKINSTALLDIR
736PYTHONFRAMEWORKPREFIX
737PYTHONFRAMEWORKDIR
738PYTHONFRAMEWORKIDENTIFIER
739PYTHONFRAMEWORK
740LIPO_32BIT_FLAGS
741ARCH_RUN_32BIT
742UNIVERSALSDK
743CONFIG_ARGS
744SOVERSION
745VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200746PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100747host_os
748host_vendor
749host_cpu
750host
751build_os
752build_vendor
753build_cpu
754build
Martin Panter1046d5c2016-04-23 00:58:44 +0000755cross_compiling
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500756HAS_HG
757HGBRANCH
758HGTAG
759HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400760BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000761target_alias
762host_alias
763build_alias
764LIBS
765ECHO_T
766ECHO_N
767ECHO_C
768DEFS
769mandir
770localedir
771libdir
772psdir
773pdfdir
774dvidir
775htmldir
776infodir
777docdir
778oldincludedir
779includedir
doko@ubuntu.com55532312016-06-14 08:55:19 +0200780runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000781localstatedir
782sharedstatedir
783sysconfdir
784datadir
785datarootdir
786libexecdir
787sbindir
788bindir
789program_transform_name
790prefix
791exec_prefix
792PACKAGE_URL
793PACKAGE_BUGREPORT
794PACKAGE_STRING
795PACKAGE_VERSION
796PACKAGE_TARNAME
797PACKAGE_NAME
798PATH_SEPARATOR
799SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000800ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000801ac_user_opts='
802enable_option_checking
803enable_universalsdk
804with_universal_archs
805with_framework_name
806enable_framework
807with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600808with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_cxx_main
810with_suffix
811enable_shared
812enable_profiling
813with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700814with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100815with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100816with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000817with_libs
818with_system_expat
819with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100820with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000821enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700822with_tcltk_includes
823with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_dbmliborder
825with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000826with_threads
827with_thread
828enable_ipv6
829with_doc_strings
830with_tsc
831with_pymalloc
832with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_fpectl
834with_libm
835with_libc
836enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800838with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000839'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 ac_precious_vars='build_alias
841host_alias
842target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100843MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844CC
845CFLAGS
846LDFLAGS
847LIBS
848CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100849CPP
850PKG_CONFIG
851PKG_CONFIG_PATH
852PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000856ac_init_help=
857ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000858ac_unrecognized_opts=
859ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860# The variables have the same names as the options, with
861# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865no_recursion=
866prefix=NONE
867program_prefix=NONE
868program_suffix=NONE
869program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874x_includes=NONE
875x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000876
877# Installation directory options.
878# These are left unexpanded so users can "make install exec_prefix=/foo"
879# and all the variables that are supposed to be based on exec_prefix
880# by default will actually change.
881# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000882# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883bindir='${exec_prefix}/bin'
884sbindir='${exec_prefix}/sbin'
885libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886datarootdir='${prefix}/share'
887datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888sysconfdir='${prefix}/etc'
889sharedstatedir='${prefix}/com'
890localstatedir='${prefix}/var'
doko@ubuntu.com55532312016-06-14 08:55:19 +0200891runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892includedir='${prefix}/include'
893oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
895infodir='${datarootdir}/info'
896htmldir='${docdir}'
897dvidir='${docdir}'
898pdfdir='${docdir}'
899psdir='${docdir}'
900libdir='${exec_prefix}/lib'
901localedir='${datarootdir}/locale'
902mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908 # If the previous option needs an argument, assign it.
909 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 ac_prev=
912 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200916 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
917 *=) ac_optarg= ;;
918 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921 # Accept the important Cygnus configure options, so we can diagnose typos.
922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_dashdash$ac_option in
924 --)
925 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927 -bindir | --bindir | --bindi | --bind | --bin | --bi)
928 ac_prev=bindir ;;
929 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
932 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937 -cache-file | --cache-file | --cache-fil | --cache-fi \
938 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
939 ac_prev=cache_file ;;
940 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
941 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 cache_file=$ac_optarg ;;
943
944 --config-cache | -C)
945 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
953 | --dataroo | --dataro | --datar)
954 ac_prev=datarootdir ;;
955 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
956 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
957 datarootdir=$ac_optarg ;;
958
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200963 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 ac_useropt_orig=$ac_useropt
965 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
966 case $ac_user_opts in
967 *"
968"enable_$ac_useropt"
969"*) ;;
970 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
971 ac_unrecognized_sep=', ';;
972 esac
973 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974
975 -docdir | --docdir | --docdi | --doc | --do)
976 ac_prev=docdir ;;
977 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
978 docdir=$ac_optarg ;;
979
980 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
981 ac_prev=dvidir ;;
982 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
983 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000987 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200989 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 ac_useropt_orig=$ac_useropt
991 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
992 case $ac_user_opts in
993 *"
994"enable_$ac_useropt"
995"*) ;;
996 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
997 ac_unrecognized_sep=', ';;
998 esac
999 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1002 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1003 | --exec | --exe | --ex)
1004 ac_prev=exec_prefix ;;
1005 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1006 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1007 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
1010 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001011 # Obsolete; use --with-gas.
1012 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 -help | --help | --hel | --he | -h)
1015 ac_init_help=long ;;
1016 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1017 ac_init_help=recursive ;;
1018 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1019 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001026 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1027 ac_prev=htmldir ;;
1028 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1029 | --ht=*)
1030 htmldir=$ac_optarg ;;
1031
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032 -includedir | --includedir | --includedi | --included | --include \
1033 | --includ | --inclu | --incl | --inc)
1034 ac_prev=includedir ;;
1035 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1036 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
1039 -infodir | --infodir | --infodi | --infod | --info | --inf)
1040 ac_prev=infodir ;;
1041 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -libdir | --libdir | --libdi | --libd)
1045 ac_prev=libdir ;;
1046 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1050 | --libexe | --libex | --libe)
1051 ac_prev=libexecdir ;;
1052 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1053 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001056 -localedir | --localedir | --localedi | --localed | --locale)
1057 ac_prev=localedir ;;
1058 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1059 localedir=$ac_optarg ;;
1060
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 ac_prev=localstatedir ;;
1064 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
1068 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1069 ac_prev=mandir ;;
1070 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Obsolete; use --without-fp.
1075 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 no_create=yes ;;
1080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1082 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1083 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1086 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1087 | --oldin | --oldi | --old | --ol | --o)
1088 ac_prev=oldincludedir ;;
1089 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1090 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1091 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1095 ac_prev=prefix ;;
1096 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1100 | --program-pre | --program-pr | --program-p)
1101 ac_prev=program_prefix ;;
1102 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1103 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1107 | --program-suf | --program-su | --program-s)
1108 ac_prev=program_suffix ;;
1109 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1110 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-transform-name | --program-transform-name \
1114 | --program-transform-nam | --program-transform-na \
1115 | --program-transform-n | --program-transform- \
1116 | --program-transform | --program-transfor \
1117 | --program-transfo | --program-transf \
1118 | --program-trans | --program-tran \
1119 | --progr-tra | --program-tr | --program-t)
1120 ac_prev=program_transform_name ;;
1121 -program-transform-name=* | --program-transform-name=* \
1122 | --program-transform-nam=* | --program-transform-na=* \
1123 | --program-transform-n=* | --program-transform-=* \
1124 | --program-transform=* | --program-transfor=* \
1125 | --program-transfo=* | --program-transf=* \
1126 | --program-trans=* | --program-tran=* \
1127 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001130 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1131 ac_prev=pdfdir ;;
1132 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1133 pdfdir=$ac_optarg ;;
1134
1135 -psdir | --psdir | --psdi | --psd | --ps)
1136 ac_prev=psdir ;;
1137 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1138 psdir=$ac_optarg ;;
1139
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1141 | -silent | --silent | --silen | --sile | --sil)
1142 silent=yes ;;
1143
doko@ubuntu.com55532312016-06-14 08:55:19 +02001144 -runstatedir | --runstatedir | --runstatedi | --runstated \
1145 | --runstate | --runstat | --runsta | --runst | --runs \
1146 | --run | --ru | --r)
1147 ac_prev=runstatedir ;;
1148 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1149 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1150 | --run=* | --ru=* | --r=*)
1151 runstatedir=$ac_optarg ;;
1152
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001153 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1154 ac_prev=sbindir ;;
1155 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1156 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158
1159 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1160 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1161 | --sharedst | --shareds | --shared | --share | --shar \
1162 | --sha | --sh)
1163 ac_prev=sharedstatedir ;;
1164 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1165 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1166 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1167 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170 -site | --site | --sit)
1171 ac_prev=site ;;
1172 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1176 ac_prev=srcdir ;;
1177 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1181 | --syscon | --sysco | --sysc | --sys | --sy)
1182 ac_prev=sysconfdir ;;
1183 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1184 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1193 verbose=yes ;;
1194
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 -version | --version | --versio | --versi | --vers | -V)
1196 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001202 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt_orig=$ac_useropt
1204 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205 case $ac_user_opts in
1206 *"
1207"with_$ac_useropt"
1208"*) ;;
1209 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1210 ac_unrecognized_sep=', ';;
1211 esac
1212 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213
1214 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001218 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 ac_useropt_orig=$ac_useropt
1220 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1221 case $ac_user_opts in
1222 *"
1223"with_$ac_useropt"
1224"*) ;;
1225 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1226 ac_unrecognized_sep=', ';;
1227 esac
1228 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230 --x)
1231 # Obsolete; use --with-x.
1232 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233
1234 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1235 | --x-incl | --x-inc | --x-in | --x-i)
1236 ac_prev=x_includes ;;
1237 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1238 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1242 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1243 ac_prev=x_libraries ;;
1244 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1245 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001248 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1249Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250 ;;
1251
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 *=*)
1253 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1254 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 case $ac_envvar in #(
1256 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 export $ac_envvar ;;
1261
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001262 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001267 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 ;;
1269
1270 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271done
1272
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276fi
1277
Matthias Kloseb9621712010-04-24 17:59:49 +00001278if test -n "$ac_unrecognized_opts"; then
1279 case $enable_option_checking in
1280 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001282 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1283 esac
1284fi
1285
1286# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1288 datadir sysconfdir sharedstatedir localstatedir includedir \
1289 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
doko@ubuntu.com55532312016-06-14 08:55:19 +02001290 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001293 # Remove trailing slashes.
1294 case $ac_val in
1295 */ )
1296 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1297 eval $ac_var=\$ac_val;;
1298 esac
1299 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001300 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 [\\/$]* | ?:[\\/]* ) continue;;
1302 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001304 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001305done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307# There might be people who depend on the old broken behavior: `$host'
1308# used to hold the argument of --host etc.
1309# FIXME: To remove some day.
1310build=$build_alias
1311host=$host_alias
1312target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# FIXME: To remove some day.
1315if test "x$host_alias" != x; then
1316 if test "x$build_alias" = x; then
1317 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001318 elif test "x$build_alias" != "x$host_alias"; then
1319 cross_compiling=yes
1320 fi
1321fi
1322
1323ac_tool_prefix=
1324test -n "$host_alias" && ac_tool_prefix=$host_alias-
1325
1326test "$silent" = yes && exec 6>/dev/null
1327
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329ac_pwd=`pwd` && test -n "$ac_pwd" &&
1330ac_ls_di=`ls -di .` &&
1331ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335
1336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337# Find the source files, if location was not specified.
1338if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001339 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001341 ac_confdir=`$as_dirname -- "$as_myself" ||
1342$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1343 X"$as_myself" : 'X\(//\)[^/]' \| \
1344 X"$as_myself" : 'X\(//\)$' \| \
1345 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1346$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)[^/].*/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\/\)$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\).*/{
1360 s//\1/
1361 q
1362 }
1363 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001364 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366 srcdir=..
1367 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368else
1369 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371if test ! -r "$srcdir/$ac_unique_file"; then
1372 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1376ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001377 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378 pwd)`
1379# When building in place, set srcdir=.
1380if test "$ac_abs_confdir" = "$ac_pwd"; then
1381 srcdir=.
1382fi
1383# Remove unnecessary trailing slashes from srcdir.
1384# Double slashes in file names in object file debugging info
1385# mess up M-x gdb in Emacs.
1386case $srcdir in
1387*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1388esac
1389for ac_var in $ac_precious_vars; do
1390 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_env_${ac_var}_value=\$${ac_var}
1392 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1393 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1394done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395
Martin v. Löwis11437992002-04-12 09:54:03 +00001396#
1397# Report the --help message.
1398#
1399if test "$ac_init_help" = "long"; then
1400 # Omit some internal or obsolete options to make the list less imposing.
1401 # This message is too long to be a string in the A/UX 3.1 sh.
1402 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001403\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
1405Usage: $0 [OPTION]... [VAR=VALUE]...
1406
1407To assign environment variables (e.g., CC, CFLAGS...), specify them as
1408VAR=VALUE. See below for descriptions of some of the useful variables.
1409
1410Defaults for the options are specified in brackets.
1411
1412Configuration:
1413 -h, --help display this help and exit
1414 --help=short display options specific to this package
1415 --help=recursive display the short help of all the included packages
1416 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001417 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 --cache-file=FILE cache test results in FILE [disabled]
1419 -C, --config-cache alias for \`--cache-file=config.cache'
1420 -n, --no-create do not create output files
1421 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1422
Martin v. Löwis11437992002-04-12 09:54:03 +00001423Installation directories:
1424 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428
1429By default, \`make install' will install all the files in
1430\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1431an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1432for instance \`--prefix=\$HOME'.
1433
1434For better control, use the options below.
1435
1436Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 --bindir=DIR user executables [EPREFIX/bin]
1438 --sbindir=DIR system admin executables [EPREFIX/sbin]
1439 --libexecdir=DIR program executables [EPREFIX/libexec]
1440 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1441 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1442 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
doko@ubuntu.com55532312016-06-14 08:55:19 +02001443 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --libdir=DIR object code libraries [EPREFIX/lib]
1445 --includedir=DIR C header files [PREFIX/include]
1446 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1447 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1448 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1449 --infodir=DIR info documentation [DATAROOTDIR/info]
1450 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1451 --mandir=DIR man documentation [DATAROOTDIR/man]
1452 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1453 --htmldir=DIR html documentation [DOCDIR]
1454 --dvidir=DIR dvi documentation [DOCDIR]
1455 --pdfdir=DIR pdf documentation [DOCDIR]
1456 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001457_ACEOF
1458
1459 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001460
1461System types:
1462 --build=BUILD configure for building on BUILD [guessed]
1463 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
1465fi
1466
1467if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001469 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001470 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 cat <<\_ACEOF
1472
1473Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1476 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001477 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001478 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --enable-framework[=INSTALLDIR]
1480 Build (MacOSX|Darwin) framework
1481 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001482 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001483 --enable-loadable-sqlite-extensions
1484 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --enable-ipv6 Enable ipv6 (with ipv4) support
1486 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001487 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001488 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490Optional Packages:
1491 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1492 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001493 --with-universal-archs=ARCH
1494 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001495 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001496 --with-framework-name=FRAMEWORK
1497 specify an alternate name of the framework built
1498 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001500 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001501 --with-cxx-main=<compiler>
1502 compile main() and link python executable with C++
1503 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --with-suffix=.exe set executable suffix
1505 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001506 --with-lto Enable Link Time Optimization in PGO builds.
1507 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001508 --with-hash-algorithm=[fnv|siphash24]
1509 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001510 --with-address-sanitizer
1511 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001513 --with-system-expat build pyexpat module using an installed expat
1514 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001515 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001516 --with-system-libmpdec build _decimal module using an installed libmpdec
1517 library
Ned Deilyd819b932013-09-06 01:07:05 -07001518 --with-tcltk-includes='-I...'
1519 override search for Tcl and Tk include files
1520 --with-tcltk-libs='-L...'
1521 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001522 --with-dbmliborder=db1:db2:...
1523 order to check db backends for dbm. Valid value is a
1524 colon separated string with the backend names
1525 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with(out)-threads[=DIRECTORY]
1528 disable/enable thread support
1529 --with(out)-thread[=DIRECTORY]
1530 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001532 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001534 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with-fpectl enable SIGFPE catching
1536 --with-libm=STRING math library
1537 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001538 --with(out)-computed-gotos
1539 Use computed gotos in evaluation loop (enabled by
1540 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001541 --with(out)-ensurepip=[=upgrade]
1542 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001543
1544Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001545 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001546 CC C compiler command
1547 CFLAGS C compiler flags
1548 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1549 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001551 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001552 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001553 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001554 PKG_CONFIG path to pkg-config utility
1555 PKG_CONFIG_PATH
1556 directories to add to pkg-config's search path
1557 PKG_CONFIG_LIBDIR
1558 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001559
1560Use these variables to override the choices made by `configure' or to help
1561it to find libraries and programs with nonstandard names/locations.
1562
Georg Brandle2e15612009-05-20 18:25:10 +00001563Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001564_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001566fi
1567
1568if test "$ac_init_help" = "recursive"; then
1569 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001571 test -d "$ac_dir" ||
1572 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1573 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 ac_builddir=.
1575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001576case "$ac_dir" in
1577.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1578*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001581 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 case $ac_top_builddir_sub in
1583 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1584 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1585 esac ;;
1586esac
1587ac_abs_top_builddir=$ac_pwd
1588ac_abs_builddir=$ac_pwd$ac_dir_suffix
1589# for backward compatibility:
1590ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001591
1592case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 ac_top_srcdir=$ac_top_builddir_sub
1596 ac_abs_top_srcdir=$ac_pwd ;;
1597 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 ac_top_srcdir=$srcdir
1600 ac_abs_top_srcdir=$srcdir ;;
1601 *) # Relative name.
1602 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1603 ac_top_srcdir=$ac_top_build_prefix$srcdir
1604 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001605esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 cd "$ac_dir" || { ac_status=$?; continue; }
1609 # Check for guested configure.
1610 if test -f "$ac_srcdir/configure.gnu"; then
1611 echo &&
1612 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1613 elif test -f "$ac_srcdir/configure"; then
1614 echo &&
1615 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001616 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001617 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 fi || ac_status=$?
1619 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001620 done
1621fi
1622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001624if $ac_init_version; then
1625 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001626python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001628
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001629Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001630This configure script is free software; the Free Software Foundation
1631gives unlimited permission to copy, distribute and modify it.
1632_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001635
1636## ------------------------ ##
1637## Autoconf initialization. ##
1638## ------------------------ ##
1639
1640# ac_fn_c_try_compile LINENO
1641# --------------------------
1642# Try to compile conftest.$ac_ext, and return whether this succeeded.
1643ac_fn_c_try_compile ()
1644{
1645 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646 rm -f conftest.$ac_objext
1647 if { { ac_try="$ac_compile"
1648case "(($ac_try" in
1649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1650 *) ac_try_echo=$ac_try;;
1651esac
1652eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1653$as_echo "$ac_try_echo"; } >&5
1654 (eval "$ac_compile") 2>conftest.err
1655 ac_status=$?
1656 if test -s conftest.err; then
1657 grep -v '^ *+' conftest.err >conftest.er1
1658 cat conftest.er1 >&5
1659 mv -f conftest.er1 conftest.err
1660 fi
1661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1662 test $ac_status = 0; } && {
1663 test -z "$ac_c_werror_flag" ||
1664 test ! -s conftest.err
1665 } && test -s conftest.$ac_objext; then :
1666 ac_retval=0
1667else
1668 $as_echo "$as_me: failed program was:" >&5
1669sed 's/^/| /' conftest.$ac_ext >&5
1670
1671 ac_retval=1
1672fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001673 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 as_fn_set_status $ac_retval
1675
1676} # ac_fn_c_try_compile
1677
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001678# ac_fn_c_try_cpp LINENO
1679# ----------------------
1680# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1681ac_fn_c_try_cpp ()
1682{
1683 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1684 if { { ac_try="$ac_cpp conftest.$ac_ext"
1685case "(($ac_try" in
1686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1687 *) ac_try_echo=$ac_try;;
1688esac
1689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1690$as_echo "$ac_try_echo"; } >&5
1691 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1692 ac_status=$?
1693 if test -s conftest.err; then
1694 grep -v '^ *+' conftest.err >conftest.er1
1695 cat conftest.er1 >&5
1696 mv -f conftest.er1 conftest.err
1697 fi
1698 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1699 test $ac_status = 0; } > conftest.i && {
1700 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1701 test ! -s conftest.err
1702 }; then :
1703 ac_retval=0
1704else
1705 $as_echo "$as_me: failed program was:" >&5
1706sed 's/^/| /' conftest.$ac_ext >&5
1707
1708 ac_retval=1
1709fi
1710 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1711 as_fn_set_status $ac_retval
1712
1713} # ac_fn_c_try_cpp
1714
Matthias Kloseb9621712010-04-24 17:59:49 +00001715# ac_fn_c_try_link LINENO
1716# -----------------------
1717# Try to link conftest.$ac_ext, and return whether this succeeded.
1718ac_fn_c_try_link ()
1719{
1720 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1721 rm -f conftest.$ac_objext conftest$ac_exeext
1722 if { { ac_try="$ac_link"
1723case "(($ac_try" in
1724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1725 *) ac_try_echo=$ac_try;;
1726esac
1727eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1728$as_echo "$ac_try_echo"; } >&5
1729 (eval "$ac_link") 2>conftest.err
1730 ac_status=$?
1731 if test -s conftest.err; then
1732 grep -v '^ *+' conftest.err >conftest.er1
1733 cat conftest.er1 >&5
1734 mv -f conftest.er1 conftest.err
1735 fi
1736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1737 test $ac_status = 0; } && {
1738 test -z "$ac_c_werror_flag" ||
1739 test ! -s conftest.err
1740 } && test -s conftest$ac_exeext && {
1741 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001742 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 }; then :
1744 ac_retval=0
1745else
1746 $as_echo "$as_me: failed program was:" >&5
1747sed 's/^/| /' conftest.$ac_ext >&5
1748
1749 ac_retval=1
1750fi
1751 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1752 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1753 # interfere with the next link command; also delete a directory that is
1754 # left behind by Apple's compiler. We do this before executing the actions.
1755 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001756 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001757 as_fn_set_status $ac_retval
1758
1759} # ac_fn_c_try_link
1760
Matthias Kloseb9621712010-04-24 17:59:49 +00001761# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1762# -------------------------------------------------------
1763# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1764# the include files in INCLUDES and setting the cache variable VAR
1765# accordingly.
1766ac_fn_c_check_header_mongrel ()
1767{
1768 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001769 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1771$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001772if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 $as_echo_n "(cached) " >&6
1774fi
1775eval ac_res=\$$3
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1777$as_echo "$ac_res" >&6; }
1778else
1779 # Is the header compilable?
1780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1781$as_echo_n "checking $2 usability... " >&6; }
1782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1783/* end confdefs.h. */
1784$4
1785#include <$2>
1786_ACEOF
1787if ac_fn_c_try_compile "$LINENO"; then :
1788 ac_header_compiler=yes
1789else
1790 ac_header_compiler=no
1791fi
1792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1794$as_echo "$ac_header_compiler" >&6; }
1795
1796# Is the header present?
1797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1798$as_echo_n "checking $2 presence... " >&6; }
1799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1800/* end confdefs.h. */
1801#include <$2>
1802_ACEOF
1803if ac_fn_c_try_cpp "$LINENO"; then :
1804 ac_header_preproc=yes
1805else
1806 ac_header_preproc=no
1807fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001808rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1810$as_echo "$ac_header_preproc" >&6; }
1811
1812# So? What about this header?
1813case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1814 yes:no: )
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1816$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1818$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1819 ;;
1820 no:yes:* )
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1822$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1824$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1826$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1828$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1830$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001831( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001832## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001833## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001834 ) | sed "s/^/$as_me: WARNING: /" >&2
1835 ;;
1836esac
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1838$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001839if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001840 $as_echo_n "(cached) " >&6
1841else
1842 eval "$3=\$ac_header_compiler"
1843fi
1844eval ac_res=\$$3
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1846$as_echo "$ac_res" >&6; }
1847fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001848 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001849
1850} # ac_fn_c_check_header_mongrel
1851
1852# ac_fn_c_try_run LINENO
1853# ----------------------
1854# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1855# that executables *can* be run.
1856ac_fn_c_try_run ()
1857{
1858 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1859 if { { ac_try="$ac_link"
1860case "(($ac_try" in
1861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1862 *) ac_try_echo=$ac_try;;
1863esac
1864eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1865$as_echo "$ac_try_echo"; } >&5
1866 (eval "$ac_link") 2>&5
1867 ac_status=$?
1868 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1869 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1870 { { case "(($ac_try" in
1871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1872 *) ac_try_echo=$ac_try;;
1873esac
1874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1875$as_echo "$ac_try_echo"; } >&5
1876 (eval "$ac_try") 2>&5
1877 ac_status=$?
1878 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1879 test $ac_status = 0; }; }; then :
1880 ac_retval=0
1881else
1882 $as_echo "$as_me: program exited with status $ac_status" >&5
1883 $as_echo "$as_me: failed program was:" >&5
1884sed 's/^/| /' conftest.$ac_ext >&5
1885
1886 ac_retval=$ac_status
1887fi
1888 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001889 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001890 as_fn_set_status $ac_retval
1891
1892} # ac_fn_c_try_run
1893
1894# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1895# -------------------------------------------------------
1896# Tests whether HEADER exists and can be compiled using the include files in
1897# INCLUDES, setting the cache variable VAR accordingly.
1898ac_fn_c_check_header_compile ()
1899{
1900 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1902$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001903if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001904 $as_echo_n "(cached) " >&6
1905else
1906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h. */
1908$4
1909#include <$2>
1910_ACEOF
1911if ac_fn_c_try_compile "$LINENO"; then :
1912 eval "$3=yes"
1913else
1914 eval "$3=no"
1915fi
1916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1917fi
1918eval ac_res=\$$3
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1920$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001921 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001922
1923} # ac_fn_c_check_header_compile
1924
Matthias Kloseb9621712010-04-24 17:59:49 +00001925# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1926# -------------------------------------------
1927# Tests whether TYPE exists after having included INCLUDES, setting cache
1928# variable VAR accordingly.
1929ac_fn_c_check_type ()
1930{
1931 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1933$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001934if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001935 $as_echo_n "(cached) " >&6
1936else
1937 eval "$3=no"
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$4
1941int
1942main ()
1943{
1944if (sizeof ($2))
1945 return 0;
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$4
1954int
1955main ()
1956{
1957if (sizeof (($2)))
1958 return 0;
1959 ;
1960 return 0;
1961}
1962_ACEOF
1963if ac_fn_c_try_compile "$LINENO"; then :
1964
1965else
1966 eval "$3=yes"
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971fi
1972eval ac_res=\$$3
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1974$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001975 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001976
1977} # ac_fn_c_check_type
1978
1979# ac_fn_c_find_uintX_t LINENO BITS VAR
1980# ------------------------------------
1981# Finds an unsigned integer type with width BITS, setting cache variable VAR
1982# accordingly.
1983ac_fn_c_find_uintX_t ()
1984{
1985 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1987$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001988if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001989 $as_echo_n "(cached) " >&6
1990else
1991 eval "$3=no"
1992 # Order is important - never check a type that is potentially smaller
1993 # than half of the expected target width.
1994 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1995 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$ac_includes_default
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002003test_array [0] = 0;
2004return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 case $ac_type in #(
2012 uint$2_t) :
2013 eval "$3=yes" ;; #(
2014 *) :
2015 eval "$3=\$ac_type" ;;
2016esac
2017fi
2018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002019 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002020
2021else
2022 break
2023fi
2024 done
2025fi
2026eval ac_res=\$$3
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2028$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002029 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002030
2031} # ac_fn_c_find_uintX_t
2032
2033# ac_fn_c_find_intX_t LINENO BITS VAR
2034# -----------------------------------
2035# Finds a signed integer type with width BITS, setting cache variable VAR
2036# accordingly.
2037ac_fn_c_find_intX_t ()
2038{
2039 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2041$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002042if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002043 $as_echo_n "(cached) " >&6
2044else
2045 eval "$3=no"
2046 # Order is important - never check a type that is potentially smaller
2047 # than half of the expected target width.
2048 for ac_type in int$2_t 'int' 'long int' \
2049 'long long int' 'short int' 'signed char'; do
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002053 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002054int
2055main ()
2056{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002057static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002058test_array [0] = 0;
2059return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002069 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002070int
2071main ()
2072{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002073static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002074 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002075test_array [0] = 0;
2076return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083
2084else
2085 case $ac_type in #(
2086 int$2_t) :
2087 eval "$3=yes" ;; #(
2088 *) :
2089 eval "$3=\$ac_type" ;;
2090esac
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002095 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002096
2097else
2098 break
2099fi
2100 done
2101fi
2102eval ac_res=\$$3
2103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2104$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002105 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002106
2107} # ac_fn_c_find_intX_t
2108
2109# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2110# --------------------------------------------
2111# Tries to find the compile-time value of EXPR in a program that includes
2112# INCLUDES, setting VAR accordingly. Returns whether the value could be
2113# computed
2114ac_fn_c_compute_int ()
2115{
2116 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2117 if test "$cross_compiling" = yes; then
2118 # Depending upon the size, compute the lo and hi bounds.
2119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122int
2123main ()
2124{
2125static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002126test_array [0] = 0;
2127return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002128
2129 ;
2130 return 0;
2131}
2132_ACEOF
2133if ac_fn_c_try_compile "$LINENO"; then :
2134 ac_lo=0 ac_mid=0
2135 while :; do
2136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h. */
2138$4
2139int
2140main ()
2141{
2142static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002143test_array [0] = 0;
2144return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_compile "$LINENO"; then :
2151 ac_hi=$ac_mid; break
2152else
2153 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2154 if test $ac_lo -le $ac_mid; then
2155 ac_lo= ac_hi=
2156 break
2157 fi
2158 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2159fi
2160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161 done
2162else
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164/* end confdefs.h. */
2165$4
2166int
2167main ()
2168{
2169static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002170test_array [0] = 0;
2171return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002172
2173 ;
2174 return 0;
2175}
2176_ACEOF
2177if ac_fn_c_try_compile "$LINENO"; then :
2178 ac_hi=-1 ac_mid=-1
2179 while :; do
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182$4
2183int
2184main ()
2185{
2186static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002187test_array [0] = 0;
2188return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002189
2190 ;
2191 return 0;
2192}
2193_ACEOF
2194if ac_fn_c_try_compile "$LINENO"; then :
2195 ac_lo=$ac_mid; break
2196else
2197 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2198 if test $ac_mid -le $ac_hi; then
2199 ac_lo= ac_hi=
2200 break
2201 fi
2202 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2203fi
2204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2205 done
2206else
2207 ac_lo= ac_hi=
2208fi
2209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210fi
2211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212# Binary search between lo and hi bounds.
2213while test "x$ac_lo" != "x$ac_hi"; do
2214 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217$4
2218int
2219main ()
2220{
2221static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002222test_array [0] = 0;
2223return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002224
2225 ;
2226 return 0;
2227}
2228_ACEOF
2229if ac_fn_c_try_compile "$LINENO"; then :
2230 ac_hi=$ac_mid
2231else
2232 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2233fi
2234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2235done
2236case $ac_lo in #((
2237?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2238'') ac_retval=1 ;;
2239esac
2240 else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243$4
2244static long int longval () { return $2; }
2245static unsigned long int ulongval () { return $2; }
2246#include <stdio.h>
2247#include <stdlib.h>
2248int
2249main ()
2250{
2251
2252 FILE *f = fopen ("conftest.val", "w");
2253 if (! f)
2254 return 1;
2255 if (($2) < 0)
2256 {
2257 long int i = longval ();
2258 if (i != ($2))
2259 return 1;
2260 fprintf (f, "%ld", i);
2261 }
2262 else
2263 {
2264 unsigned long int i = ulongval ();
2265 if (i != ($2))
2266 return 1;
2267 fprintf (f, "%lu", i);
2268 }
2269 /* Do not output a trailing newline, as this causes \r\n confusion
2270 on some platforms. */
2271 return ferror (f) || fclose (f) != 0;
2272
2273 ;
2274 return 0;
2275}
2276_ACEOF
2277if ac_fn_c_try_run "$LINENO"; then :
2278 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2279else
2280 ac_retval=1
2281fi
2282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2283 conftest.$ac_objext conftest.beam conftest.$ac_ext
2284rm -f conftest.val
2285
2286 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002287 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 as_fn_set_status $ac_retval
2289
2290} # ac_fn_c_compute_int
2291
2292# ac_fn_c_check_func LINENO FUNC VAR
2293# ----------------------------------
2294# Tests whether FUNC exists, setting the cache variable VAR accordingly
2295ac_fn_c_check_func ()
2296{
2297 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2299$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002300if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2306 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2307#define $2 innocuous_$2
2308
2309/* System header to define __stub macros and hopefully few prototypes,
2310 which can conflict with char $2 (); below.
2311 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2312 <limits.h> exists even on freestanding compilers. */
2313
2314#ifdef __STDC__
2315# include <limits.h>
2316#else
2317# include <assert.h>
2318#endif
2319
2320#undef $2
2321
2322/* Override any GCC internal prototype to avoid an error.
2323 Use char because int might match the return type of a GCC
2324 builtin and then its argument prototype would still apply. */
2325#ifdef __cplusplus
2326extern "C"
2327#endif
2328char $2 ();
2329/* The GNU C library defines this for functions which it implements
2330 to always fail with ENOSYS. Some functions are actually named
2331 something starting with __ and the normal name is an alias. */
2332#if defined __stub_$2 || defined __stub___$2
2333choke me
2334#endif
2335
2336int
2337main ()
2338{
2339return $2 ();
2340 ;
2341 return 0;
2342}
2343_ACEOF
2344if ac_fn_c_try_link "$LINENO"; then :
2345 eval "$3=yes"
2346else
2347 eval "$3=no"
2348fi
2349rm -f core conftest.err conftest.$ac_objext \
2350 conftest$ac_exeext conftest.$ac_ext
2351fi
2352eval ac_res=\$$3
2353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2354$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002355 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002356
2357} # ac_fn_c_check_func
2358
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002359# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2360# ---------------------------------------------
2361# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2362# accordingly.
2363ac_fn_c_check_decl ()
2364{
2365 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2366 as_decl_name=`echo $2|sed 's/ *(.*//'`
2367 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2369$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2370if eval \${$3+:} false; then :
2371 $as_echo_n "(cached) " >&6
2372else
2373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h. */
2375$4
2376int
2377main ()
2378{
2379#ifndef $as_decl_name
2380#ifdef __cplusplus
2381 (void) $as_decl_use;
2382#else
2383 (void) $as_decl_name;
2384#endif
2385#endif
2386
2387 ;
2388 return 0;
2389}
2390_ACEOF
2391if ac_fn_c_try_compile "$LINENO"; then :
2392 eval "$3=yes"
2393else
2394 eval "$3=no"
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397fi
2398eval ac_res=\$$3
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2400$as_echo "$ac_res" >&6; }
2401 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2402
2403} # ac_fn_c_check_decl
2404
Matthias Kloseb9621712010-04-24 17:59:49 +00002405# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2406# ----------------------------------------------------
2407# Tries to find if the field MEMBER exists in type AGGR, after including
2408# INCLUDES, setting cache variable VAR accordingly.
2409ac_fn_c_check_member ()
2410{
2411 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2413$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002414if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 $as_echo_n "(cached) " >&6
2416else
2417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2418/* end confdefs.h. */
2419$5
2420int
2421main ()
2422{
2423static $2 ac_aggr;
2424if (ac_aggr.$3)
2425return 0;
2426 ;
2427 return 0;
2428}
2429_ACEOF
2430if ac_fn_c_try_compile "$LINENO"; then :
2431 eval "$4=yes"
2432else
2433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434/* end confdefs.h. */
2435$5
2436int
2437main ()
2438{
2439static $2 ac_aggr;
2440if (sizeof ac_aggr.$3)
2441return 0;
2442 ;
2443 return 0;
2444}
2445_ACEOF
2446if ac_fn_c_try_compile "$LINENO"; then :
2447 eval "$4=yes"
2448else
2449 eval "$4=no"
2450fi
2451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452fi
2453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454fi
2455eval ac_res=\$$4
2456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2457$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002458 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002459
2460} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002462This file contains any messages produced by compilers while
2463running configure, to aid debugging if configure makes a mistake.
2464
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002465It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002466generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002467
2468 $ $0 $@
2469
2470_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002472{
2473cat <<_ASUNAME
2474## --------- ##
2475## Platform. ##
2476## --------- ##
2477
2478hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2479uname -m = `(uname -m) 2>/dev/null || echo unknown`
2480uname -r = `(uname -r) 2>/dev/null || echo unknown`
2481uname -s = `(uname -s) 2>/dev/null || echo unknown`
2482uname -v = `(uname -v) 2>/dev/null || echo unknown`
2483
2484/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2485/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2486
2487/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2488/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2489/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002491/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2492/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2493/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2494
2495_ASUNAME
2496
2497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2498for as_dir in $PATH
2499do
2500 IFS=$as_save_IFS
2501 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 $as_echo "PATH: $as_dir"
2503 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
2506} >&5
2507
2508cat >&5 <<_ACEOF
2509
2510
2511## ----------- ##
2512## Core tests. ##
2513## ----------- ##
2514
2515_ACEOF
2516
2517
2518# Keep a trace of the command line.
2519# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002520# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002521# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002522# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002523ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002524ac_configure_args0=
2525ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002526ac_must_keep_next=false
2527for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002528do
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 for ac_arg
2530 do
2531 case $ac_arg in
2532 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2533 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2534 | -silent | --silent | --silen | --sile | --sil)
2535 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 esac
2539 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002544 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002546 case $ac_arg in
2547 *=* | --config-cache | -C | -disable-* | --disable-* \
2548 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2549 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2550 | -with-* | --with-* | -without-* | --without-* | --x)
2551 case "$ac_configure_args0 " in
2552 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2553 esac
2554 ;;
2555 -* ) ac_must_keep_next=true ;;
2556 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002557 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002559 ;;
2560 esac
2561 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002562done
Matthias Kloseb9621712010-04-24 17:59:49 +00002563{ ac_configure_args0=; unset ac_configure_args0;}
2564{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002565
2566# When interrupted or exit'd, cleanup temporary files, and complete
2567# config.log. We remove comments because anyway the quotes in there
2568# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569# WARNING: Use '\'' to represent an apostrophe within the trap.
2570# 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 +00002571trap 'exit_status=$?
2572 # Save into config.log some information that might help in debugging.
2573 {
2574 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002575
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002577## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 echo
2580 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581(
2582 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2583 eval ac_val=\$$ac_var
2584 case $ac_val in #(
2585 *${as_nl}*)
2586 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2588$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 esac
2590 case $ac_var in #(
2591 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2593 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 esac ;;
2595 esac
2596 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2599 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 "s/'\''/'\''\\\\'\'''\''/g;
2602 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2603 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002604 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002606 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 esac |
2608 sort
2609)
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002611
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002612 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002613## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002614## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002615 echo
2616 for ac_var in $ac_subst_vars
2617 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 eval ac_val=\$$ac_var
2619 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002623 done | sort
2624 echo
2625
2626 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002627 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002629## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002630 echo
2631 for ac_var in $ac_subst_files
2632 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633 eval ac_val=\$$ac_var
2634 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002638 done | sort
2639 echo
2640 fi
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002643 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002644## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002645## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 echo
2649 fi
2650 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 $as_echo "$as_me: caught signal $ac_signal"
2652 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654 rm -f core *.core core.conftest.* &&
2655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002658for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002660done
2661ac_signal=0
2662
2663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002665
Matthias Kloseb9621712010-04-24 17:59:49 +00002666$as_echo "/* confdefs.h */" > confdefs.h
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668# Predefined preprocessor variables.
2669
2670cat >>confdefs.h <<_ACEOF
2671#define PACKAGE_NAME "$PACKAGE_NAME"
2672_ACEOF
2673
Martin v. Löwis11437992002-04-12 09:54:03 +00002674cat >>confdefs.h <<_ACEOF
2675#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2676_ACEOF
2677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678cat >>confdefs.h <<_ACEOF
2679#define PACKAGE_VERSION "$PACKAGE_VERSION"
2680_ACEOF
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682cat >>confdefs.h <<_ACEOF
2683#define PACKAGE_STRING "$PACKAGE_STRING"
2684_ACEOF
2685
Martin v. Löwis11437992002-04-12 09:54:03 +00002686cat >>confdefs.h <<_ACEOF
2687#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2688_ACEOF
2689
Matthias Kloseb9621712010-04-24 17:59:49 +00002690cat >>confdefs.h <<_ACEOF
2691#define PACKAGE_URL "$PACKAGE_URL"
2692_ACEOF
2693
Martin v. Löwis11437992002-04-12 09:54:03 +00002694
2695# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002696# Prefer an explicitly selected file to automatically selected ones.
2697ac_site_file1=NONE
2698ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002700 # We do not want a PATH search for config.site.
2701 case $CONFIG_SITE in #((
2702 -*) ac_site_file1=./$CONFIG_SITE;;
2703 */*) ac_site_file1=$CONFIG_SITE;;
2704 *) ac_site_file1=./$CONFIG_SITE;;
2705 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002707 ac_site_file1=$prefix/share/config.site
2708 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709else
Matthias Kloseb9621712010-04-24 17:59:49 +00002710 ac_site_file1=$ac_default_prefix/share/config.site
2711 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002713for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002714do
Matthias Kloseb9621712010-04-24 17:59:49 +00002715 test "x$ac_site_file" = xNONE && continue
2716 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2718$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002720 . "$ac_site_file" \
2721 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2723as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002724See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002725 fi
2726done
2727
2728if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002729 # Some versions of bash will fail to source /dev/null (special files
2730 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2731 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2733$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002735 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2736 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 esac
2738 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739else
Matthias Kloseb9621712010-04-24 17:59:49 +00002740 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2741$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 >$cache_file
2743fi
2744
2745# Check that the precious variables saved in the cache have kept the same
2746# value.
2747ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2750 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002751 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2752 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 case $ac_old_set,$ac_new_set in
2754 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2756$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 +00002757 ac_cache_corrupted=: ;;
2758 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2760$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 ac_cache_corrupted=: ;;
2762 ,);;
2763 *)
2764 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 # differences in whitespace do not lead to failure.
2766 ac_old_val_w=`echo x $ac_old_val`
2767 ac_new_val_w=`echo x $ac_new_val`
2768 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2770$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2771 ac_cache_corrupted=:
2772 else
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2774$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2775 eval $ac_var=\$ac_old_val
2776 fi
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2778$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2780$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002781 fi;;
2782 esac
2783 # Pass precious variables to config.status.
2784 if test "$ac_new_set" = set; then
2785 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002786 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 *) ac_arg=$ac_var=$ac_new_val ;;
2788 esac
2789 case " $ac_configure_args " in
2790 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002791 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002792 esac
2793 fi
2794done
2795if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002796 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2798 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2799$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002800 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002802## -------------------- ##
2803## Main body of script. ##
2804## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002805
Guido van Rossum7f43da71994-08-01 12:15:30 +00002806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002811
Guido van Rossum627b2d71993-12-24 10:39:16 +00002812
Michael W. Hudson54241132001-12-07 15:38:26 +00002813
Trent Nelson4d4ec652012-10-16 08:51:24 -04002814
Trent Nelson5595ab52012-10-17 04:47:31 -04002815if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002816 # If we're building out-of-tree, we need to make sure the following
2817 # resources get picked up before their $srcdir counterparts.
2818 # Objects/ -> typeslots.inc
2819 # Include/ -> Python-ast.h, graminit.h
2820 # Python/ -> importlib.h
2821 # (A side effect of this is that these resources will automatically be
2822 # regenerated when building out-of-tree, regardless of whether or not
2823 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2824 # off.)
2825 BASECPPFLAGS="-IObjects -IInclude -IPython"
2826else
2827 BASECPPFLAGS=""
2828fi
2829
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002830
2831
2832
2833
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002834if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002835then
2836# Extract the first word of "hg", so it can be a program name with args.
2837set dummy hg; ac_word=$2
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2839$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002840if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002841 $as_echo_n "(cached) " >&6
2842else
2843 if test -n "$HAS_HG"; then
2844 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2845else
2846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2847for as_dir in $PATH
2848do
2849 IFS=$as_save_IFS
2850 test -z "$as_dir" && as_dir=.
2851 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002852 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002853 ac_cv_prog_HAS_HG="found"
2854 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2855 break 2
2856 fi
2857done
2858 done
2859IFS=$as_save_IFS
2860
2861 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2862fi
2863fi
2864HAS_HG=$ac_cv_prog_HAS_HG
2865if test -n "$HAS_HG"; then
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2867$as_echo "$HAS_HG" >&6; }
2868else
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2870$as_echo "no" >&6; }
2871fi
2872
2873
2874else
2875HAS_HG=no-repository
2876fi
2877if test $HAS_HG = found
2878then
2879 HGVERSION="hg id -i \$(srcdir)"
2880 HGTAG="hg id -t \$(srcdir)"
2881 HGBRANCH="hg id -b \$(srcdir)"
2882else
2883 HGVERSION=""
2884 HGTAG=""
2885 HGBRANCH=""
2886fi
2887
2888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002889ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002890
2891
Victor Stinnerdddf4842016-06-07 11:21:42 +02002892
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002893ac_aux_dir=
2894for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2895 if test -f "$ac_dir/install-sh"; then
2896 ac_aux_dir=$ac_dir
2897 ac_install_sh="$ac_aux_dir/install-sh -c"
2898 break
2899 elif test -f "$ac_dir/install.sh"; then
2900 ac_aux_dir=$ac_dir
2901 ac_install_sh="$ac_aux_dir/install.sh -c"
2902 break
2903 elif test -f "$ac_dir/shtool"; then
2904 ac_aux_dir=$ac_dir
2905 ac_install_sh="$ac_aux_dir/shtool install -c"
2906 break
2907 fi
2908done
2909if test -z "$ac_aux_dir"; then
2910 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2911fi
2912
2913# These three variables are undocumented and unsupported,
2914# and are intended to be withdrawn in a future Autoconf release.
2915# They can cause serious problems if a builder's source tree is in a directory
2916# whose full name contains unusual characters.
2917ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2918ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2919ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2920
2921
2922# Make sure we can run config.sub.
2923$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2924 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2925
2926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2927$as_echo_n "checking build system type... " >&6; }
2928if ${ac_cv_build+:} false; then :
2929 $as_echo_n "(cached) " >&6
2930else
2931 ac_build_alias=$build_alias
2932test "x$ac_build_alias" = x &&
2933 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2934test "x$ac_build_alias" = x &&
2935 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2936ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2937 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2938
2939fi
2940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2941$as_echo "$ac_cv_build" >&6; }
2942case $ac_cv_build in
2943*-*-*) ;;
2944*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2945esac
2946build=$ac_cv_build
2947ac_save_IFS=$IFS; IFS='-'
2948set x $ac_cv_build
2949shift
2950build_cpu=$1
2951build_vendor=$2
2952shift; shift
2953# Remember, the first character of IFS is used to create $*,
2954# except with old shells:
2955build_os=$*
2956IFS=$ac_save_IFS
2957case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2958
2959
2960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2961$as_echo_n "checking host system type... " >&6; }
2962if ${ac_cv_host+:} false; then :
2963 $as_echo_n "(cached) " >&6
2964else
2965 if test "x$host_alias" = x; then
2966 ac_cv_host=$ac_cv_build
2967else
2968 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2969 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2970fi
2971
2972fi
2973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2974$as_echo "$ac_cv_host" >&6; }
2975case $ac_cv_host in
2976*-*-*) ;;
2977*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2978esac
2979host=$ac_cv_host
2980ac_save_IFS=$IFS; IFS='-'
2981set x $ac_cv_host
2982shift
2983host_cpu=$1
2984host_vendor=$2
2985shift; shift
2986# Remember, the first character of IFS is used to create $*,
2987# except with old shells:
2988host_os=$*
2989IFS=$ac_save_IFS
2990case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2991
2992
2993
doko@python.orga10e4a92013-01-25 18:45:12 +01002994
2995
Ned Deilyfcbc2462014-08-22 13:32:49 -07002996# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2997rm -f pybuilddir.txt
2998
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002999if test "$cross_compiling" = yes; then
3000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3001$as_echo_n "checking for python interpreter for cross build... " >&6; }
3002 if test -z "$PYTHON_FOR_BUILD"; then
3003 for interp in python$PACKAGE_VERSION python3 python; do
3004 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003005 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003006 break
3007 fi
3008 interp=
3009 done
3010 if test x$interp = x; then
3011 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3012 fi
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3014$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003015 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 +02003016 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003017elif test "$cross_compiling" = maybe; then
3018 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003019else
3020 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3021fi
3022
3023
Martin v. Löwis11437992002-04-12 09:54:03 +00003024
Benjamin Petersond23f8222009-04-05 19:13:16 +00003025if test "$prefix" != "/"; then
3026 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3027fi
3028
3029
Martin v. Löwis11437992002-04-12 09:54:03 +00003030
3031
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003032# We don't use PACKAGE_ variables, and they cause conflicts
3033# with other autoconf-based packages that include Python.h
3034grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3035rm confdefs.h
3036mv confdefs.h.new confdefs.h
3037
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003038
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003039VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003040
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003041# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003042
3043SOVERSION=1.0
3044
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003045# The later defininition of _XOPEN_SOURCE disables certain features
3046# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3047
Matthias Kloseb9621712010-04-24 17:59:49 +00003048$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003049
3050
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003051# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3052# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3053# them.
3054
Matthias Kloseb9621712010-04-24 17:59:49 +00003055$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003056
3057
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003058# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3059# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3060# them.
3061
Matthias Kloseb9621712010-04-24 17:59:49 +00003062$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003063
3064
Martin v. Löwisd6320502004-08-12 13:45:08 +00003065# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3066# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3067
Matthias Kloseb9621712010-04-24 17:59:49 +00003068$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003069
3070
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3072# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3073# them.
3074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076
3077
3078
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003079define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003080
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003081# Arguments passed to configure.
3082
3083CONFIG_ARGS="$ac_configure_args"
3084
Matthias Kloseb9621712010-04-24 17:59:49 +00003085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3086$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003087# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003088if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003089 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003090 case $enableval in
3091 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003092 # Locate the best usable SDK, see Mac/README.txt for more
3093 # information
3094 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003095 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003096 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3098 if test ! -d "${enableval}"
3099 then
3100 enableval=/
3101 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003102 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003103 ;;
3104 esac
3105 case $enableval in
3106 no)
3107 UNIVERSALSDK=
3108 enable_universalsdk=
3109 ;;
3110 *)
3111 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003112 if test ! -d "${UNIVERSALSDK}"
3113 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003114 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003115 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116 ;;
3117 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003118
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003119
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120else
3121
3122 UNIVERSALSDK=
3123 enable_universalsdk=
3124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003127if test -n "${UNIVERSALSDK}"
3128then
Matthias Kloseb9621712010-04-24 17:59:49 +00003129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3130$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003131else
Matthias Kloseb9621712010-04-24 17:59:49 +00003132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3133$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003134fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003136
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003137
Ned Deily87adb6e2013-10-18 21:09:56 -07003138ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003139
Ned Deilycbfb9a52012-06-23 16:02:19 -07003140# For backward compatibility reasons we prefer to select '32-bit' if available,
3141# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003142UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003143if test "`uname -s`" = "Darwin"
3144then
3145 if test -n "${UNIVERSALSDK}"
3146 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003147 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003148 then
3149 UNIVERSAL_ARCHS="intel"
3150 fi
3151 fi
3152fi
3153
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003154
Matthias Kloseb9621712010-04-24 17:59:49 +00003155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3156$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003157
3158# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003159if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003160 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003161 UNIVERSAL_ARCHS="$withval"
3162
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003163fi
3164
Ned Deily87adb6e2013-10-18 21:09:56 -07003165if test -n "${UNIVERSALSDK}"
3166then
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3168$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3169else
3170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3171$as_echo "no" >&6; }
3172fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003173
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003174
3175# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003176if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003177 withval=$with_framework_name;
3178 PYTHONFRAMEWORK=${withval}
3179 PYTHONFRAMEWORKDIR=${withval}.framework
3180 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3181
3182else
3183
3184 PYTHONFRAMEWORK=Python
3185 PYTHONFRAMEWORKDIR=Python.framework
3186 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3187
3188fi
3189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003191if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003193 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003194 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003195 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003196 esac
3197 case $enableval in
3198 no)
3199 PYTHONFRAMEWORK=
3200 PYTHONFRAMEWORKDIR=no-framework
3201 PYTHONFRAMEWORKPREFIX=
3202 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203 FRAMEWORKINSTALLFIRST=
3204 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 FRAMEWORKALTINSTALLFIRST=
3206 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003207 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 if test "x${prefix}" = "xNONE"; then
3209 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3210 else
3211 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3212 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003213 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003214 ;;
3215 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003216 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003217 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003219 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003220 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3221 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003222 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003223 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003225 if test "x${prefix}" = "xNONE" ; then
3226 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003227
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003228 else
3229 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3230 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003231
3232 case "${enableval}" in
3233 /System*)
3234 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3235 if test "${prefix}" = "NONE" ; then
3236 # See below
3237 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3238 fi
3239 ;;
3240
3241 /Library*)
3242 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3243 ;;
3244
3245 */Library/Frameworks)
3246 MDIR="`dirname "${enableval}"`"
3247 MDIR="`dirname "${MDIR}"`"
3248 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3249
3250 if test "${prefix}" = "NONE"; then
3251 # User hasn't specified the
3252 # --prefix option, but wants to install
3253 # the framework in a non-default location,
3254 # ensure that the compatibility links get
3255 # installed relative to that prefix as well
3256 # instead of in /usr/local.
3257 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3258 fi
3259 ;;
3260
3261 *)
3262 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3263 ;;
3264 esac
3265
Jack Jansen127e56e2001-09-11 14:41:54 +00003266 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003267
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003268 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003269 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003273
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003274 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3275
3276 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3277
Jack Jansene578a632001-08-15 01:27:14 +00003278 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003279
Guido van Rossum563e7081996-09-10 18:20:48 +00003280else
Martin v. Löwis11437992002-04-12 09:54:03 +00003281
Jack Jansene578a632001-08-15 01:27:14 +00003282 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003283 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003284 PYTHONFRAMEWORKPREFIX=
3285 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003286 FRAMEWORKINSTALLFIRST=
3287 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003288 FRAMEWORKALTINSTALLFIRST=
3289 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003290 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003291 if test "x${prefix}" = "xNONE" ; then
3292 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3293 else
3294 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3295 fi
Jack Jansene578a632001-08-15 01:27:14 +00003296 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003297
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003299fi
3300
Thomas Wouters477c8d52006-05-27 19:21:47 +00003301
3302
Michael W. Hudson54241132001-12-07 15:38:26 +00003303
3304
3305
3306
Jack Jansene578a632001-08-15 01:27:14 +00003307
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003308
3309
3310
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003311
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003312
Ned Deilyb8f944f2013-11-21 22:42:25 -08003313
Jack Jansene578a632001-08-15 01:27:14 +00003314##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003315## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003316## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003317##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318# Set name for machine-dependent library files
3319
Matthias Kloseb9621712010-04-24 17:59:49 +00003320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3321$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003322if test -z "$MACHDEP"
3323then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003324 # avoid using uname for cross builds
3325 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003326 # ac_sys_system and ac_sys_release are used for setting
3327 # a lot of different things including 'define_xopen_source'
3328 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003329 case "$host" in
3330 *-*-linux*)
3331 ac_sys_system=Linux
3332 ;;
3333 *-*-cygwin*)
3334 ac_sys_system=Cygwin
3335 ;;
3336 *)
3337 # for now, limit cross builds to known configurations
3338 MACHDEP="unknown"
3339 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3340 esac
3341 ac_sys_release=
3342 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003343 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003344 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003345 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003346 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003347 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003348 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003349 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003350 fi
3351 ac_md_system=`echo $ac_sys_system |
3352 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3353 ac_md_release=`echo $ac_sys_release |
3354 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3355 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003356
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003357 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003358 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003359 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003360 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003361 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003362 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003363 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003364fi
Guido van Rossum91922671997-10-09 20:24:13 +00003365
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003366
3367if test "$cross_compiling" = yes; then
3368 case "$host" in
3369 *-*-linux*)
3370 case "$host_cpu" in
3371 arm*)
3372 _host_cpu=arm
3373 ;;
3374 *)
3375 _host_cpu=$host_cpu
3376 esac
3377 ;;
3378 *-*-cygwin*)
3379 _host_cpu=
3380 ;;
3381 *)
3382 # for now, limit cross builds to known configurations
3383 MACHDEP="unknown"
3384 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3385 esac
3386 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3387fi
3388
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003389# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3390# disable features if it is defined, without any means to access these
3391# features as extensions. For these systems, we skip the definition of
3392# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3393# some feature, make sure there is no alternative way to access this
3394# feature. Also, when using wildcards, make sure you have verified the
3395# need for not defining _XOPEN_SOURCE on all systems matching the
3396# wildcard, and that the wildcard does not include future systems
3397# (which may remove their limitations).
3398case $ac_sys_system/$ac_sys_release in
3399 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3400 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003401 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003402 # In addition, Stefan Krah confirms that issue #1244610 exists through
3403 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003404 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003405 define_xopen_source=no
3406 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3407 # also defined. This can be overridden by defining _BSD_SOURCE
3408 # As this has a different meaning on Linux, only define it on OpenBSD
3409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003411
3412 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003413 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003414 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3415 # also defined. This can be overridden by defining _BSD_SOURCE
3416 # As this has a different meaning on Linux, only define it on OpenBSD
3417
Matthias Kloseb9621712010-04-24 17:59:49 +00003418$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003419
3420 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003421 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3422 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3423 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003424 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 +00003425 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003426 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3427 # request to enable features supported by the standard as a request
3428 # to disable features not supported by the standard. The best way
3429 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3430 # entirely and define __EXTENSIONS__ instead.
3431 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003432 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003433 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3434 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003435 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003436 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003437 define_xopen_source=no;;
3438 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003439 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003440 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003441 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003442 # On FreeBSD 4, the math functions C89 does not cover are never defined
3443 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3444 FreeBSD/4.*)
3445 define_xopen_source=no;;
3446 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3447 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3448 # identifies itself as Darwin/7.*
3449 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3450 # disables platform specific features beyond repair.
3451 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3452 # has no effect, don't bother defining them
3453 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003454 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003455 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003456 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003457 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3458 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3459 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003460 AIX/4)
3461 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003462 AIX/5)
3463 if test `uname -r` -eq 1; then
3464 define_xopen_source=no
3465 fi
3466 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003467 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3468 # defining NI_NUMERICHOST.
3469 QNX/6.3.2)
3470 define_xopen_source=no
3471 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003472
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003473esac
3474
3475if test $define_xopen_source = yes
3476then
Victor Stinner14d098d2011-09-07 22:29:43 +02003477 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003478
Victor Stinner14d098d2011-09-07 22:29:43 +02003479$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003480
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003481
3482 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3483 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3484 # several APIs are not declared. Since this is also needed in some
3485 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003486
Matthias Kloseb9621712010-04-24 17:59:49 +00003487$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003488
3489
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003490
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003491$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003492
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003493fi
3494
Christian Heimes647cd872013-12-07 23:39:33 +01003495# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3496case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003497 hp*|HP*)
3498 define_stdc_a1=yes;;
3499 *)
3500 define_stdc_a1=no;;
3501esac
3502
3503if test $define_stdc_a1 = yes
3504then
Christian Heimes647cd872013-12-07 23:39:33 +01003505
3506$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3507
Christian Heimesb02bcae2013-12-08 15:21:08 +01003508fi
Christian Heimes647cd872013-12-07 23:39:33 +01003509
Guido van Rossum91922671997-10-09 20:24:13 +00003510#
3511# SGI compilers allow the specification of the both the ABI and the
3512# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003513# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003514#
3515# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3516# thus supply support for various ABI/ISA combinations. The MACHDEP
3517# variable is also adjusted.
3518#
3519
3520if test ! -z "$SGI_ABI"
3521then
3522 CC="cc $SGI_ABI"
3523 LDFLAGS="$SGI_ABI $LDFLAGS"
3524 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3527$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003528
Jack Jansen6b08a402004-06-03 12:41:45 +00003529# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3530# it may influence the way we can build extensions, so distutils
3531# needs to check it
3532
Thomas Wouters477c8d52006-05-27 19:21:47 +00003533
Jack Jansen6b08a402004-06-03 12:41:45 +00003534CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003535EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003536
Guido van Rossum627b2d71993-12-24 10:39:16 +00003537# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003538
3539# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3540# for debug/optimization stuff. BASECFLAGS is for flags that are required
3541# just to get things to compile and link. Users are free to override OPT
3542# when running configure or make. The build should not break if they do.
3543# BASECFLAGS should generally not be messed with, however.
3544
3545# XXX shouldn't some/most/all of this code be merged with the stuff later
3546# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3548$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003551if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003553 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003554 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003555 without_gcc=yes;;
3556 yes) CC=gcc
3557 without_gcc=no;;
3558 *) CC=$withval
3559 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003560 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003561else
Martin v. Löwis11437992002-04-12 09:54:03 +00003562
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003563 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003564 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003565 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003566 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003567 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568fi
3569
Matthias Kloseb9621712010-04-24 17:59:49 +00003570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3571$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003572
Zachary Ware5af85642015-12-21 12:09:17 -06003573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3574$as_echo_n "checking for --with-icc... " >&6; }
3575
3576# Check whether --with-icc was given.
3577if test "${with_icc+set}" = set; then :
3578 withval=$with_icc;
3579 case $withval in
3580 no) CC=${CC:-cc}
3581 with_icc=no;;
3582 yes) CC=icc
3583 CXX=icpc
3584 with_icc=yes;;
3585 *) CC=$withval
3586 with_icc=$withval;;
3587 esac
3588else
3589
3590 with_icc=no
3591fi
3592
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3594$as_echo "$with_icc" >&6; }
3595
Guido van Rossum8b131c51995-03-09 14:10:13 +00003596# If the user switches compilers, we can't believe the cache
3597if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3598then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003599 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003600(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003601fi
3602
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003603# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3604# when the compiler supports them, but we don't always want -O2, and
3605# we set -g later.
3606if test -z "$CFLAGS"; then
3607 CFLAGS=
3608fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003609
3610if test "$ac_sys_system" = "Darwin"
3611then
3612 # Compiler selection on MacOSX is more complicated than
3613 # AC_PROG_CC can handle, see Mac/README.txt for more
3614 # information
3615 if test -z "${CC}"
3616 then
3617 found_gcc=
3618 found_clang=
3619 as_save_IFS=$IFS; IFS=:
3620 for as_dir in $PATH
3621 do
3622 IFS=$as_save_IFS
3623 if test -x $as_dir/gcc; then
3624 if test -z "${found_gcc}"; then
3625 found_gcc=$as_dir/gcc
3626 fi
3627 fi
3628 if test -x $as_dir/clang; then
3629 if test -z "${found_clang}"; then
3630 found_clang=$as_dir/clang
3631 fi
3632 fi
3633 done
3634 IFS=$as_save_IFS
3635
3636 if test -n "$found_gcc" -a -n "$found_clang"
3637 then
3638 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3639 then
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3641$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3642 CC="$found_clang"
3643 CXX="$found_clang++"
3644 fi
3645
3646
3647 elif test -z "$found_gcc" -a -n "$found_clang"
3648 then
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3650$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3651 CC="$found_clang"
3652 CXX="$found_clang++"
3653
3654 elif test -z "$found_gcc" -a -z "$found_clang"
3655 then
3656 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3657 if test -n "${found_clang}"
3658 then
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3660$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3661 CC="${found_clang}"
3662 CXX="`/usr/bin/xcrun -find clang++`"
3663
3664 # else: use default behaviour
3665 fi
3666 fi
3667 fi
3668fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003669ac_ext=c
3670ac_cpp='$CPP $CPPFLAGS'
3671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3673ac_compiler_gnu=$ac_cv_c_compiler_gnu
3674if test -n "$ac_tool_prefix"; then
3675 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3676set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3678$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003679if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003681else
3682 if test -n "$CC"; then
3683 ac_cv_prog_CC="$CC" # Let the user override the test.
3684else
Martin v. Löwis11437992002-04-12 09:54:03 +00003685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3686for as_dir in $PATH
3687do
3688 IFS=$as_save_IFS
3689 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 $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 +00003694 break 2
3695 fi
3696done
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700fi
3701fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003702CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003703if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3705$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003706else
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3708$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003709fi
3710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711
Martin v. Löwis11437992002-04-12 09:54:03 +00003712fi
3713if test -z "$ac_cv_prog_CC"; then
3714 ac_ct_CC=$CC
3715 # Extract the first word of "gcc", so it can be a program name with args.
3716set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3718$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003719if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003721else
3722 if test -n "$ac_ct_CC"; then
3723 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3724else
3725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3726for as_dir in $PATH
3727do
3728 IFS=$as_save_IFS
3729 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $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 +00003734 break 2
3735 fi
3736done
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003739
3740fi
3741fi
3742ac_ct_CC=$ac_cv_prog_ac_ct_CC
3743if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3745$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003746else
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3748$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
3750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 if test "x$ac_ct_CC" = x; then
3752 CC=""
3753 else
3754 case $cross_compiling:$ac_tool_warned in
3755yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758ac_tool_warned=yes ;;
3759esac
3760 CC=$ac_ct_CC
3761 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
3763 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003764fi
3765
Jack Jansendd19cf82001-12-06 22:36:17 +00003766if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767 if test -n "$ac_tool_prefix"; then
3768 # 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 +00003769set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003772if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003774else
3775 if test -n "$CC"; then
3776 ac_cv_prog_CC="$CC" # Let the user override the test.
3777else
Martin v. Löwis11437992002-04-12 09:54:03 +00003778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779for as_dir in $PATH
3780do
3781 IFS=$as_save_IFS
3782 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 $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 +00003787 break 2
3788 fi
3789done
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003792
3793fi
3794fi
3795CC=$ac_cv_prog_CC
3796if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3798$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802fi
3803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003806fi
3807if test -z "$CC"; then
3808 # Extract the first word of "cc", so it can be a program name with args.
3809set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3811$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003812if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003814else
3815 if test -n "$CC"; then
3816 ac_cv_prog_CC="$CC" # Let the user override the test.
3817else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003818 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3820for as_dir in $PATH
3821do
3822 IFS=$as_save_IFS
3823 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003826 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3827 ac_prog_rejected=yes
3828 continue
3829 fi
3830 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $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 +00003832 break 2
3833 fi
3834done
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003837
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003838if test $ac_prog_rejected = yes; then
3839 # We found a bogon in the path, so make sure we never use it.
3840 set dummy $ac_cv_prog_CC
3841 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003843 # We chose a different compiler from the bogus one.
3844 # However, it has the same basename, so the bogon will be chosen
3845 # first if we set CC to just the basename; use the full file name.
3846 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003847 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003848 fi
3849fi
3850fi
3851fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003852CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003853if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3855$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003856else
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003859fi
3860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
3863if test -z "$CC"; then
3864 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 do
3867 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3868set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3870$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003871if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003872 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003873else
3874 if test -n "$CC"; then
3875 ac_cv_prog_CC="$CC" # Let the user override the test.
3876else
Martin v. Löwis11437992002-04-12 09:54:03 +00003877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3878for as_dir in $PATH
3879do
3880 IFS=$as_save_IFS
3881 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003884 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 $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 +00003886 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003888done
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003891
3892fi
3893fi
3894CC=$ac_cv_prog_CC
3895if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3897$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003898else
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3900$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003901fi
3902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 test -n "$CC" && break
3905 done
3906fi
3907if test -z "$CC"; then
3908 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003910do
3911 # Extract the first word of "$ac_prog", so it can be a program name with args.
3912set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3914$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003915if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003917else
3918 if test -n "$ac_ct_CC"; then
3919 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3920else
3921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3922for as_dir in $PATH
3923do
3924 IFS=$as_save_IFS
3925 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 $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 +00003930 break 2
3931 fi
3932done
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003935
Martin v. Löwis11437992002-04-12 09:54:03 +00003936fi
3937fi
3938ac_ct_CC=$ac_cv_prog_ac_ct_CC
3939if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3941$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003942else
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3944$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003945fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947
Martin v. Löwis11437992002-04-12 09:54:03 +00003948 test -n "$ac_ct_CC" && break
3949done
Michael W. Hudson54241132001-12-07 15:38:26 +00003950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 if test "x$ac_ct_CC" = x; then
3952 CC=""
3953 else
3954 case $cross_compiling:$ac_tool_warned in
3955yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958ac_tool_warned=yes ;;
3959esac
3960 CC=$ac_ct_CC
3961 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003962fi
3963
3964fi
3965
3966
Matthias Kloseb9621712010-04-24 17:59:49 +00003967test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003969as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003970See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003971
3972# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003973$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3974set X $ac_compile
3975ac_compiler=$2
3976for ac_option in --version -v -V -qversion; do
3977 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3983$as_echo "$ac_try_echo"; } >&5
3984 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003985 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 if test -s conftest.err; then
3987 sed '10a\
3988... rest of stderr output deleted ...
3989 10q' conftest.err >conftest.er1
3990 cat conftest.er1 >&5
3991 fi
3992 rm -f conftest.er1 conftest.err
3993 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3994 test $ac_status = 0; }
3995done
Martin v. Löwis11437992002-04-12 09:54:03 +00003996
Matthias Kloseb9621712010-04-24 17:59:49 +00003997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003998/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003999
Martin v. Löwis11437992002-04-12 09:54:03 +00004000int
4001main ()
4002{
4003
4004 ;
4005 return 0;
4006}
4007_ACEOF
4008ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004009ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004010# Try to create an executable without -o first, disregard a.out.
4011# It will help us diagnose broken compilers, and finding out an intuition
4012# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4014$as_echo_n "checking whether the C compiler works... " >&6; }
4015ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4016
4017# The possible output files:
4018ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020ac_rmfiles=
4021for ac_file in $ac_files
4022do
4023 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004025 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4026 esac
4027done
4028rm -f $ac_rmfiles
4029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031case "(($ac_try" in
4032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033 *) ac_try_echo=$ac_try;;
4034esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4036$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004037 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004038 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4040 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4042# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4043# in a Makefile. We should not override ac_cv_exeext if it was cached,
4044# so that the user can short-circuit this test for compilers unknown to
4045# Autoconf.
4046for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004047do
4048 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004051 ;;
4052 [ab].out )
4053 # We found the default executable, but exeext='' is most
4054 # certainly right.
4055 break;;
4056 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004058 then :; else
4059 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4060 fi
4061 # We set ac_cv_exeext here because the later test for it is not
4062 # safe: cross compilers may not add the suffix if given an `-o'
4063 # argument, so we may need to know it at that point already.
4064 # Even if this section looks crufty: it has the advantage of
4065 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004066 break;;
4067 * )
4068 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004069 esac
4070done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004071test "$ac_cv_exeext" = no && ac_cv_exeext=
4072
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004073else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074 ac_file=''
4075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004076if test -z "$ac_file"; then :
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4078$as_echo "no" >&6; }
4079$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004080sed 's/^/| /' conftest.$ac_ext >&5
4081
Matthias Kloseb9621712010-04-24 17:59:49 +00004082{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004084as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004085See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004086else
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4088$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4091$as_echo_n "checking for C compiler default output file name... " >&6; }
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4093$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004094ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004095
Matthias Kloseb9621712010-04-24 17:59:49 +00004096rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004097ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4099$as_echo_n "checking for suffix of executables... " >&6; }
4100if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004111 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4112# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4113# work properly (i.e., refer to `conftest.exe'), while it won't with
4114# `rm'.
4115for ac_file in conftest.exe conftest conftest.*; do
4116 test -f "$ac_file" || continue
4117 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004119 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4120 break;;
4121 * ) break;;
4122 esac
4123done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124else
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004127as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004128See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004130rm -f conftest conftest$ac_cv_exeext
4131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4132$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133
4134rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004135EXEEXT=$ac_cv_exeext
4136ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4138/* end confdefs.h. */
4139#include <stdio.h>
4140int
4141main ()
4142{
4143FILE *f = fopen ("conftest.out", "w");
4144 return ferror (f) || fclose (f) != 0;
4145
4146 ;
4147 return 0;
4148}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004150ac_clean_files="$ac_clean_files conftest.out"
4151# Check that the compiler produces executables we can run. If not, either
4152# the compiler is broken, or we cross compile.
4153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4154$as_echo_n "checking whether we are cross compiling... " >&6; }
4155if test "$cross_compiling" != yes; then
4156 { { ac_try="$ac_link"
4157case "(($ac_try" in
4158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4159 *) ac_try_echo=$ac_try;;
4160esac
4161eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4162$as_echo "$ac_try_echo"; } >&5
4163 (eval "$ac_link") 2>&5
4164 ac_status=$?
4165 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4166 test $ac_status = 0; }
4167 if { ac_try='./conftest$ac_cv_exeext'
4168 { { case "(($ac_try" in
4169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4170 *) ac_try_echo=$ac_try;;
4171esac
4172eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4173$as_echo "$ac_try_echo"; } >&5
4174 (eval "$ac_try") 2>&5
4175 ac_status=$?
4176 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4177 test $ac_status = 0; }; }; then
4178 cross_compiling=no
4179 else
4180 if test "$cross_compiling" = maybe; then
4181 cross_compiling=yes
4182 else
4183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004185as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004186If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004187See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 fi
4189 fi
4190fi
4191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4192$as_echo "$cross_compiling" >&6; }
4193
4194rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4195ac_clean_files=$ac_clean_files_save
4196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4197$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004198if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 $as_echo_n "(cached) " >&6
4200else
4201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004202/* end confdefs.h. */
4203
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
4212rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214case "(($ac_try" in
4215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4216 *) ac_try_echo=$ac_try;;
4217esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004218eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4219$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4223 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 for ac_file in conftest.o conftest.obj conftest.*; do
4225 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004226 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4229 break;;
4230 esac
4231done
4232else
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004234sed 's/^/| /' conftest.$ac_ext >&5
4235
Matthias Kloseb9621712010-04-24 17:59:49 +00004236{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4237$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004238as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004239See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004240fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004241rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4244$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004245OBJEXT=$ac_cv_objext
4246ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4248$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004249if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004251else
Matthias Kloseb9621712010-04-24 17:59:49 +00004252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004254
Martin v. Löwis11437992002-04-12 09:54:03 +00004255int
4256main ()
4257{
4258#ifndef __GNUC__
4259 choke me
4260#endif
4261
4262 ;
4263 return 0;
4264}
4265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004266if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 ac_compiler_gnu=yes
4268else
Matthias Kloseb9621712010-04-24 17:59:49 +00004269 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004272ac_cv_c_compiler_gnu=$ac_compiler_gnu
4273
4274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4276$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4277if test $ac_compiler_gnu = yes; then
4278 GCC=yes
4279else
4280 GCC=
4281fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004282ac_test_CFLAGS=${CFLAGS+set}
4283ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4285$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004286if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004287 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004288else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289 ac_save_c_werror_flag=$ac_c_werror_flag
4290 ac_c_werror_flag=yes
4291 ac_cv_prog_cc_g=no
4292 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004295
Martin v. Löwis11437992002-04-12 09:54:03 +00004296int
4297main ()
4298{
4299
4300 ;
4301 return 0;
4302}
4303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004304if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004305 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004306else
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 CFLAGS=""
4308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309/* end confdefs.h. */
4310
4311int
4312main ()
4313{
4314
4315 ;
4316 return 0;
4317}
4318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004319if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320
Matthias Kloseb9621712010-04-24 17:59:49 +00004321else
4322 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325/* end confdefs.h. */
4326
4327int
4328main ()
4329{
4330
4331 ;
4332 return 0;
4333}
4334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004335if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4343 ac_c_werror_flag=$ac_save_c_werror_flag
4344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4346$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004347if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004348 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004349elif test $ac_cv_prog_cc_g = yes; then
4350 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004351 CFLAGS="-g -O2"
4352 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004353 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004354 fi
4355else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004356 if test "$GCC" = yes; then
4357 CFLAGS="-O2"
4358 else
4359 CFLAGS=
4360 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4363$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004364if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004366else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004368ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004370/* end confdefs.h. */
4371#include <stdarg.h>
4372#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004373struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004374/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4375struct buf { int x; };
4376FILE * (*rcsopen) (struct buf *, struct stat *, int);
4377static char *e (p, i)
4378 char **p;
4379 int i;
4380{
4381 return p[i];
4382}
4383static char *f (char * (*g) (char **, int), char **p, ...)
4384{
4385 char *s;
4386 va_list v;
4387 va_start (v,p);
4388 s = g (p, va_arg (v,int));
4389 va_end (v);
4390 return s;
4391}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004392
4393/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4394 function prototypes and stuff, but not '\xHH' hex character constants.
4395 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004397 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4398 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004400int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4403 inside strings and character constants. */
4404#define FOO(x) 'x'
4405int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4406
Skip Montanaro6dead952003-09-25 14:50:04 +00004407int test (int i, double x);
4408struct s1 {int (*f) (int a);};
4409struct s2 {int (*f) (double a);};
4410int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4411int argc;
4412char **argv;
4413int
4414main ()
4415{
4416return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4417 ;
4418 return 0;
4419}
4420_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4422 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004423do
4424 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004425 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004428rm -f core conftest.err conftest.$ac_objext
4429 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004430done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004432CC=$ac_save_CC
4433
4434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004435# AC_CACHE_VAL
4436case "x$ac_cv_prog_cc_c89" in
4437 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4439$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004440 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4442$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004443 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4446$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004447esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004448if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004449
Matthias Kloseb9621712010-04-24 17:59:49 +00004450fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004451
Martin v. Löwis11437992002-04-12 09:54:03 +00004452ac_ext=c
4453ac_cpp='$CPP $CPPFLAGS'
4454ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4455ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4456ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004457
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004458ac_ext=c
4459ac_cpp='$CPP $CPPFLAGS'
4460ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4461ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4462ac_compiler_gnu=$ac_cv_c_compiler_gnu
4463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4464$as_echo_n "checking how to run the C preprocessor... " >&6; }
4465# On Suns, sometimes $CPP names a directory.
4466if test -n "$CPP" && test -d "$CPP"; then
4467 CPP=
4468fi
4469if test -z "$CPP"; then
4470 if ${ac_cv_prog_CPP+:} false; then :
4471 $as_echo_n "(cached) " >&6
4472else
4473 # Double quotes because CPP needs to be expanded
4474 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4475 do
4476 ac_preproc_ok=false
4477for ac_c_preproc_warn_flag in '' yes
4478do
4479 # Use a header file that comes with gcc, so configuring glibc
4480 # with a fresh cross-compiler works.
4481 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4482 # <limits.h> exists even on freestanding compilers.
4483 # On the NeXT, cc -E runs the code through the compiler's parser,
4484 # not just through cpp. "Syntax error" is here to catch this case.
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#ifdef __STDC__
4488# include <limits.h>
4489#else
4490# include <assert.h>
4491#endif
4492 Syntax error
4493_ACEOF
4494if ac_fn_c_try_cpp "$LINENO"; then :
4495
4496else
4497 # Broken: fails on valid input.
4498continue
4499fi
4500rm -f conftest.err conftest.i conftest.$ac_ext
4501
4502 # OK, works on sane cases. Now check whether nonexistent headers
4503 # can be detected and how.
4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4505/* end confdefs.h. */
4506#include <ac_nonexistent.h>
4507_ACEOF
4508if ac_fn_c_try_cpp "$LINENO"; then :
4509 # Broken: success on invalid input.
4510continue
4511else
4512 # Passes both tests.
4513ac_preproc_ok=:
4514break
4515fi
4516rm -f conftest.err conftest.i conftest.$ac_ext
4517
4518done
4519# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4520rm -f conftest.i conftest.err conftest.$ac_ext
4521if $ac_preproc_ok; then :
4522 break
4523fi
4524
4525 done
4526 ac_cv_prog_CPP=$CPP
4527
4528fi
4529 CPP=$ac_cv_prog_CPP
4530else
4531 ac_cv_prog_CPP=$CPP
4532fi
4533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4534$as_echo "$CPP" >&6; }
4535ac_preproc_ok=false
4536for ac_c_preproc_warn_flag in '' yes
4537do
4538 # Use a header file that comes with gcc, so configuring glibc
4539 # with a fresh cross-compiler works.
4540 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4541 # <limits.h> exists even on freestanding compilers.
4542 # On the NeXT, cc -E runs the code through the compiler's parser,
4543 # not just through cpp. "Syntax error" is here to catch this case.
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545/* end confdefs.h. */
4546#ifdef __STDC__
4547# include <limits.h>
4548#else
4549# include <assert.h>
4550#endif
4551 Syntax error
4552_ACEOF
4553if ac_fn_c_try_cpp "$LINENO"; then :
4554
4555else
4556 # Broken: fails on valid input.
4557continue
4558fi
4559rm -f conftest.err conftest.i conftest.$ac_ext
4560
4561 # OK, works on sane cases. Now check whether nonexistent headers
4562 # can be detected and how.
4563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4564/* end confdefs.h. */
4565#include <ac_nonexistent.h>
4566_ACEOF
4567if ac_fn_c_try_cpp "$LINENO"; then :
4568 # Broken: success on invalid input.
4569continue
4570else
4571 # Passes both tests.
4572ac_preproc_ok=:
4573break
4574fi
4575rm -f conftest.err conftest.i conftest.$ac_ext
4576
4577done
4578# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4579rm -f conftest.i conftest.err conftest.$ac_ext
4580if $ac_preproc_ok; then :
4581
4582else
4583 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4585as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4586See \`config.log' for more details" "$LINENO" 5; }
4587fi
4588
4589ac_ext=c
4590ac_cpp='$CPP $CPPFLAGS'
4591ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4592ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4593ac_compiler_gnu=$ac_cv_c_compiler_gnu
4594
4595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4596$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4597if ${ac_cv_path_GREP+:} false; then :
4598 $as_echo_n "(cached) " >&6
4599else
4600 if test -z "$GREP"; then
4601 ac_path_GREP_found=false
4602 # Loop through the user's path and test for each of PROGNAME-LIST
4603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4604for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4605do
4606 IFS=$as_save_IFS
4607 test -z "$as_dir" && as_dir=.
4608 for ac_prog in grep ggrep; do
4609 for ac_exec_ext in '' $ac_executable_extensions; do
4610 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4611 as_fn_executable_p "$ac_path_GREP" || continue
4612# Check for GNU ac_path_GREP and select it if it is found.
4613 # Check for GNU $ac_path_GREP
4614case `"$ac_path_GREP" --version 2>&1` in
4615*GNU*)
4616 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4617*)
4618 ac_count=0
4619 $as_echo_n 0123456789 >"conftest.in"
4620 while :
4621 do
4622 cat "conftest.in" "conftest.in" >"conftest.tmp"
4623 mv "conftest.tmp" "conftest.in"
4624 cp "conftest.in" "conftest.nl"
4625 $as_echo 'GREP' >> "conftest.nl"
4626 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4627 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4628 as_fn_arith $ac_count + 1 && ac_count=$as_val
4629 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4630 # Best one so far, save it but keep looking for a better one
4631 ac_cv_path_GREP="$ac_path_GREP"
4632 ac_path_GREP_max=$ac_count
4633 fi
4634 # 10*(2^10) chars as input seems more than enough
4635 test $ac_count -gt 10 && break
4636 done
4637 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4638esac
4639
4640 $ac_path_GREP_found && break 3
4641 done
4642 done
4643 done
4644IFS=$as_save_IFS
4645 if test -z "$ac_cv_path_GREP"; then
4646 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4647 fi
4648else
4649 ac_cv_path_GREP=$GREP
4650fi
4651
4652fi
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4654$as_echo "$ac_cv_path_GREP" >&6; }
4655 GREP="$ac_cv_path_GREP"
4656
4657
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004658
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
4660
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4662$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004664# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004665if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004666 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667
4668 case $withval in
4669 no) with_cxx_main=no
4670 MAINCC='$(CC)';;
4671 yes) with_cxx_main=yes
4672 MAINCC='$(CXX)';;
4673 *) with_cxx_main=yes
4674 MAINCC=$withval
4675 if test -z "$CXX"
4676 then
4677 CXX=$withval
4678 fi;;
4679 esac
4680else
4681
4682 with_cxx_main=no
4683 MAINCC='$(CC)'
4684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004685fi
4686
Matthias Kloseb9621712010-04-24 17:59:49 +00004687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4688$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004689
4690preset_cxx="$CXX"
4691if test -z "$CXX"
4692then
4693 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004694 gcc) if test -n "$ac_tool_prefix"; then
4695 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4696set dummy ${ac_tool_prefix}g++; ac_word=$2
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698$as_echo_n "checking for $ac_word... " >&6; }
4699if ${ac_cv_path_CXX+:} false; then :
4700 $as_echo_n "(cached) " >&6
4701else
4702 case $CXX in
4703 [\\/]* | ?:[\\/]*)
4704 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4705 ;;
4706 *)
4707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708for as_dir in notfound
4709do
4710 IFS=$as_save_IFS
4711 test -z "$as_dir" && as_dir=.
4712 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004714 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716 break 2
4717 fi
4718done
4719 done
4720IFS=$as_save_IFS
4721
4722 ;;
4723esac
4724fi
4725CXX=$ac_cv_path_CXX
4726if test -n "$CXX"; then
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4728$as_echo "$CXX" >&6; }
4729else
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731$as_echo "no" >&6; }
4732fi
4733
4734
4735fi
4736if test -z "$ac_cv_path_CXX"; then
4737 ac_pt_CXX=$CXX
4738 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004742if ${ac_cv_path_ac_pt_CXX+:} false; then :
4743 $as_echo_n "(cached) " >&6
4744else
4745 case $ac_pt_CXX in
4746 [\\/]* | ?:[\\/]*)
4747 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4748 ;;
4749 *)
4750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in notfound
4752do
4753 IFS=$as_save_IFS
4754 test -z "$as_dir" && as_dir=.
4755 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004757 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759 break 2
4760 fi
4761done
4762 done
4763IFS=$as_save_IFS
4764
4765 ;;
4766esac
4767fi
4768ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4769if test -n "$ac_pt_CXX"; then
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4771$as_echo "$ac_pt_CXX" >&6; }
4772else
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774$as_echo "no" >&6; }
4775fi
4776
4777 if test "x$ac_pt_CXX" = x; then
4778 CXX="g++"
4779 else
4780 case $cross_compiling:$ac_tool_warned in
4781yes:)
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4784ac_tool_warned=yes ;;
4785esac
4786 CXX=$ac_pt_CXX
4787 fi
4788else
4789 CXX="$ac_cv_path_CXX"
4790fi
4791 ;;
4792 cc) if test -n "$ac_tool_prefix"; then
4793 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4794set dummy ${ac_tool_prefix}c++; ac_word=$2
4795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004797if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799else
4800 case $CXX in
4801 [\\/]* | ?:[\\/]*)
4802 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4803 ;;
4804 *)
4805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806for as_dir in notfound
4807do
4808 IFS=$as_save_IFS
4809 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004814 break 2
4815 fi
4816done
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004818IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820 ;;
4821esac
4822fi
4823CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004824if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4826$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004827else
Matthias Kloseb9621712010-04-24 17:59:49 +00004828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4829$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004831
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832
4833fi
4834if test -z "$ac_cv_path_CXX"; then
4835 ac_pt_CXX=$CXX
4836 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4839$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004843 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004845 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 +00004846 ;;
4847 *)
4848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4849for as_dir in notfound
4850do
4851 IFS=$as_save_IFS
4852 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004855 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857 break 2
4858 fi
4859done
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004861IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ;;
4864esac
4865fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004866ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4867if test -n "$ac_pt_CXX"; then
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4869$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004870else
Matthias Kloseb9621712010-04-24 17:59:49 +00004871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4872$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004874
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875 if test "x$ac_pt_CXX" = x; then
4876 CXX="c++"
4877 else
4878 case $cross_compiling:$ac_tool_warned in
4879yes:)
4880{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4881$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4882ac_tool_warned=yes ;;
4883esac
4884 CXX=$ac_pt_CXX
4885 fi
4886else
4887 CXX="$ac_cv_path_CXX"
4888fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004889 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004890 clang|*/clang) if test -n "$ac_tool_prefix"; then
4891 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4892set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4894$as_echo_n "checking for $ac_word... " >&6; }
4895if ${ac_cv_path_CXX+:} false; then :
4896 $as_echo_n "(cached) " >&6
4897else
4898 case $CXX in
4899 [\\/]* | ?:[\\/]*)
4900 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4901 ;;
4902 *)
4903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4904for as_dir in notfound
4905do
4906 IFS=$as_save_IFS
4907 test -z "$as_dir" && as_dir=.
4908 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004910 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4912 break 2
4913 fi
4914done
4915 done
4916IFS=$as_save_IFS
4917
Ned Deilycbfb9a52012-06-23 16:02:19 -07004918 ;;
4919esac
4920fi
4921CXX=$ac_cv_path_CXX
4922if test -n "$CXX"; then
4923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4924$as_echo "$CXX" >&6; }
4925else
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
4928fi
4929
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004930
4931fi
4932if test -z "$ac_cv_path_CXX"; then
4933 ac_pt_CXX=$CXX
4934 # Extract the first word of "clang++", so it can be a program name with args.
4935set dummy clang++; ac_word=$2
4936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937$as_echo_n "checking for $ac_word... " >&6; }
4938if ${ac_cv_path_ac_pt_CXX+:} false; then :
4939 $as_echo_n "(cached) " >&6
4940else
4941 case $ac_pt_CXX in
4942 [\\/]* | ?:[\\/]*)
4943 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4944 ;;
4945 *)
4946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4947for as_dir in notfound
4948do
4949 IFS=$as_save_IFS
4950 test -z "$as_dir" && as_dir=.
4951 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004953 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4955 break 2
4956 fi
4957done
4958 done
4959IFS=$as_save_IFS
4960
4961 ;;
4962esac
4963fi
4964ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4965if test -n "$ac_pt_CXX"; then
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4967$as_echo "$ac_pt_CXX" >&6; }
4968else
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970$as_echo "no" >&6; }
4971fi
4972
4973 if test "x$ac_pt_CXX" = x; then
4974 CXX="clang++"
4975 else
4976 case $cross_compiling:$ac_tool_warned in
4977yes:)
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4979$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4980ac_tool_warned=yes ;;
4981esac
4982 CXX=$ac_pt_CXX
4983 fi
4984else
4985 CXX="$ac_cv_path_CXX"
4986fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004987 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004988 icc|*/icc) if test -n "$ac_tool_prefix"; then
4989 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4990set dummy ${ac_tool_prefix}icpc; ac_word=$2
4991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if ${ac_cv_path_CXX+:} false; then :
4994 $as_echo_n "(cached) " >&6
4995else
4996 case $CXX in
4997 [\\/]* | ?:[\\/]*)
4998 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4999 ;;
5000 *)
5001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5002for as_dir in notfound
5003do
5004 IFS=$as_save_IFS
5005 test -z "$as_dir" && as_dir=.
5006 for ac_exec_ext in '' $ac_executable_extensions; do
5007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5008 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5010 break 2
5011 fi
5012done
5013 done
5014IFS=$as_save_IFS
5015
5016 ;;
5017esac
5018fi
5019CXX=$ac_cv_path_CXX
5020if test -n "$CXX"; then
5021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5022$as_echo "$CXX" >&6; }
5023else
5024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5025$as_echo "no" >&6; }
5026fi
5027
5028
5029fi
5030if test -z "$ac_cv_path_CXX"; then
5031 ac_pt_CXX=$CXX
5032 # Extract the first word of "icpc", so it can be a program name with args.
5033set dummy icpc; ac_word=$2
5034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5035$as_echo_n "checking for $ac_word... " >&6; }
5036if ${ac_cv_path_ac_pt_CXX+:} false; then :
5037 $as_echo_n "(cached) " >&6
5038else
5039 case $ac_pt_CXX in
5040 [\\/]* | ?:[\\/]*)
5041 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5042 ;;
5043 *)
5044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5045for as_dir in notfound
5046do
5047 IFS=$as_save_IFS
5048 test -z "$as_dir" && as_dir=.
5049 for ac_exec_ext in '' $ac_executable_extensions; do
5050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5051 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5053 break 2
5054 fi
5055done
5056 done
5057IFS=$as_save_IFS
5058
5059 ;;
5060esac
5061fi
5062ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5063if test -n "$ac_pt_CXX"; then
5064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5065$as_echo "$ac_pt_CXX" >&6; }
5066else
5067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5068$as_echo "no" >&6; }
5069fi
5070
5071 if test "x$ac_pt_CXX" = x; then
5072 CXX="icpc"
5073 else
5074 case $cross_compiling:$ac_tool_warned in
5075yes:)
5076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5078ac_tool_warned=yes ;;
5079esac
5080 CXX=$ac_pt_CXX
5081 fi
5082else
5083 CXX="$ac_cv_path_CXX"
5084fi
5085 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005086 esac
5087 if test "$CXX" = "notfound"
5088 then
5089 CXX=""
5090 fi
5091fi
5092if test -z "$CXX"
5093then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005094 if test -n "$ac_tool_prefix"; then
5095 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5096 do
5097 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5098set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5100$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005101if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005103else
5104 if test -n "$CXX"; then
5105 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5106else
5107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108for as_dir in $PATH
5109do
5110 IFS=$as_save_IFS
5111 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005114 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005116 break 2
5117 fi
5118done
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121
5122fi
5123fi
5124CXX=$ac_cv_prog_CXX
5125if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5127$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128else
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131fi
5132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005133
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005134 test -n "$CXX" && break
5135 done
5136fi
5137if test -z "$CXX"; then
5138 ac_ct_CXX=$CXX
5139 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5140do
5141 # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5146 $as_echo_n "(cached) " >&6
5147else
5148 if test -n "$ac_ct_CXX"; then
5149 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5150else
5151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154 IFS=$as_save_IFS
5155 test -z "$as_dir" && as_dir=.
5156 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005158 ac_cv_prog_ac_ct_CXX="$ac_prog"
5159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160 break 2
5161 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005162done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005163 done
5164IFS=$as_save_IFS
5165
5166fi
5167fi
5168ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5169if test -n "$ac_ct_CXX"; then
5170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5171$as_echo "$ac_ct_CXX" >&6; }
5172else
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174$as_echo "no" >&6; }
5175fi
5176
5177
5178 test -n "$ac_ct_CXX" && break
5179done
5180
5181 if test "x$ac_ct_CXX" = x; then
5182 CXX="notfound"
5183 else
5184 case $cross_compiling:$ac_tool_warned in
5185yes:)
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5187$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5188ac_tool_warned=yes ;;
5189esac
5190 CXX=$ac_ct_CXX
5191 fi
5192fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005193
5194 if test "$CXX" = "notfound"
5195 then
5196 CXX=""
5197 fi
5198fi
5199if test "$preset_cxx" != "$CXX"
5200then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005201 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005202
5203 By default, distutils will build C++ extension modules with \"$CXX\".
5204 If this is not intended, then set CXX on the configure command line.
5205 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005206$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005207
5208 By default, distutils will build C++ extension modules with \"$CXX\".
5209 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005210 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005211fi
5212
5213
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5215
5216
5217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5218$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5219cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005220#undef bfin
5221#undef cris
5222#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005223#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005224#undef hppa
5225#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005227#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005228#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005229#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005230#undef unix
5231#if defined(__linux__)
5232# if defined(__x86_64__) && defined(__LP64__)
5233 x86_64-linux-gnu
5234# elif defined(__x86_64__) && defined(__ILP32__)
5235 x86_64-linux-gnux32
5236# elif defined(__i386__)
5237 i386-linux-gnu
5238# elif defined(__aarch64__) && defined(__AARCH64EL__)
5239# if defined(__ILP32__)
5240 aarch64_ilp32-linux-gnu
5241# else
5242 aarch64-linux-gnu
5243# endif
5244# elif defined(__aarch64__) && defined(__AARCH64EB__)
5245# if defined(__ILP32__)
5246 aarch64_be_ilp32-linux-gnu
5247# else
5248 aarch64_be-linux-gnu
5249# endif
5250# elif defined(__alpha__)
5251 alpha-linux-gnu
5252# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5253# if defined(__ARMEL__)
5254 arm-linux-gnueabihf
5255# else
5256 armeb-linux-gnueabihf
5257# endif
5258# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5259# if defined(__ARMEL__)
5260 arm-linux-gnueabi
5261# else
5262 armeb-linux-gnueabi
5263# endif
5264# elif defined(__hppa__)
5265 hppa-linux-gnu
5266# elif defined(__ia64__)
5267 ia64-linux-gnu
5268# elif defined(__m68k__) && !defined(__mcoldfire__)
5269 m68k-linux-gnu
5270# elif defined(__mips_hard_float) && defined(_MIPSEL)
5271# if _MIPS_SIM == _ABIO32
5272 mipsel-linux-gnu
5273# elif _MIPS_SIM == _ABIN32
5274 mips64el-linux-gnuabin32
5275# elif _MIPS_SIM == _ABI64
5276 mips64el-linux-gnuabi64
5277# else
5278# error unknown platform triplet
5279# endif
5280# elif defined(__mips_hard_float)
5281# if _MIPS_SIM == _ABIO32
5282 mips-linux-gnu
5283# elif _MIPS_SIM == _ABIN32
5284 mips64-linux-gnuabin32
5285# elif _MIPS_SIM == _ABI64
5286 mips64-linux-gnuabi64
5287# else
5288# error unknown platform triplet
5289# endif
5290# elif defined(__or1k__)
5291 or1k-linux-gnu
5292# elif defined(__powerpc__) && defined(__SPE__)
5293 powerpc-linux-gnuspe
5294# elif defined(__powerpc64__)
5295# if defined(__LITTLE_ENDIAN__)
5296 powerpc64le-linux-gnu
5297# else
5298 powerpc64-linux-gnu
5299# endif
5300# elif defined(__powerpc__)
5301 powerpc-linux-gnu
5302# elif defined(__s390x__)
5303 s390x-linux-gnu
5304# elif defined(__s390__)
5305 s390-linux-gnu
5306# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5307 sh4-linux-gnu
5308# elif defined(__sparc__) && defined(__arch64__)
5309 sparc64-linux-gnu
5310# elif defined(__sparc__)
5311 sparc-linux-gnu
5312# else
5313# error unknown platform triplet
5314# endif
5315#elif defined(__FreeBSD_kernel__)
5316# if defined(__LP64__)
5317 x86_64-kfreebsd-gnu
5318# elif defined(__i386__)
5319 i386-kfreebsd-gnu
5320# else
5321# error unknown platform triplet
5322# endif
5323#elif defined(__gnu_hurd__)
5324 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005325#elif defined(__APPLE__)
5326 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327#else
5328# error unknown platform triplet
5329#endif
5330
5331EOF
5332
5333if $CPP conftest.c >conftest.out 2>/dev/null; then
5334 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5336$as_echo "$PLATFORM_TRIPLET" >&6; }
5337else
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5339$as_echo "none" >&6; }
5340fi
5341rm -f conftest.c conftest.out
5342
5343if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5344 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5345 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5346 fi
5347fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005348if test x$PLATFORM_TRIPLET = x; then
5349 PLATDIR=plat-$MACHDEP
5350else
5351 PLATDIR=plat-$PLATFORM_TRIPLET
5352fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005353
5354
doko@ubuntu.com55532312016-06-14 08:55:19 +02005355if test x$MULTIARCH != x; then
5356 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5357fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005358
5359
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5361$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5362save_LDFLAGS="$LDFLAGS"
5363LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005364
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5366/* end confdefs.h. */
5367
5368int
5369main ()
5370{
5371
5372 ;
5373 return 0;
5374}
5375_ACEOF
5376if ac_fn_c_try_link "$LINENO"; then :
5377 NO_AS_NEEDED="-Wl,--no-as-needed"
5378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5379$as_echo "yes" >&6; }
5380else
5381 NO_AS_NEEDED=""
5382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
5384fi
5385rm -f core conftest.err conftest.$ac_objext \
5386 conftest$ac_exeext conftest.$ac_ext
5387LDFLAGS="$save_LDFLAGS"
5388
5389
5390
5391# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392
Matthias Kloseb9621712010-04-24 17:59:49 +00005393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5394$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005395if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397else
5398 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5399 then ac_cv_path_EGREP="$GREP -E"
5400 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 # Loop through the user's path and test for each of PROGNAME-LIST
5404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5406do
5407 IFS=$as_save_IFS
5408 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 for ac_prog in egrep; do
5410 for ac_exec_ext in '' $ac_executable_extensions; do
5411 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005412 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005413# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 # Check for GNU $ac_path_EGREP
5415case `"$ac_path_EGREP" --version 2>&1` in
5416*GNU*)
5417 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5418*)
5419 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421 while :
5422 do
5423 cat "conftest.in" "conftest.in" >"conftest.tmp"
5424 mv "conftest.tmp" "conftest.in"
5425 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005426 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5428 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005430 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5431 # Best one so far, save it but keep looking for a better one
5432 ac_cv_path_EGREP="$ac_path_EGREP"
5433 ac_path_EGREP_max=$ac_count
5434 fi
5435 # 10*(2^10) chars as input seems more than enough
5436 test $ac_count -gt 10 && break
5437 done
5438 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5439esac
5440
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 $ac_path_EGREP_found && break 3
5442 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005447 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 +00005448 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005449else
5450 ac_cv_path_EGREP=$EGREP
5451fi
5452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453 fi
5454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5456$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005458
5459
Matthias Kloseb9621712010-04-24 17:59:49 +00005460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5461$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005462if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005463 $as_echo_n "(cached) " >&6
5464else
5465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005466/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005467#include <stdlib.h>
5468#include <stdarg.h>
5469#include <string.h>
5470#include <float.h>
5471
5472int
5473main ()
5474{
5475
5476 ;
5477 return 0;
5478}
5479_ACEOF
5480if ac_fn_c_try_compile "$LINENO"; then :
5481 ac_cv_header_stdc=yes
5482else
5483 ac_cv_header_stdc=no
5484fi
5485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5486
5487if test $ac_cv_header_stdc = yes; then
5488 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5490/* end confdefs.h. */
5491#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005492
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005493_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005495 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005497else
Matthias Kloseb9621712010-04-24 17:59:49 +00005498 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005499fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005500rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501
Matthias Kloseb9621712010-04-24 17:59:49 +00005502fi
5503
5504if test $ac_cv_header_stdc = yes; then
5505 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5507/* end confdefs.h. */
5508#include <stdlib.h>
5509
5510_ACEOF
5511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5512 $EGREP "free" >/dev/null 2>&1; then :
5513
5514else
5515 ac_cv_header_stdc=no
5516fi
5517rm -f conftest*
5518
5519fi
5520
5521if test $ac_cv_header_stdc = yes; then
5522 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5523 if test "$cross_compiling" = yes; then :
5524 :
5525else
5526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5527/* end confdefs.h. */
5528#include <ctype.h>
5529#include <stdlib.h>
5530#if ((' ' & 0x0FF) == 0x020)
5531# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5532# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5533#else
5534# define ISLOWER(c) \
5535 (('a' <= (c) && (c) <= 'i') \
5536 || ('j' <= (c) && (c) <= 'r') \
5537 || ('s' <= (c) && (c) <= 'z'))
5538# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5539#endif
5540
5541#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5542int
5543main ()
5544{
5545 int i;
5546 for (i = 0; i < 256; i++)
5547 if (XOR (islower (i), ISLOWER (i))
5548 || toupper (i) != TOUPPER (i))
5549 return 2;
5550 return 0;
5551}
5552_ACEOF
5553if ac_fn_c_try_run "$LINENO"; then :
5554
5555else
5556 ac_cv_header_stdc=no
5557fi
5558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5559 conftest.$ac_objext conftest.beam conftest.$ac_ext
5560fi
5561
5562fi
5563fi
5564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5565$as_echo "$ac_cv_header_stdc" >&6; }
5566if test $ac_cv_header_stdc = yes; then
5567
5568$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5569
5570fi
5571
5572# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5573for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5574 inttypes.h stdint.h unistd.h
5575do :
5576 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5577ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5578"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005579if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005580 cat >>confdefs.h <<_ACEOF
5581#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5582_ACEOF
5583
5584fi
5585
5586done
5587
5588
5589
5590 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 +02005591if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005592 MINIX=yes
5593else
5594 MINIX=
5595fi
5596
5597
5598 if test "$MINIX" = yes; then
5599
5600$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5601
5602
5603$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5604
5605
5606$as_echo "#define _MINIX 1" >>confdefs.h
5607
5608 fi
5609
5610
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5612$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005613if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005614 $as_echo_n "(cached) " >&6
5615else
5616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5617/* end confdefs.h. */
5618
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005619# define __EXTENSIONS__ 1
5620 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005621int
5622main ()
5623{
5624
5625 ;
5626 return 0;
5627}
5628_ACEOF
5629if ac_fn_c_try_compile "$LINENO"; then :
5630 ac_cv_safe_to_define___extensions__=yes
5631else
5632 ac_cv_safe_to_define___extensions__=no
5633fi
5634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5635fi
5636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5637$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5638 test $ac_cv_safe_to_define___extensions__ = yes &&
5639 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5640
5641 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5642
5643 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5644
5645 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5646
5647 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5648
5649
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650
Xavier de Gaye95750b12016-07-09 11:05:42 +02005651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5652$as_echo_n "checking for the Android API level... " >&6; }
5653cat >> conftest.c <<EOF
5654#ifdef __ANDROID__
5655#include <android/api-level.h>
5656__ANDROID_API__
5657#else
5658#error not Android
5659#endif
5660EOF
5661
5662if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5663 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5665$as_echo "$ANDROID_API_LEVEL" >&6; }
5666
5667cat >>confdefs.h <<_ACEOF
5668#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5669_ACEOF
5670
5671else
5672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5673$as_echo "not Android" >&6; }
5674fi
5675rm -f conftest.c conftest.out
5676
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677# Check for unsupported systems
5678case $ac_sys_system/$ac_sys_release in
5679atheos*|Linux*/1*)
5680 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5681 echo See README for details.
5682 exit 1;;
5683esac
5684
5685
Matthias Kloseb9621712010-04-24 17:59:49 +00005686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5687$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688
5689# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005690if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691 withval=$with_suffix;
5692 case $withval in
5693 no) EXEEXT=;;
5694 yes) EXEEXT=.exe;;
5695 *) EXEEXT=$withval;;
5696 esac
5697fi
5698
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5700$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
5702# Test whether we're running on a non-case-sensitive system, in which
5703# case we give a warning if no ext is given
5704
Matthias Kloseb9621712010-04-24 17:59:49 +00005705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5706$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707if test ! -d CaseSensitiveTestDir; then
5708mkdir CaseSensitiveTestDir
5709fi
5710
5711if test -d casesensitivetestdir
5712then
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5714$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715 BUILDEXEEXT=.exe
5716else
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5718$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719 BUILDEXEEXT=$EXEEXT
5720fi
5721rmdir CaseSensitiveTestDir
5722
5723case $MACHDEP in
5724bsdos*)
5725 case $CC in
5726 gcc) CC="$CC -D_HAVE_BSDI";;
5727 esac;;
5728esac
5729
5730case $ac_sys_system in
5731hp*|HP*)
5732 case $CC in
5733 cc|*/cc) CC="$CC -Ae";;
5734 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735esac
5736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5739$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740if test -z "$LIBRARY"
5741then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005742 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5745$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
5747# LDLIBRARY is the name of the library to link against (as opposed to the
5748# name of the library into which to insert object files). BLDLIBRARY is also
5749# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5750# is blank as the main program is not linked directly against LDLIBRARY.
5751# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5752# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5753# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5754# DLLLIBRARY is the shared (i.e., DLL) library.
5755#
5756# RUNSHARED is used to run shared python without installed libraries
5757#
5758# INSTSONAME is the name of the shared library that will be use to install
5759# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005760#
5761# LDVERSION is the shared library version number, normally the Python version
5762# with the ABI build flags appended.
5763
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764
5765
5766
5767
5768
5769
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005770
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771LDLIBRARY="$LIBRARY"
5772BLDLIBRARY='$(LDLIBRARY)'
5773INSTSONAME='$(LDLIBRARY)'
5774DLLLIBRARY=''
5775LDLIBRARYDIR=''
5776RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005777LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778
5779# LINKCC is the command that links the python executable -- default is $(CC).
5780# If CXX is set, and if it is needed to link a main function that was
5781# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5782# python might then depend on the C++ runtime
5783# This is altered for AIX in order to build the export list before
5784# linking.
5785
Matthias Kloseb9621712010-04-24 17:59:49 +00005786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5787$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788if test -z "$LINKCC"
5789then
5790 LINKCC='$(PURIFY) $(MAINCC)'
5791 case $ac_sys_system in
5792 AIX*)
5793 exp_extra="\"\""
5794 if test $ac_sys_release -ge 5 -o \
5795 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5796 exp_extra="."
5797 fi
5798 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799 QNX*)
5800 # qcc must be used because the other compilers do not
5801 # support -N.
5802 LINKCC=qcc;;
5803 esac
5804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5806$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807
5808# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5809# make sure we default having it set to "no": this is used by
5810# distutils.unixccompiler to know if it should add --enable-new-dtags
5811# to linker command lines, and failing to detect GNU ld simply results
5812# in the same bahaviour as before.
5813
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5815$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816ac_prog=ld
5817if test "$GCC" = yes; then
5818 ac_prog=`$CC -print-prog-name=ld`
5819fi
5820case `"$ac_prog" -V 2>&1 < /dev/null` in
5821 *GNU*)
5822 GNULD=yes;;
5823 *)
5824 GNULD=no;;
5825esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5827$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5830$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005831if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005832 $as_echo_n "(cached) " >&6
5833else
5834 ac_cv_c_inline=no
5835for ac_kw in inline __inline__ __inline; do
5836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5837/* end confdefs.h. */
5838#ifndef __cplusplus
5839typedef int foo_t;
5840static $ac_kw foo_t static_foo () {return 0; }
5841$ac_kw foo_t foo () {return 0; }
5842#endif
5843
5844_ACEOF
5845if ac_fn_c_try_compile "$LINENO"; then :
5846 ac_cv_c_inline=$ac_kw
5847fi
5848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5849 test "$ac_cv_c_inline" != no && break
5850done
5851
5852fi
5853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5854$as_echo "$ac_cv_c_inline" >&6; }
5855
5856case $ac_cv_c_inline in
5857 inline | yes) ;;
5858 *)
5859 case $ac_cv_c_inline in
5860 no) ac_val=;;
5861 *) ac_val=$ac_cv_c_inline;;
5862 esac
5863 cat >>confdefs.h <<_ACEOF
5864#ifndef __cplusplus
5865#define inline $ac_val
5866#endif
5867_ACEOF
5868 ;;
5869esac
5870
5871if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005872
5873$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005874
5875
5876fi
5877
5878
Matthias Kloseb9621712010-04-24 17:59:49 +00005879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5880$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005882if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883 enableval=$enable_shared;
5884fi
5885
5886
5887if test -z "$enable_shared"
5888then
5889 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005890 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 enable_shared="yes";;
5892 *)
5893 enable_shared="no";;
5894 esac
5895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5897$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898
Matthias Kloseb9621712010-04-24 17:59:49 +00005899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5900$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005902if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005903 enableval=$enable_profiling;
5904fi
5905
5906if test "x$enable_profiling" = xyes; then
5907 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005908 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910/* end confdefs.h. */
5911int main() { return 0; }
5912_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005913if ac_fn_c_try_link "$LINENO"; then :
5914
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005916 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005918rm -f core conftest.err conftest.$ac_objext \
5919 conftest$ac_exeext conftest.$ac_ext
5920 CC="$ac_save_cc"
5921else
5922 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5925$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
doko@ubuntu.comba015832012-06-30 16:52:05 +02005927if test "x$enable_profiling" = xyes; then
5928 BASECFLAGS="-pg $BASECFLAGS"
5929 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930fi
5931
Matthias Kloseb9621712010-04-24 17:59:49 +00005932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5933$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934
5935# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5936# library that we build, but we do not want to link against it (we
5937# will find it with a -framework option). For this reason there is an
5938# extra variable BLDLIBRARY against which Python and the extension
5939# modules are linked, BLDLIBRARY. This is normally the same as
5940# LDLIBRARY, but empty for MacOSX framework builds.
5941if test "$enable_framework"
5942then
5943 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005944 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 BLDLIBRARY=''
5946else
5947 BLDLIBRARY='$(LDLIBRARY)'
5948fi
5949
5950# Other platforms follow
5951if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005952 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953
Matthias Kloseb9621712010-04-24 17:59:49 +00005954$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955
5956 case $ac_sys_system in
5957 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 LDLIBRARY='libpython$(LDVERSION).dll.a'
5959 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 ;;
5961 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).so'
5963 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005964 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005966 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005967 then
5968 PY3LIBRARY=libpython3.so
5969 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005971 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005972 LDLIBRARY='libpython$(LDVERSION).so'
5973 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005974 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005976 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005977 then
5978 PY3LIBRARY=libpython3.so
5979 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980 ;;
5981 hp*|HP*)
5982 case `uname -m` in
5983 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005984 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985 ;;
5986 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005987 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 ;;
5989 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005990 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005991 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005994 LDLIBRARY='libpython$(LDVERSION).dylib'
5995 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005996 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005998 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005999 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006000 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006001 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002
6003 esac
6004else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006005 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006 case $ac_sys_system in
6007 CYGWIN*)
6008 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006009 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010 ;;
6011 esac
6012fi
6013
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006014if test "$cross_compiling" = yes; then
6015 RUNSHARED=
6016fi
6017
Matthias Kloseb9621712010-04-24 17:59:49 +00006018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6019$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020
6021if test -n "$ac_tool_prefix"; then
6022 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6023set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6025$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006026if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028else
6029 if test -n "$RANLIB"; then
6030 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6031else
6032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6033for as_dir in $PATH
6034do
6035 IFS=$as_save_IFS
6036 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006038 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041 break 2
6042 fi
6043done
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045IFS=$as_save_IFS
6046
6047fi
6048fi
6049RANLIB=$ac_cv_prog_RANLIB
6050if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6052$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053else
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6055$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056fi
6057
6058
6059fi
6060if test -z "$ac_cv_prog_RANLIB"; then
6061 ac_ct_RANLIB=$RANLIB
6062 # Extract the first word of "ranlib", so it can be a program name with args.
6063set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6065$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006066if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006067 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068else
6069 if test -n "$ac_ct_RANLIB"; then
6070 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6071else
6072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6073for as_dir in $PATH
6074do
6075 IFS=$as_save_IFS
6076 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006077 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081 break 2
6082 fi
6083done
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085IFS=$as_save_IFS
6086
6087fi
6088fi
6089ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6090if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6092$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093else
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096fi
6097
6098 if test "x$ac_ct_RANLIB" = x; then
6099 RANLIB=":"
6100 else
6101 case $cross_compiling:$ac_tool_warned in
6102yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006103{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6104$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105ac_tool_warned=yes ;;
6106esac
6107 RANLIB=$ac_ct_RANLIB
6108 fi
6109else
6110 RANLIB="$ac_cv_prog_RANLIB"
6111fi
6112
6113
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006114if test -n "$ac_tool_prefix"; then
6115 for ac_prog in ar aal
6116 do
6117 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6118set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6120$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006121if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006122 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006123else
6124 if test -n "$AR"; then
6125 ac_cv_prog_AR="$AR" # Let the user override the test.
6126else
6127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6128for as_dir in $PATH
6129do
6130 IFS=$as_save_IFS
6131 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006132 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006133 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006134 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136 break 2
6137 fi
6138done
Matthias Kloseb9621712010-04-24 17:59:49 +00006139 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006140IFS=$as_save_IFS
6141
6142fi
6143fi
6144AR=$ac_cv_prog_AR
6145if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6147$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148else
Matthias Kloseb9621712010-04-24 17:59:49 +00006149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6150$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006151fi
6152
6153
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006154 test -n "$AR" && break
6155 done
6156fi
6157if test -z "$AR"; then
6158 ac_ct_AR=$AR
6159 for ac_prog in ar aal
6160do
6161 # Extract the first word of "$ac_prog", so it can be a program name with args.
6162set dummy $ac_prog; ac_word=$2
6163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6164$as_echo_n "checking for $ac_word... " >&6; }
6165if ${ac_cv_prog_ac_ct_AR+:} false; then :
6166 $as_echo_n "(cached) " >&6
6167else
6168 if test -n "$ac_ct_AR"; then
6169 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6170else
6171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6172for as_dir in $PATH
6173do
6174 IFS=$as_save_IFS
6175 test -z "$as_dir" && as_dir=.
6176 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006177 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006178 ac_cv_prog_ac_ct_AR="$ac_prog"
6179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6180 break 2
6181 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006183 done
6184IFS=$as_save_IFS
6185
6186fi
6187fi
6188ac_ct_AR=$ac_cv_prog_ac_ct_AR
6189if test -n "$ac_ct_AR"; then
6190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6191$as_echo "$ac_ct_AR" >&6; }
6192else
6193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6194$as_echo "no" >&6; }
6195fi
6196
6197
6198 test -n "$ac_ct_AR" && break
6199done
6200
6201 if test "x$ac_ct_AR" = x; then
6202 AR="ar"
6203 else
6204 case $cross_compiling:$ac_tool_warned in
6205yes:)
6206{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6207$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6208ac_tool_warned=yes ;;
6209esac
6210 AR=$ac_ct_AR
6211 fi
6212fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006213
6214
6215# tweak ARFLAGS only if the user didn't set it on the command line
6216
6217if test -z "$ARFLAGS"
6218then
6219 ARFLAGS="rc"
6220fi
6221
doko@ubuntu.com58844492012-06-30 18:25:32 +02006222if test -n "$ac_tool_prefix"; then
6223 for ac_prog in readelf
6224 do
6225 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6226set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6228$as_echo_n "checking for $ac_word... " >&6; }
6229if ${ac_cv_prog_READELF+:} false; then :
6230 $as_echo_n "(cached) " >&6
6231else
6232 if test -n "$READELF"; then
6233 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6234else
6235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6236for as_dir in $PATH
6237do
6238 IFS=$as_save_IFS
6239 test -z "$as_dir" && as_dir=.
6240 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006241 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006242 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6243 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6244 break 2
6245 fi
6246done
6247 done
6248IFS=$as_save_IFS
6249
6250fi
6251fi
6252READELF=$ac_cv_prog_READELF
6253if test -n "$READELF"; then
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6255$as_echo "$READELF" >&6; }
6256else
6257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6258$as_echo "no" >&6; }
6259fi
6260
6261
6262 test -n "$READELF" && break
6263 done
6264fi
6265if test -z "$READELF"; then
6266 ac_ct_READELF=$READELF
6267 for ac_prog in readelf
6268do
6269 # Extract the first word of "$ac_prog", so it can be a program name with args.
6270set dummy $ac_prog; ac_word=$2
6271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6272$as_echo_n "checking for $ac_word... " >&6; }
6273if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6274 $as_echo_n "(cached) " >&6
6275else
6276 if test -n "$ac_ct_READELF"; then
6277 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6278else
6279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280for as_dir in $PATH
6281do
6282 IFS=$as_save_IFS
6283 test -z "$as_dir" && as_dir=.
6284 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006285 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006286 ac_cv_prog_ac_ct_READELF="$ac_prog"
6287 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6288 break 2
6289 fi
6290done
6291 done
6292IFS=$as_save_IFS
6293
6294fi
6295fi
6296ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6297if test -n "$ac_ct_READELF"; then
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6299$as_echo "$ac_ct_READELF" >&6; }
6300else
6301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6302$as_echo "no" >&6; }
6303fi
6304
6305
6306 test -n "$ac_ct_READELF" && break
6307done
6308
6309 if test "x$ac_ct_READELF" = x; then
6310 READELF=":"
6311 else
6312 case $cross_compiling:$ac_tool_warned in
6313yes:)
6314{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6315$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6316ac_tool_warned=yes ;;
6317esac
6318 READELF=$ac_ct_READELF
6319 fi
6320fi
6321
6322if test "$cross_compiling" = yes; then
6323 case "$READELF" in
6324 readelf|:)
6325 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6326 ;;
6327 esac
6328fi
6329
6330
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331
Matthias Klosec4c48422012-10-21 23:05:35 +02006332for ac_prog in python$PACKAGE_VERSION python3 python
6333do
6334 # Extract the first word of "$ac_prog", so it can be a program name with args.
6335set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6337$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006338if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006339 $as_echo_n "(cached) " >&6
6340else
Matthias Klosec4c48422012-10-21 23:05:35 +02006341 if test -n "$PYTHON"; then
6342 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006343else
6344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6345for as_dir in $PATH
6346do
6347 IFS=$as_save_IFS
6348 test -z "$as_dir" && as_dir=.
6349 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006350 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006351 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6353 break 2
6354 fi
6355done
6356 done
6357IFS=$as_save_IFS
6358
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006359fi
6360fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006361PYTHON=$ac_cv_prog_PYTHON
6362if test -n "$PYTHON"; then
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6364$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006365else
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6367$as_echo "no" >&6; }
6368fi
6369
6370
Matthias Klosec4c48422012-10-21 23:05:35 +02006371 test -n "$PYTHON" && break
6372done
6373test -n "$PYTHON" || PYTHON="not-found"
6374
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006375if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006376 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6377else
6378 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006379fi
6380
6381
Kushal Das02d23a22014-04-15 23:50:06 +05306382for ac_prog in python$PACKAGE_VERSION python3 python
6383do
6384 # Extract the first word of "$ac_prog", so it can be a program name with args.
6385set dummy $ac_prog; ac_word=$2
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6387$as_echo_n "checking for $ac_word... " >&6; }
6388if ${ac_cv_prog_PYTHON+:} false; then :
6389 $as_echo_n "(cached) " >&6
6390else
6391 if test -n "$PYTHON"; then
6392 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6393else
6394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395for as_dir in $PATH
6396do
6397 IFS=$as_save_IFS
6398 test -z "$as_dir" && as_dir=.
6399 for ac_exec_ext in '' $ac_executable_extensions; do
6400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6401 ac_cv_prog_PYTHON="$ac_prog"
6402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6403 break 2
6404 fi
6405done
6406 done
6407IFS=$as_save_IFS
6408
6409fi
6410fi
6411PYTHON=$ac_cv_prog_PYTHON
6412if test -n "$PYTHON"; then
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6414$as_echo "$PYTHON" >&6; }
6415else
6416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417$as_echo "no" >&6; }
6418fi
6419
6420
6421 test -n "$PYTHON" && break
6422done
6423test -n "$PYTHON" || PYTHON="not-found"
6424
6425if test "$PYTHON" = not-found; then
6426 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6427else
6428 OPCODEHGEN="$PYTHON"
6429fi
6430
6431
6432
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433case $MACHDEP in
6434bsdos*|hp*|HP*)
6435 # install -d does not work on BSDI or HP-UX
6436 if test -z "$INSTALL"
6437 then
6438 INSTALL="${srcdir}/install-sh -c"
6439 fi
6440esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441# Find a good install program. We prefer a C program (faster),
6442# so one script is as good as another. But avoid the broken or
6443# incompatible versions:
6444# SysV /etc/install, /usr/sbin/install
6445# SunOS /usr/etc/install
6446# IRIX /sbin/install
6447# AIX /bin/install
6448# AmigaOS /C/install, which installs bootblocks on floppy discs
6449# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6450# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6451# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6452# OS/2's system install, which has a completely different semantic
6453# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006454# Reject install programs that cannot install multiple files.
6455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6456$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006457if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006458if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006459 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006460else
6461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6462for as_dir in $PATH
6463do
6464 IFS=$as_save_IFS
6465 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006466 # Account for people who put trailing slashes in PATH elements.
6467case $as_dir/ in #((
6468 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006469 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006470 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006471 /usr/ucb/* ) ;;
6472 *)
6473 # OSF1 and SCO ODT 3.0 have their own names for install.
6474 # Don't use installbsd from OSF since it installs stuff as root
6475 # by default.
6476 for ac_prog in ginstall scoinst install; do
6477 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006478 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006479 if test $ac_prog = install &&
6480 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6481 # AIX install. It has an incompatible calling convention.
6482 :
6483 elif test $ac_prog = install &&
6484 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6485 # program-specific install script used by HP pwplus--don't use.
6486 :
6487 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006488 rm -rf conftest.one conftest.two conftest.dir
6489 echo one > conftest.one
6490 echo two > conftest.two
6491 mkdir conftest.dir
6492 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6493 test -s conftest.one && test -s conftest.two &&
6494 test -s conftest.dir/conftest.one &&
6495 test -s conftest.dir/conftest.two
6496 then
6497 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6498 break 3
6499 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006500 fi
6501 fi
6502 done
6503 done
6504 ;;
6505esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006506
6507 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006508IFS=$as_save_IFS
6509
Matthias Kloseb9621712010-04-24 17:59:49 +00006510rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511
6512fi
6513 if test "${ac_cv_path_install+set}" = set; then
6514 INSTALL=$ac_cv_path_install
6515 else
6516 # As a last resort, use the slow shell script. Don't cache a
6517 # value for INSTALL within a source directory, because that will
6518 # break other packages using the cache if that directory is
6519 # removed, or if the value is a relative name.
6520 INSTALL=$ac_install_sh
6521 fi
6522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6524$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006525
6526# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6527# It thinks the first close brace ends the variable substitution.
6528test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6529
6530test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6531
6532test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6533
Matthias Klose93a0ef12012-03-15 18:08:34 +01006534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6535$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6536if test -z "$MKDIR_P"; then
6537 if ${ac_cv_path_mkdir+:} false; then :
6538 $as_echo_n "(cached) " >&6
6539else
6540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6542do
6543 IFS=$as_save_IFS
6544 test -z "$as_dir" && as_dir=.
6545 for ac_prog in mkdir gmkdir; do
6546 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006547 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006548 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6549 'mkdir (GNU coreutils) '* | \
6550 'mkdir (coreutils) '* | \
6551 'mkdir (fileutils) '4.1*)
6552 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6553 break 3;;
6554 esac
6555 done
6556 done
6557 done
6558IFS=$as_save_IFS
6559
6560fi
6561
6562 test -d ./--version && rmdir ./--version
6563 if test "${ac_cv_path_mkdir+set}" = set; then
6564 MKDIR_P="$ac_cv_path_mkdir -p"
6565 else
6566 # As a last resort, use the slow shell script. Don't cache a
6567 # value for MKDIR_P within a source directory, because that will
6568 # break other packages using the cache if that directory is
6569 # removed, or if the value is a relative name.
6570 MKDIR_P="$ac_install_sh -d"
6571 fi
6572fi
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6574$as_echo "$MKDIR_P" >&6; }
6575
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006576
6577# Not every filesystem supports hard links
6578
6579if test -z "$LN" ; then
6580 case $ac_sys_system in
6581 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006582 *) LN=ln;;
6583 esac
6584fi
6585
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006586# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006587
6588ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006590# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6592$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006593
6594# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006595if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006596 withval=$with_pydebug;
6597if test "$withval" != no
6598then
6599
Matthias Kloseb9621712010-04-24 17:59:49 +00006600$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006601
Matthias Kloseb9621712010-04-24 17:59:49 +00006602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6603$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006604 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006605 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006606else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006608fi
6609else
Matthias Kloseb9621712010-04-24 17:59:49 +00006610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6611$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006612fi
6613
6614
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006615# Enable LTO flags
6616
6617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6618$as_echo_n "checking for --with-lto... " >&6; }
6619
6620# Check whether --with-lto was given.
6621if test "${with_lto+set}" = set; then :
6622 withval=$with_lto;
6623if test "$withval" != no
6624then
6625 Py_LTO='true'
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6627$as_echo "yes" >&6; };
6628else
6629 Py_LTO='false'
6630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6631$as_echo "no" >&6; };
6632fi
6633else
6634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6635$as_echo "no" >&6; }
6636fi
6637
6638if test "$Py_LTO" = 'true' ; then
6639 case $CC in
6640 *clang*)
6641 # Any changes made here should be reflected in the GCC+Darwin case below
6642 LTOFLAGS="-flto"
6643 ;;
6644 *gcc*)
6645 case $ac_sys_system in
6646 Darwin*)
6647 LTOFLAGS="-flto"
6648 ;;
6649 *)
6650 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6651 ;;
6652 esac
6653 ;;
6654 esac
6655fi
6656
Brett Cannon7188a3e2015-09-18 15:13:44 -07006657# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006658
6659
6660
6661
6662
6663
Brett Cannon7188a3e2015-09-18 15:13:44 -07006664# Extract the first word of "llvm-profdata", so it can be a program name with args.
6665set dummy llvm-profdata; ac_word=$2
6666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6667$as_echo_n "checking for $ac_word... " >&6; }
6668if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6669 $as_echo_n "(cached) " >&6
6670else
6671 if test -n "$LLVM_PROF_FOUND"; then
6672 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6673else
6674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6675for as_dir in $PATH
6676do
6677 IFS=$as_save_IFS
6678 test -z "$as_dir" && as_dir=.
6679 for ac_exec_ext in '' $ac_executable_extensions; do
6680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6681 ac_cv_prog_LLVM_PROF_FOUND="found"
6682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6683 break 2
6684 fi
6685done
6686 done
6687IFS=$as_save_IFS
6688
6689 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6690fi
6691fi
6692LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6693if test -n "$LLVM_PROF_FOUND"; then
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6695$as_echo "$LLVM_PROF_FOUND" >&6; }
6696else
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6698$as_echo "no" >&6; }
6699fi
6700
6701
6702LLVM_PROF_ERR=no
6703case $CC in
6704 *clang*)
6705 # Any changes made here should be reflected in the GCC+Darwin case below
6706 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6707 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6708 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6709 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6710 if test $LLVM_PROF_FOUND = not-found
6711 then
6712 LLVM_PROF_ERR=yes
6713 fi
6714 ;;
6715 *gcc*)
6716 case $ac_sys_system in
6717 Darwin*)
6718 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6719 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6720 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6721 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6722 if test $LLVM_PROF_FOUND = not-found
6723 then
6724 LLVM_PROF_ERR=yes
6725 fi
6726 ;;
6727 *)
6728 PGO_PROF_GEN_FLAG="-fprofile-generate"
6729 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6730 LLVM_PROF_MERGER="true"
6731 LLVM_PROF_FILE=""
6732 ;;
6733 esac
6734 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006735 *icc*)
6736 PGO_PROF_GEN_FLAG="-prof-gen"
6737 PGO_PROF_USE_FLAG="-prof-use"
6738 LLVM_PROF_MERGER="true"
6739 LLVM_PROF_FILE=""
6740 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006741esac
6742
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6744# merged with this chunk of code?
6745
6746# Optimizer/debugger flags
6747# ------------------------
6748# (The following bit of code is complicated enough - please keep things
6749# indented properly. Just pretend you're editing Python code. ;-)
6750
6751# There are two parallel sets of case statements below, one that checks to
6752# see if OPT was set and one that does BASECFLAGS setting based upon
6753# compiler and platform. BASECFLAGS tweaks need to be made even if the
6754# user set OPT.
6755
6756# tweak OPT based on compiler and platform, only if the user didn't set
6757# it on the command line
6758
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006759if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760then
6761 case $GCC in
6762 yes)
6763 if test "$CC" != 'g++' ; then
6764 STRICT_PROTO="-Wstrict-prototypes"
6765 fi
6766 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6767 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6768 WRAP="-fwrapv"
6769 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006770
6771 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006772 case $CC in
6773 *clang*) WRAP="-fwrapv"
6774 ;;
6775 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006777 case $ac_cv_prog_cc_g in
6778 yes)
6779 if test "$Py_DEBUG" = 'true' ; then
6780 # Optimization messes up debuggers, so turn it off for
6781 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006782 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6783 OPT="-g -Og -Wall $STRICT_PROTO"
6784 else
6785 OPT="-g -O0 -Wall $STRICT_PROTO"
6786 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787 else
6788 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6789 fi
6790 ;;
6791 *)
6792 OPT="-O3 -Wall $STRICT_PROTO"
6793 ;;
6794 esac
6795 case $ac_sys_system in
6796 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6797 ;;
6798 esac
6799 ;;
6800
6801 *)
6802 OPT="-O"
6803 ;;
6804 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006805fi
6806
6807
6808
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006809
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810# The -arch flags for universal builds on OSX
6811UNIVERSAL_ARCH_FLAGS=
6812
6813
6814# tweak BASECFLAGS based on compiler and platform
6815case $GCC in
6816yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006817 # Python doesn't violate C99 aliasing rules, but older versions of
6818 # GCC produce warnings for legal Python code. Enable
6819 # -fno-strict-aliasing on versions of GCC that support but produce
6820 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6822$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823 ac_save_cc="$CC"
6824 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006825 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006826 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006828else
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006831
Matthias Kloseb159a552010-04-25 21:00:44 +00006832
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006833int
6834main ()
6835{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006836
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006837 ;
6838 return 0;
6839}
Matthias Kloseb159a552010-04-25 21:00:44 +00006840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006842if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006843
6844 CC="$ac_save_cc -fstrict-aliasing"
6845 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006847/* end confdefs.h. */
6848
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006849 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006850int
6851main ()
6852{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006853double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006854 ;
6855 return 0;
6856}
Matthias Kloseb159a552010-04-25 21:00:44 +00006857
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006859if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006860
6861 ac_cv_no_strict_aliasing=no
6862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863else
Matthias Kloseb159a552010-04-25 21:00:44 +00006864
6865 ac_cv_no_strict_aliasing=yes
6866
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006867fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006869
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006870else
Matthias Kloseb159a552010-04-25 21:00:44 +00006871
6872 ac_cv_no_strict_aliasing=no
6873
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006876fi
6877
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006878 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6881$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006882 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006883 then
6884 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6885 fi
6886
Zachary Ware5af85642015-12-21 12:09:17 -06006887 # ICC doesn't recognize the option, but only emits a warning
6888 ## XXX does it emit an unused result warning and can it be disabled?
6889 case "$CC" in
6890 *icc*)
6891 ac_cv_disable_unused_result_warning=no
6892 ;;
6893 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6895$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6896 ac_save_cc="$CC"
6897 CC="$CC -Wunused-result -Werror"
6898 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006899 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006900 $as_echo_n "(cached) " >&6
6901else
6902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6903/* end confdefs.h. */
6904
6905
6906int
6907main ()
6908{
6909
6910 ;
6911 return 0;
6912}
6913
6914_ACEOF
6915if ac_fn_c_try_compile "$LINENO"; then :
6916
6917 ac_cv_disable_unused_result_warning=yes
6918
6919else
6920
6921 ac_cv_disable_unused_result_warning=no
6922
6923fi
6924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6925fi
6926
6927 CFLAGS="$save_CFLAGS"
6928 CC="$ac_save_cc"
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6930$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006931 ;;
6932 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006933
6934 if test $ac_cv_disable_unused_result_warning = yes
6935 then
6936 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6937 fi
6938
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6940$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6941 ac_save_cc="$CC"
6942 CC="$CC -Werror=declaration-after-statement"
6943 save_CFLAGS="$CFLAGS"
6944 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6945 $as_echo_n "(cached) " >&6
6946else
6947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6948/* end confdefs.h. */
6949
6950
6951int
6952main ()
6953{
6954
6955 ;
6956 return 0;
6957}
6958
6959_ACEOF
6960if ac_fn_c_try_compile "$LINENO"; then :
6961
6962 ac_cv_declaration_after_statement_warning=yes
6963
6964else
6965
6966 ac_cv_declaration_after_statement_warning=no
6967
6968fi
6969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6970fi
6971
6972 CFLAGS="$save_CFLAGS"
6973 CC="$ac_save_cc"
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6975$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6976
6977 if test $ac_cv_declaration_after_statement_warning = yes
6978 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006979 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006980 fi
6981
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6983$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6984 ac_save_cc="$CC"
6985 CC="$CC -Wsign-compare"
6986 save_CFLAGS="$CFLAGS"
6987 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6988 $as_echo_n "(cached) " >&6
6989else
6990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6991/* end confdefs.h. */
6992
6993
6994int
6995main ()
6996{
6997
6998 ;
6999 return 0;
7000}
7001
7002_ACEOF
7003if ac_fn_c_try_compile "$LINENO"; then :
7004
7005 ac_cv_enable_sign_compare_warning=yes
7006
7007else
7008
7009 ac_cv_enable_sign_compare_warning=no
7010
7011fi
7012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7013fi
7014
7015 CFLAGS="$save_CFLAGS"
7016 CC="$ac_save_cc"
7017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7018$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7019
7020 if test $ac_cv_enable_sign_compare_warning = yes
7021 then
7022 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7023 fi
7024
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7026$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7027 ac_save_cc="$CC"
7028 CC="$CC -Wunreachable-code"
7029 save_CFLAGS="$CFLAGS"
7030 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7031 $as_echo_n "(cached) " >&6
7032else
7033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7034/* end confdefs.h. */
7035
7036
7037int
7038main ()
7039{
7040
7041 ;
7042 return 0;
7043}
7044
7045_ACEOF
7046if ac_fn_c_try_compile "$LINENO"; then :
7047
7048 ac_cv_enable_unreachable_code_warning=yes
7049
7050else
7051
7052 ac_cv_enable_unreachable_code_warning=no
7053
7054fi
7055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7056fi
7057
7058 CFLAGS="$save_CFLAGS"
7059 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007060
7061 # Don't enable unreachable code warning in debug mode, since it usually
7062 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007063 # Issue #24324: Unfortunately, the unreachable code warning does not work
7064 # correctly on gcc and has been silently removed from the compiler.
7065 # It is supported on clang but on OS X systems gcc may be an alias
7066 # for clang. Try to determine if the compiler is not really gcc and,
7067 # if so, only then enable the warning.
7068 if test $ac_cv_enable_unreachable_code_warning = yes && \
7069 test "$Py_DEBUG" != "true" && \
7070 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007071 then
7072 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007073 else
7074 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007075 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7077$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007078
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007079 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7080 # support. Without this, treatment of subnormals doesn't follow
7081 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007082 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007083 alpha*)
7084 BASECFLAGS="$BASECFLAGS -mieee"
7085 ;;
7086 esac
7087
7088 case $ac_sys_system in
7089 SCO_SV*)
7090 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7091 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007092
7093 # is there any other compiler on Darwin besides gcc?
7094 Darwin*)
7095 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7096 # used to be here, but non-Apple gcc doesn't accept them.
7097 if test "${CC}" = gcc
7098 then
7099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007100$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007101 case "${UNIVERSALSDK}" in
7102 */MacOSX10.4u.sdk)
7103 # Build using 10.4 SDK, force usage of gcc when the
7104 # compiler is gcc, otherwise the user will get very
7105 # confusing error messages when building on OSX 10.6
7106 CC=gcc-4.0
7107 CPP=cpp-4.0
7108 ;;
7109 esac
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007111$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007112 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007113
Ned Deily87adb6e2013-10-18 21:09:56 -07007114 if test "${enable_universalsdk}"
7115 then
7116 case "$UNIVERSAL_ARCHS" in
7117 32-bit)
7118 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7119 LIPO_32BIT_FLAGS=""
7120 ARCH_RUN_32BIT=""
7121 ;;
7122 64-bit)
7123 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7124 LIPO_32BIT_FLAGS=""
7125 ARCH_RUN_32BIT="true"
7126 ;;
7127 all)
7128 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7129 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7130 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7131 ;;
7132 intel)
7133 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7134 LIPO_32BIT_FLAGS="-extract i386"
7135 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7136 ;;
7137 intel-32)
7138 UNIVERSAL_ARCH_FLAGS="-arch i386"
7139 LIPO_32BIT_FLAGS=""
7140 ARCH_RUN_32BIT=""
7141 ;;
7142 3-way)
7143 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7144 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7145 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7146 ;;
7147 *)
7148 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7149 ;;
7150 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007151
Ned Deily87adb6e2013-10-18 21:09:56 -07007152 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7153 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7154 if test "${UNIVERSALSDK}" != "/"
7155 then
7156 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7157 fi
7158 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007159
Ned Deily87adb6e2013-10-18 21:09:56 -07007160 # Calculate an appropriate deployment target for this build:
7161 # The deployment target value is used explicitly to enable certain
7162 # features are enabled (such as builtin libedit support for readline)
7163 # through the use of Apple's Availabiliy Macros and is used as a
7164 # component of the string returned by distutils.get_platform().
7165 #
7166 # Use the value from:
7167 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7168 # 2. the operating system version of the build machine if >= 10.6
7169 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7170 # below to pick either 10.3, 10.4, or 10.5 as the target.
7171 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007172
Ned Deily87adb6e2013-10-18 21:09:56 -07007173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7174$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007175 cur_target_major=`sw_vers -productVersion | \
7176 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7177 cur_target_minor=`sw_vers -productVersion | \
7178 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7179 cur_target="${cur_target_major}.${cur_target_minor}"
7180 if test ${cur_target_major} -eq 10 && \
7181 test ${cur_target_minor} -ge 3 && \
7182 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007183 then
Ned Deily36820b62014-06-25 13:44:22 -07007184 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007185 cur_target=10.3
7186 if test ${enable_universalsdk}
7187 then
7188 case "$UNIVERSAL_ARCHS" in
7189 all|3-way|intel|64-bit)
7190 # These configurations were first supported in 10.5
7191 cur_target='10.5'
7192 ;;
7193 esac
7194 else
7195 if test `/usr/bin/arch` = "i386"
7196 then
7197 # 10.4 was the first release to support Intel archs
7198 cur_target="10.4"
7199 fi
7200 fi
7201 fi
7202 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007203
Ned Deily87adb6e2013-10-18 21:09:56 -07007204 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7205 # environment with a value that is the same as what we'll use
7206 # in the Makefile to ensure that we'll get the same compiler
7207 # environment during configure and build time.
7208 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7209 export MACOSX_DEPLOYMENT_TARGET
7210 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7212$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007213
Ned Deily87adb6e2013-10-18 21:09:56 -07007214 # end of Darwin* tests
7215 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007216 esac
7217 ;;
7218
7219*)
7220 case $ac_sys_system in
7221 OpenUNIX*|UnixWare*)
7222 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7223 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007224 SCO_SV*)
7225 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7226 ;;
7227 esac
7228 ;;
7229esac
7230
Zachary Ware5af85642015-12-21 12:09:17 -06007231# ICC needs -fp-model strict or floats behave badly
7232case "$CC" in
7233*icc*)
7234 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7235 ;;
7236esac
7237
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007238if test "$Py_DEBUG" = 'true'; then
7239 :
7240else
7241 OPT="-DNDEBUG $OPT"
7242fi
7243
7244if test "$ac_arch_flags"
7245then
7246 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7247fi
7248
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007249# On some compilers, pthreads are available without further options
7250# (e.g. MacOS X). On some of these systems, the compiler will not
7251# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7252# So we have to see first whether pthreads are available without
7253# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7255$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007256if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007257 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007258else
Matthias Kloseb9621712010-04-24 17:59:49 +00007259 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007260 ac_cv_pthread_is_default=no
7261else
Matthias Kloseb9621712010-04-24 17:59:49 +00007262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007263/* end confdefs.h. */
7264
Stefan Krah7dba5942012-11-22 22:49:11 +01007265#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266#include <pthread.h>
7267
7268void* routine(void* p){return NULL;}
7269
7270int main(){
7271 pthread_t p;
7272 if(pthread_create(&p,NULL,routine,NULL)!=0)
7273 return 1;
7274 (void)pthread_detach(p);
7275 return 0;
7276}
7277
7278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007279if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007280
7281 ac_cv_pthread_is_default=yes
7282 ac_cv_kthread=no
7283 ac_cv_pthread=no
7284
7285else
Matthias Kloseb9621712010-04-24 17:59:49 +00007286 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7289 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290fi
7291
7292
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007293fi
7294
Matthias Kloseb9621712010-04-24 17:59:49 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7296$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007297
7298
7299if test $ac_cv_pthread_is_default = yes
7300then
7301 ac_cv_kpthread=no
7302else
7303# -Kpthread, if available, provides the right #defines
7304# and linker options to make pthread_create available
7305# Some compilers won't report that they do not support -Kpthread,
7306# so we need to run a program to see whether it really made the
7307# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7309$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007310if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007311 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007312else
7313 ac_save_cc="$CC"
7314CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007315if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316 ac_cv_kpthread=no
7317else
Matthias Kloseb9621712010-04-24 17:59:49 +00007318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007319/* end confdefs.h. */
7320
Stefan Krah7dba5942012-11-22 22:49:11 +01007321#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007322#include <pthread.h>
7323
7324void* routine(void* p){return NULL;}
7325
7326int main(){
7327 pthread_t p;
7328 if(pthread_create(&p,NULL,routine,NULL)!=0)
7329 return 1;
7330 (void)pthread_detach(p);
7331 return 0;
7332}
7333
7334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007335if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336 ac_cv_kpthread=yes
7337else
Matthias Kloseb9621712010-04-24 17:59:49 +00007338 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7341 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342fi
7343
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344CC="$ac_save_cc"
7345fi
7346
Matthias Kloseb9621712010-04-24 17:59:49 +00007347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7348$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007349fi
7350
7351if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7352then
7353# -Kthread, if available, provides the right #defines
7354# and linker options to make pthread_create available
7355# Some compilers won't report that they do not support -Kthread,
7356# so we need to run a program to see whether it really made the
7357# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7359$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007360if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007362else
7363 ac_save_cc="$CC"
7364CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007365if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366 ac_cv_kthread=no
7367else
Matthias Kloseb9621712010-04-24 17:59:49 +00007368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007369/* end confdefs.h. */
7370
Stefan Krah7dba5942012-11-22 22:49:11 +01007371#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007372#include <pthread.h>
7373
7374void* routine(void* p){return NULL;}
7375
7376int main(){
7377 pthread_t p;
7378 if(pthread_create(&p,NULL,routine,NULL)!=0)
7379 return 1;
7380 (void)pthread_detach(p);
7381 return 0;
7382}
7383
7384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007385if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007386 ac_cv_kthread=yes
7387else
Matthias Kloseb9621712010-04-24 17:59:49 +00007388 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7391 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007392fi
7393
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394CC="$ac_save_cc"
7395fi
7396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7398$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399fi
7400
7401if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7402then
7403# -pthread, if available, provides the right #defines
7404# and linker options to make pthread_create available
7405# Some compilers won't report that they do not support -pthread,
7406# so we need to run a program to see whether it really made the
7407# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7409$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007410if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007411 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007412else
7413 ac_save_cc="$CC"
7414CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007415if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416 ac_cv_pthread=no
7417else
Matthias Kloseb9621712010-04-24 17:59:49 +00007418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419/* end confdefs.h. */
7420
Stefan Krah7dba5942012-11-22 22:49:11 +01007421#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422#include <pthread.h>
7423
7424void* routine(void* p){return NULL;}
7425
7426int main(){
7427 pthread_t p;
7428 if(pthread_create(&p,NULL,routine,NULL)!=0)
7429 return 1;
7430 (void)pthread_detach(p);
7431 return 0;
7432}
7433
7434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007435if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436 ac_cv_pthread=yes
7437else
Matthias Kloseb9621712010-04-24 17:59:49 +00007438 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7441 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442fi
7443
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444CC="$ac_save_cc"
7445fi
7446
Matthias Kloseb9621712010-04-24 17:59:49 +00007447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7448$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449fi
7450
7451# If we have set a CC compiler flag for thread support then
7452# check if it works for CXX, too.
7453ac_cv_cxx_thread=no
7454if test ! -z "$CXX"
7455then
Matthias Kloseb9621712010-04-24 17:59:49 +00007456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7457$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007458ac_save_cxx="$CXX"
7459
7460if test "$ac_cv_kpthread" = "yes"
7461then
7462 CXX="$CXX -Kpthread"
7463 ac_cv_cxx_thread=yes
7464elif test "$ac_cv_kthread" = "yes"
7465then
7466 CXX="$CXX -Kthread"
7467 ac_cv_cxx_thread=yes
7468elif test "$ac_cv_pthread" = "yes"
7469then
7470 CXX="$CXX -pthread"
7471 ac_cv_cxx_thread=yes
7472fi
7473
7474if test $ac_cv_cxx_thread = yes
7475then
7476 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7477 $CXX -c conftest.$ac_ext 2>&5
7478 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7479 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7480 then
7481 ac_cv_cxx_thread=yes
7482 else
7483 ac_cv_cxx_thread=no
7484 fi
7485 rm -fr conftest*
7486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7488$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489fi
7490CXX="$ac_save_cxx"
7491
7492
7493# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7495$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007496if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007497 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498else
Matthias Kloseb9621712010-04-24 17:59:49 +00007499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500/* end confdefs.h. */
7501#include <stdlib.h>
7502#include <stdarg.h>
7503#include <string.h>
7504#include <float.h>
7505
7506int
7507main ()
7508{
7509
7510 ;
7511 return 0;
7512}
7513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007514if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515 ac_cv_header_stdc=yes
7516else
Matthias Kloseb9621712010-04-24 17:59:49 +00007517 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7520
7521if test $ac_cv_header_stdc = yes; then
7522 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524/* end confdefs.h. */
7525#include <string.h>
7526
7527_ACEOF
7528if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 $EGREP "memchr" >/dev/null 2>&1; then :
7530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531else
7532 ac_cv_header_stdc=no
7533fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007534rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535
7536fi
7537
7538if test $ac_cv_header_stdc = yes; then
7539 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541/* end confdefs.h. */
7542#include <stdlib.h>
7543
7544_ACEOF
7545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007546 $EGREP "free" >/dev/null 2>&1; then :
7547
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548else
7549 ac_cv_header_stdc=no
7550fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007551rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552
7553fi
7554
7555if test $ac_cv_header_stdc = yes; then
7556 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558 :
7559else
Matthias Kloseb9621712010-04-24 17:59:49 +00007560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561/* end confdefs.h. */
7562#include <ctype.h>
7563#include <stdlib.h>
7564#if ((' ' & 0x0FF) == 0x020)
7565# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7566# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7567#else
7568# define ISLOWER(c) \
7569 (('a' <= (c) && (c) <= 'i') \
7570 || ('j' <= (c) && (c) <= 'r') \
7571 || ('s' <= (c) && (c) <= 'z'))
7572# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7573#endif
7574
7575#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7576int
7577main ()
7578{
7579 int i;
7580 for (i = 0; i < 256; i++)
7581 if (XOR (islower (i), ISLOWER (i))
7582 || toupper (i) != TOUPPER (i))
7583 return 2;
7584 return 0;
7585}
7586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007587if ac_fn_c_try_run "$LINENO"; then :
7588
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007589else
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7593 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594fi
7595
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596fi
7597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7599$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007600if test $ac_cv_header_stdc = yes; then
7601
Matthias Kloseb9621712010-04-24 17:59:49 +00007602$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603
7604fi
7605
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007606for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007607fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007608ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007609sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007610unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007611poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007612sys/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 +01007613sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007614sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007615sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007616sys/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 -07007617libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007618bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007619sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007620do :
7621 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7622ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007623if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007624 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007625#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007626_ACEOF
7627
7628fi
7629
Guido van Rossum627b2d71993-12-24 10:39:16 +00007630done
7631
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007632ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007633for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7636$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007637if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007638 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007639else
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007641/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007642#include <sys/types.h>
7643#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007644
Martin v. Löwis11437992002-04-12 09:54:03 +00007645int
7646main ()
7647{
7648if ((DIR *) 0)
7649return 0;
7650 ;
7651 return 0;
7652}
7653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007654if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007656else
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007661eval ac_res=\$$as_ac_Header
7662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7663$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007664if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007666#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007667_ACEOF
7668
7669ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007670fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007671
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007672done
7673# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7674if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7676$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007677if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007679else
Martin v. Löwis11437992002-04-12 09:54:03 +00007680 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007684/* Override any GCC internal prototype to avoid an error.
7685 Use char because int might match the return type of a GCC
7686 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007687#ifdef __cplusplus
7688extern "C"
7689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007690char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007691int
7692main ()
7693{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007694return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007695 ;
7696 return 0;
7697}
7698_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699for ac_lib in '' dir; do
7700 if test -z "$ac_lib"; then
7701 ac_res="none required"
7702 else
7703 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007704 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007707 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709rm -f core conftest.err conftest.$ac_objext \
7710 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007711 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007712 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714done
Victor Stinnere0be4232011-10-25 13:06:09 +02007715if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717else
7718 ac_cv_search_opendir=no
7719fi
7720rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007721LIBS=$ac_func_search_save_LIBS
7722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7724$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007726if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007728
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007729fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007730
Michael W. Hudson54241132001-12-07 15:38:26 +00007731else
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7733$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007734if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007736else
7737 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007741/* Override any GCC internal prototype to avoid an error.
7742 Use char because int might match the return type of a GCC
7743 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007744#ifdef __cplusplus
7745extern "C"
7746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007747char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007748int
7749main ()
7750{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 ;
7753 return 0;
7754}
7755_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756for ac_lib in '' x; do
7757 if test -z "$ac_lib"; then
7758 ac_res="none required"
7759 else
7760 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007761 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007764 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007766rm -f core conftest.err conftest.$ac_objext \
7767 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007768 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771done
Victor Stinnere0be4232011-10-25 13:06:09 +02007772if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774else
7775 ac_cv_search_opendir=no
7776fi
7777rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007778LIBS=$ac_func_search_save_LIBS
7779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7781$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007782ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007783if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007785
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007786fi
7787
7788fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007789
Matthias Kloseb9621712010-04-24 17:59:49 +00007790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7791$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007792if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007794else
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007796/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007797#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007798int
7799main ()
7800{
7801return makedev(0, 0);
7802 ;
7803 return 0;
7804}
7805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007806if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007807 ac_cv_header_sys_types_h_makedev=yes
7808else
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007811rm -f core conftest.err conftest.$ac_objext \
7812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007813
7814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7816$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007817
7818if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007819ac_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 +02007820if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007821
Matthias Kloseb9621712010-04-24 17:59:49 +00007822$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007823
7824fi
7825
7826
7827
7828 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 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 +02007830if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007831
Matthias Kloseb9621712010-04-24 17:59:49 +00007832$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007833
7834fi
7835
7836
7837 fi
7838fi
7839
Michael W. Hudson54241132001-12-07 15:38:26 +00007840
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007841# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7842for ac_header in net/if.h
7843do :
7844 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7845#ifdef STDC_HEADERS
7846# include <stdlib.h>
7847# include <stddef.h>
7848#else
7849# ifdef HAVE_STDLIB_H
7850# include <stdlib.h>
7851# endif
7852#endif
7853#ifdef HAVE_SYS_SOCKET_H
7854# include <sys/socket.h>
7855#endif
7856
7857"
Victor Stinnere0be4232011-10-25 13:06:09 +02007858if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007859 cat >>confdefs.h <<_ACEOF
7860#define HAVE_NET_IF_H 1
7861_ACEOF
7862
7863fi
7864
7865done
7866
7867
Martin v. Löwis11017b12006-01-14 18:12:57 +00007868# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007869for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007870do :
7871 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 +00007872#ifdef HAVE_ASM_TYPES_H
7873#include <asm/types.h>
7874#endif
7875#ifdef HAVE_SYS_SOCKET_H
7876#include <sys/socket.h>
7877#endif
7878
Matthias Kloseb9621712010-04-24 17:59:49 +00007879"
Victor Stinnere0be4232011-10-25 13:06:09 +02007880if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007881 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007882#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007883_ACEOF
7884
7885fi
7886
7887done
7888
7889
Charles-François Natali47413c12011-10-06 19:47:44 +02007890# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007891for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007892do :
7893 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7894ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7895#ifdef HAVE_SYS_SOCKET_H
7896#include <sys/socket.h>
7897#endif
7898
7899"
7900if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7901 cat >>confdefs.h <<_ACEOF
7902#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7903_ACEOF
7904
7905fi
7906
7907done
7908
7909
Guido van Rossum627b2d71993-12-24 10:39:16 +00007910# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007911was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7913$as_echo_n "checking for clock_t in time.h... " >&6; }
7914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007915/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007916#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007917
7918_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007920 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007921 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007922else
Martin v. Löwis11437992002-04-12 09:54:03 +00007923
7924
Matthias Kloseb9621712010-04-24 17:59:49 +00007925$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007926
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007927
Guido van Rossum627b2d71993-12-24 10:39:16 +00007928fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007929rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007930
Matthias Kloseb9621712010-04-24 17:59:49 +00007931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7932$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007933
Matthias Kloseb9621712010-04-24 17:59:49 +00007934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7935$as_echo_n "checking for makedev... " >&6; }
7936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007937/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007938
Jesus Cea740f53a2010-04-28 11:35:30 +00007939#if defined(MAJOR_IN_MKDEV)
7940#include <sys/mkdev.h>
7941#elif defined(MAJOR_IN_SYSMACROS)
7942#include <sys/sysmacros.h>
7943#else
7944#include <sys/types.h>
7945#endif
7946
Neal Norwitz11690112002-07-30 01:08:28 +00007947int
7948main ()
7949{
Jesus Cea740f53a2010-04-28 11:35:30 +00007950
7951 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007952 ;
7953 return 0;
7954}
Matthias Kloseb159a552010-04-25 21:00:44 +00007955
Neal Norwitz11690112002-07-30 01:08:28 +00007956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007957if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007958 ac_cv_has_makedev=yes
7959else
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007962rm -f core conftest.err conftest.$ac_objext \
7963 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7965$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007966if test "$ac_cv_has_makedev" = "yes"; then
7967
Matthias Kloseb9621712010-04-24 17:59:49 +00007968$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007969
7970fi
7971
Christian Heimes985ecdc2013-11-20 11:46:18 +01007972# byte swapping
7973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7974$as_echo_n "checking for le64toh... " >&6; }
7975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7976/* end confdefs.h. */
7977
7978#ifdef HAVE_ENDIAN_H
7979#include <endian.h>
7980#elif defined(HAVE_SYS_ENDIAN_H)
7981#include <sys/endian.h>
7982#endif
7983
7984int
7985main ()
7986{
7987
7988 le64toh(1)
7989 ;
7990 return 0;
7991}
7992
7993_ACEOF
7994if ac_fn_c_try_link "$LINENO"; then :
7995 ac_cv_has_le64toh=yes
7996else
7997 ac_cv_has_le64toh=no
7998fi
7999rm -f core conftest.err conftest.$ac_objext \
8000 conftest$ac_exeext conftest.$ac_ext
8001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8002$as_echo "$ac_cv_has_le64toh" >&6; }
8003if test "$ac_cv_has_le64toh" = "yes"; then
8004
8005$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8006
8007fi
8008
Martin v. Löwis399a6892002-10-04 10:22:02 +00008009# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8010# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8011# defined, but the compiler does not support pragma redefine_extname,
8012# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8013# structures (such as rlimit64) without declaring them. As a
8014# work-around, disable LFS on such configurations
8015
8016use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8018$as_echo_n "checking Solaris LFS bug... " >&6; }
8019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008020/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008021
8022#define _LARGEFILE_SOURCE 1
8023#define _FILE_OFFSET_BITS 64
8024#include <sys/resource.h>
8025
Martin v. Löwis399a6892002-10-04 10:22:02 +00008026int
8027main ()
8028{
8029struct rlimit foo;
8030 ;
8031 return 0;
8032}
8033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008035 sol_lfs_bug=no
8036else
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8041$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008042if test "$sol_lfs_bug" = "yes"; then
8043 use_lfs=no
8044fi
8045
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008046# Don't use largefile support for GNU/Hurd
8047case $ac_sys_system in GNU*)
8048 use_lfs=no
8049esac
8050
Martin v. Löwis399a6892002-10-04 10:22:02 +00008051if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008052# Two defines needed to enable largefile support on various platforms
8053# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008054case $ac_sys_system/$ac_sys_release in
8055AIX*)
8056
8057$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8058
8059 ;;
8060esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008061
Matthias Kloseb9621712010-04-24 17:59:49 +00008062$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008063
8064
Matthias Kloseb9621712010-04-24 17:59:49 +00008065$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008066
Martin v. Löwis399a6892002-10-04 10:22:02 +00008067fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008068
Guido van Rossum84e7b241996-08-19 21:59:00 +00008069# Add some code to confdefs.h so that the test for off_t works on SCO
8070cat >> confdefs.h <<\EOF
8071#if defined(SCO_DS)
8072#undef _OFF_T
8073#endif
8074EOF
8075
Guido van Rossumef2255b2000-03-10 22:30:29 +00008076# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008077ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008078if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008080else
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
8082cat >>confdefs.h <<_ACEOF
8083#define mode_t int
8084_ACEOF
8085
8086fi
8087
Matthias Kloseb9621712010-04-24 17:59:49 +00008088ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008089if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008091else
Martin v. Löwis11437992002-04-12 09:54:03 +00008092
8093cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008095_ACEOF
8096
8097fi
8098
Matthias Kloseb9621712010-04-24 17:59:49 +00008099ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008100if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008101
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008102else
Martin v. Löwis11437992002-04-12 09:54:03 +00008103
8104cat >>confdefs.h <<_ACEOF
8105#define pid_t int
8106_ACEOF
8107
8108fi
8109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008110
Martin v. Löwis11437992002-04-12 09:54:03 +00008111cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008112#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008113_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008114
Matthias Kloseb9621712010-04-24 17:59:49 +00008115ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008116if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008118else
Martin v. Löwis11437992002-04-12 09:54:03 +00008119
8120cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008122_ACEOF
8123
8124fi
8125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8127$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008128if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008129 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008130else
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008132/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008133#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008134
8135_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008138 ac_cv_type_uid_t=yes
8139else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008140 ac_cv_type_uid_t=no
8141fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008142rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8146$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008147if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008148
Matthias Kloseb9621712010-04-24 17:59:49 +00008149$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008150
8151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008153
8154fi
8155
Mark Dickinson983bc162012-12-02 12:11:38 +00008156
8157# There are two separate checks for each of the exact-width integer types we
8158# need. First we check whether the type is available using the usual
8159# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8160# and <stdint.h> where available). We then also use the special type checks of
8161# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8162# directly, #define's uint32_t to be a suitable type.
8163
8164ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8165if test "x$ac_cv_type_uint32_t" = xyes; then :
8166
8167$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8168
8169fi
8170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8172case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008173 no|yes) ;; #(
8174 *)
8175
Matthias Kloseb9621712010-04-24 17:59:49 +00008176$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008177
8178
8179cat >>confdefs.h <<_ACEOF
8180#define uint32_t $ac_cv_c_uint32_t
8181_ACEOF
8182;;
8183 esac
8184
Mark Dickinson983bc162012-12-02 12:11:38 +00008185
8186ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8187if test "x$ac_cv_type_uint64_t" = xyes; then :
8188
8189$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8190
8191fi
8192
Matthias Kloseb9621712010-04-24 17:59:49 +00008193ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8194case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008195 no|yes) ;; #(
8196 *)
8197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008199
8200
8201cat >>confdefs.h <<_ACEOF
8202#define uint64_t $ac_cv_c_uint64_t
8203_ACEOF
8204;;
8205 esac
8206
Mark Dickinson983bc162012-12-02 12:11:38 +00008207
8208ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8209if test "x$ac_cv_type_int32_t" = xyes; then :
8210
8211$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8212
8213fi
8214
Matthias Kloseb9621712010-04-24 17:59:49 +00008215ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8216case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008217 no|yes) ;; #(
8218 *)
8219
8220cat >>confdefs.h <<_ACEOF
8221#define int32_t $ac_cv_c_int32_t
8222_ACEOF
8223;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008224esac
8225
Mark Dickinson983bc162012-12-02 12:11:38 +00008226
8227ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8228if test "x$ac_cv_type_int64_t" = xyes; then :
8229
8230$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8231
8232fi
8233
Matthias Kloseb9621712010-04-24 17:59:49 +00008234ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8235case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008236 no|yes) ;; #(
8237 *)
8238
8239cat >>confdefs.h <<_ACEOF
8240#define int64_t $ac_cv_c_int64_t
8241_ACEOF
8242;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008243esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008244
Mark Dickinson983bc162012-12-02 12:11:38 +00008245
Matthias Kloseb9621712010-04-24 17:59:49 +00008246ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008247if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008250
8251fi
8252
Stefan Krah1919b7e2012-03-21 18:25:23 +01008253ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8254if test "x$ac_cv_type___uint128_t" = xyes; then :
8255
8256$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8257
8258fi
8259
Jack Jansendd19cf82001-12-06 22:36:17 +00008260
Michael W. Hudson54241132001-12-07 15:38:26 +00008261# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008262# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263# The cast to long int works around a bug in the HP C Compiler
8264# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8265# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8266# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8268$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008269if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008271else
Matthias Kloseb9621712010-04-24 17:59:49 +00008272 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 +00008273
Martin v. Löwis11437992002-04-12 09:54:03 +00008274else
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 if test "$ac_cv_type_int" = yes; then
8276 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008278as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008279See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008280 else
8281 ac_cv_sizeof_int=0
8282 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008284
Martin v. Löwis11437992002-04-12 09:54:03 +00008285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8287$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008288
8289
8290
Martin v. Löwis11437992002-04-12 09:54:03 +00008291cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008292#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008293_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008294
8295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008296# The cast to long int works around a bug in the HP C Compiler
8297# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8298# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8299# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8301$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008302if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008304else
Matthias Kloseb9621712010-04-24 17:59:49 +00008305 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 +00008306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307else
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 if test "$ac_cv_type_long" = yes; then
8309 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8310$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008311as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008312See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008313 else
8314 ac_cv_sizeof_long=0
8315 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008316fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008317
Martin v. Löwis11437992002-04-12 09:54:03 +00008318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8320$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008321
8322
8323
Martin v. Löwis11437992002-04-12 09:54:03 +00008324cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008325#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008326_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008327
8328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008329# The cast to long int works around a bug in the HP C Compiler
8330# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8331# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8332# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8334$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008335if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008337else
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 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 +00008339
Martin v. Löwis11437992002-04-12 09:54:03 +00008340else
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 if test "$ac_cv_type_void_p" = yes; then
8342 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8343$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008344as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008345See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346 else
8347 ac_cv_sizeof_void_p=0
8348 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8353$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008354
8355
8356
Martin v. Löwis11437992002-04-12 09:54:03 +00008357cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008358#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008359_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008360
8361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008362# The cast to long int works around a bug in the HP C Compiler
8363# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8364# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8365# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8367$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008368if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008370else
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 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 +00008372
Martin v. Löwis11437992002-04-12 09:54:03 +00008373else
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 if test "$ac_cv_type_short" = yes; then
8375 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8376$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008377as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008378See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379 else
8380 ac_cv_sizeof_short=0
8381 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008383
Martin v. Löwis11437992002-04-12 09:54:03 +00008384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8386$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387
8388
8389
Martin v. Löwis11437992002-04-12 09:54:03 +00008390cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008391#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008392_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008393
8394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395# The cast to long int works around a bug in the HP C Compiler
8396# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8397# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8398# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8400$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008401if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008403else
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 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 +00008405
Martin v. Löwis11437992002-04-12 09:54:03 +00008406else
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 if test "$ac_cv_type_float" = yes; then
8408 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008410as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008411See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412 else
8413 ac_cv_sizeof_float=0
8414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008416
Martin v. Löwis11437992002-04-12 09:54:03 +00008417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8419$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420
8421
8422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008424#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008425_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008426
8427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428# The cast to long int works around a bug in the HP C Compiler
8429# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8430# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8431# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8433$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008434if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008436else
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 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 +00008438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439else
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 if test "$ac_cv_type_double" = yes; then
8441 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8442$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008443as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008444See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008445 else
8446 ac_cv_sizeof_double=0
8447 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449
Martin v. Löwis11437992002-04-12 09:54:03 +00008450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8452$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453
8454
8455
Martin v. Löwis11437992002-04-12 09:54:03 +00008456cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008457#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008458_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008459
8460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461# The cast to long int works around a bug in the HP C Compiler
8462# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8463# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8464# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8466$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008467if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008469else
Matthias Kloseb9621712010-04-24 17:59:49 +00008470 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 +00008471
Martin v. Löwis11437992002-04-12 09:54:03 +00008472else
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 if test "$ac_cv_type_fpos_t" = yes; then
8474 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008476as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008477See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478 else
8479 ac_cv_sizeof_fpos_t=0
8480 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008482
Martin v. Löwis11437992002-04-12 09:54:03 +00008483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8485$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486
8487
8488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008490#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008491_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008492
Michael W. Hudson54241132001-12-07 15:38:26 +00008493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494# The cast to long int works around a bug in the HP C Compiler
8495# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8496# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8497# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8499$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008500if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008502else
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 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 +00008504
Martin v. Löwis18e16552006-02-15 17:27:45 +00008505else
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 if test "$ac_cv_type_size_t" = yes; then
8507 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8508$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008509as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008510See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511 else
8512 ac_cv_sizeof_size_t=0
8513 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008515
Martin v. Löwis18e16552006-02-15 17:27:45 +00008516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8518$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519
8520
8521
Martin v. Löwis18e16552006-02-15 17:27:45 +00008522cat >>confdefs.h <<_ACEOF
8523#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8524_ACEOF
8525
8526
Christian Heimes400adb02008-02-01 08:12:03 +00008527# The cast to long int works around a bug in the HP C Compiler
8528# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8529# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8530# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8532$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008533if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008535else
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 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 +00008537
Christian Heimes400adb02008-02-01 08:12:03 +00008538else
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 if test "$ac_cv_type_pid_t" = yes; then
8540 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8541$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008542as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008543See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008544 else
8545 ac_cv_sizeof_pid_t=0
8546 fi
8547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008548
Christian Heimes400adb02008-02-01 08:12:03 +00008549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8551$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008552
8553
8554
8555cat >>confdefs.h <<_ACEOF
8556#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8557_ACEOF
8558
8559
Michael W. Hudson54241132001-12-07 15:38:26 +00008560
Matthias Kloseb9621712010-04-24 17:59:49 +00008561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8562$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008563have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008565/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008566
Martin v. Löwis11437992002-04-12 09:54:03 +00008567int
8568main ()
8569{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008570long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ;
8572 return 0;
8573}
8574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008575if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008576
8577
Matthias Kloseb9621712010-04-24 17:59:49 +00008578$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008579
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008580 have_long_long=yes
8581
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8585$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008586if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008587# The cast to long int works around a bug in the HP C Compiler
8588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8590# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8592$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008593if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008595else
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 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 +00008597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598else
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 if test "$ac_cv_type_long_long" = yes; then
8600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008602as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008603See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604 else
8605 ac_cv_sizeof_long_long=0
8606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8611$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612
8613
8614
Martin v. Löwis11437992002-04-12 09:54:03 +00008615cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008616#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008617_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008618
Michael W. Hudson54241132001-12-07 15:38:26 +00008619
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008620fi
8621
Matthias Kloseb9621712010-04-24 17:59:49 +00008622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8623$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008624have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008626/* end confdefs.h. */
8627
8628int
8629main ()
8630{
8631long double x; x = (long double)0;
8632 ;
8633 return 0;
8634}
8635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008636if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008637
8638
Matthias Kloseb9621712010-04-24 17:59:49 +00008639$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008640
8641 have_long_double=yes
8642
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008643fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8646$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008647if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008648# The cast to long int works around a bug in the HP C Compiler
8649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8651# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8653$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008654if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008655 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008656else
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 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 +00008658
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008659else
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 if test "$ac_cv_type_long_double" = yes; then
8661 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008663as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008664See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008665 else
8666 ac_cv_sizeof_long_double=0
8667 fi
8668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008669
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8672$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008673
8674
8675
8676cat >>confdefs.h <<_ACEOF
8677#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8678_ACEOF
8679
8680
8681fi
8682
8683
Matthias Kloseb9621712010-04-24 17:59:49 +00008684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8685$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008686have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008688/* end confdefs.h. */
8689
8690int
8691main ()
8692{
8693_Bool x; x = (_Bool)0;
8694 ;
8695 return 0;
8696}
8697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008698if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008699
8700
Matthias Kloseb9621712010-04-24 17:59:49 +00008701$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008702
8703 have_c99_bool=yes
8704
Thomas Woutersb2137042007-02-01 18:02:27 +00008705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8708$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008709if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710# The cast to long int works around a bug in the HP C Compiler
8711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8713# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8715$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008716if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008717 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008718else
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 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 +00008720
Thomas Woutersb2137042007-02-01 18:02:27 +00008721else
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 if test "$ac_cv_type__Bool" = yes; then
8723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008725as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008726See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008727 else
8728 ac_cv_sizeof__Bool=0
8729 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008731
Thomas Woutersb2137042007-02-01 18:02:27 +00008732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8734$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008735
8736
8737
Thomas Woutersb2137042007-02-01 18:02:27 +00008738cat >>confdefs.h <<_ACEOF
8739#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8740_ACEOF
8741
8742
8743fi
8744
Matthias Kloseb9621712010-04-24 17:59:49 +00008745ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008746 #include <stdint.h>
8747 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008748 #ifdef HAVE_INTTYPES_H
8749 #include <inttypes.h>
8750 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008751"
Victor Stinnere0be4232011-10-25 13:06:09 +02008752if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008753
8754cat >>confdefs.h <<_ACEOF
8755#define HAVE_UINTPTR_T 1
8756_ACEOF
8757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008758# The cast to long int works around a bug in the HP C Compiler
8759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8761# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8763$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008764if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008766else
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 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 +00008768
Martin v. Löwis11437992002-04-12 09:54:03 +00008769else
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 if test "$ac_cv_type_uintptr_t" = yes; then
8771 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8772$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008773as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008774See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775 else
8776 ac_cv_sizeof_uintptr_t=0
8777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008779
Martin v. Löwis11437992002-04-12 09:54:03 +00008780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8782$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783
8784
8785
Martin v. Löwis11437992002-04-12 09:54:03 +00008786cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008787#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008788_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008789
Michael W. Hudson54241132001-12-07 15:38:26 +00008790
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008791fi
8792
Thomas Wouters89f507f2006-12-13 04:49:30 +00008793
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008794# The cast to long int works around a bug in the HP C Compiler
8795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8797# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8799$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008800if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008802else
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008804#ifdef HAVE_SYS_TYPES_H
8805#include <sys/types.h>
8806#endif
8807
Matthias Kloseb9621712010-04-24 17:59:49 +00008808"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008809
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008810else
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 if test "$ac_cv_type_off_t" = yes; then
8812 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8813$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008814as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008815See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008816 else
8817 ac_cv_sizeof_off_t=0
8818 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008820
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8823$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008824
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825
8826
Martin v. Löwis11437992002-04-12 09:54:03 +00008827cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008828#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008829_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008830
Michael W. Hudson54241132001-12-07 15:38:26 +00008831
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008832
Matthias Kloseb9621712010-04-24 17:59:49 +00008833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8834$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008835if test "$have_long_long" = yes
8836then
8837if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008838 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008839
Matthias Kloseb9621712010-04-24 17:59:49 +00008840$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008841
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8843$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008844else
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8846$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008847fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008848else
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8850$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008851fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008852
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008853# The cast to long int works around a bug in the HP C Compiler
8854# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8855# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8856# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8858$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008859if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008861else
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008863#ifdef HAVE_SYS_TYPES_H
8864#include <sys/types.h>
8865#endif
8866#ifdef HAVE_TIME_H
8867#include <time.h>
8868#endif
8869
Matthias Kloseb9621712010-04-24 17:59:49 +00008870"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008871
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008872else
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 if test "$ac_cv_type_time_t" = yes; then
8874 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008876as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008877See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878 else
8879 ac_cv_sizeof_time_t=0
8880 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008882
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8885$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008886
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008887
8888
Martin v. Löwis11437992002-04-12 09:54:03 +00008889cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008890#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008891_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008892
Michael W. Hudson54241132001-12-07 15:38:26 +00008893
8894
Trent Mick635f6fb2000-08-23 21:33:05 +00008895# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008896ac_save_cc="$CC"
8897if test "$ac_cv_kpthread" = "yes"
8898then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008899elif test "$ac_cv_kthread" = "yes"
8900then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008901elif test "$ac_cv_pthread" = "yes"
8902then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008903fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904
Matthias Kloseb9621712010-04-24 17:59:49 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8906$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008907have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008909/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008910
8911 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008912int
8913main ()
8914{
Guido van Rossum12580492000-09-24 16:47:19 +00008915pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 ;
8917 return 0;
8918}
Matthias Kloseb159a552010-04-25 21:00:44 +00008919
Martin v. Löwis11437992002-04-12 09:54:03 +00008920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008921if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008922 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8926$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008927if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008928 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008929# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8930# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8931# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8933$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008934if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008936else
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008938#ifdef HAVE_PTHREAD_H
8939#include <pthread.h>
8940#endif
8941
Matthias Kloseb9621712010-04-24 17:59:49 +00008942"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008943
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008944else
Matthias Kloseb9621712010-04-24 17:59:49 +00008945 if test "$ac_cv_type_pthread_t" = yes; then
8946 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008948as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008949See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008950 else
8951 ac_cv_sizeof_pthread_t=0
8952 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008954
Trent Mick635f6fb2000-08-23 21:33:05 +00008955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8957$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008958
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008959
8960
Martin v. Löwis11437992002-04-12 09:54:03 +00008961cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008962#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008963_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008964
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008965
Trent Mick635f6fb2000-08-23 21:33:05 +00008966fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008967CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008968
Michael W. Hudson54241132001-12-07 15:38:26 +00008969
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008970case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008971 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008972 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8973 ;;
8974 Darwin/*)
8975 OTHER_LIBTOOL_OPT=""
8976 ;;
8977esac
8978
8979
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008980
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008981case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008982 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008983 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8984 if test "${enable_universalsdk}"; then
8985 :
8986 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008987 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008988 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008989 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008990 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008991 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008992 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008993 if test ${gcc_version} '<' 4.0
8994 then
8995 LIBTOOL_CRUFT="-lcc_dynamic"
8996 else
8997 LIBTOOL_CRUFT=""
8998 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008999 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009000 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009001else
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009003/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009004
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009005 #include <unistd.h>
9006 int main(int argc, char*argv[])
9007 {
9008 if (sizeof(long) == 4) {
9009 return 0;
9010 } else {
9011 return 1;
9012 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009013 }
9014
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009016if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009017 ac_osx_32bit=yes
9018else
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9022 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009023fi
9024
9025
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009026 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009027 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009028 i386)
9029 MACOSX_DEFAULT_ARCH="i386"
9030 ;;
9031 ppc)
9032 MACOSX_DEFAULT_ARCH="ppc"
9033 ;;
9034 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009035 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009036 ;;
9037 esac
9038 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009039 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009040 i386)
9041 MACOSX_DEFAULT_ARCH="x86_64"
9042 ;;
9043 ppc)
9044 MACOSX_DEFAULT_ARCH="ppc64"
9045 ;;
9046 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009047 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009048 ;;
9049 esac
9050
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009051 fi
9052
9053 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009054 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009055 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009056esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9058$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009059if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009060then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009061 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009062 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009063 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009066
Matthias Kloseb9621712010-04-24 17:59:49 +00009067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9068$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009069 if test $enable_shared = "yes"
9070 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009071 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 +00009072 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009073else
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009076fi
9077
Matthias Kloseb9621712010-04-24 17:59:49 +00009078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9079$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009080case $ac_sys_system/$ac_sys_release in
9081 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009082
Matthias Kloseb9621712010-04-24 17:59:49 +00009083$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009084
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9086$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009087 ;;
9088 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9090$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009091 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009092esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009093
Guido van Rossum0a516c91994-09-12 10:58:40 +00009094# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009095
Michael W. Hudson54241132001-12-07 15:38:26 +00009096
9097
9098
9099
Benjamin Peterson99f03762010-04-11 22:15:28 +00009100
Thomas Wouters477c8d52006-05-27 19:21:47 +00009101
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009102# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9103# -- usually .so, .sl on HP-UX, .dll on Cygwin
9104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9105$as_echo_n "checking the extension of shared libraries... " >&6; }
9106if test -z "$SHLIB_SUFFIX"; then
9107 case $ac_sys_system in
9108 hp*|HP*)
9109 case `uname -m` in
9110 ia64) SHLIB_SUFFIX=.so;;
9111 *) SHLIB_SUFFIX=.sl;;
9112 esac
9113 ;;
9114 CYGWIN*) SHLIB_SUFFIX=.dll;;
9115 *) SHLIB_SUFFIX=.so;;
9116 esac
9117fi
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9119$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009120
Guido van Rossum0a516c91994-09-12 10:58:40 +00009121# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009122# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009123# (Shared libraries in this instance are shared modules to be loaded into
9124# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9126$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009127if test -z "$LDSHARED"
9128then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009129 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009130 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009131 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009132 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009133 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009134 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009135 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009136 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009137 if test "$GCC" = "yes" ; then
9138 LDSHARED='$(CC) -shared'
9139 LDCXXSHARED='$(CXX) -shared'
9140 else
9141 LDSHARED='$(CC) -G'
9142 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009143 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009144 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009145 if test "$GCC" = "yes" ; then
9146 LDSHARED='$(CC) -shared'
9147 LDCXXSHARED='$(CXX) -shared'
9148 else
9149 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009150 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009151 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009152 LDSHARED='$(CC) -bundle'
9153 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009154 if test "$enable_framework" ; then
9155 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009156 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9157 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009158 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009159 else
9160 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009161 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009162 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009163 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009164 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009165 LDSHARED='$(CC) -bundle'
9166 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009167 if test "$enable_framework" ; then
9168 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009169 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9170 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009171 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009172 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009173 # No framework, use the Python app as bundle-loader
9174 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009175 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009176 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009177 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009178 Darwin/*)
9179 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9180 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009181
Ned Deily36820b62014-06-25 13:44:22 -07009182 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9183 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9184 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9185 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9186 if test ${dep_target_major} -eq 10 && \
9187 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009188 then
Ned Deily36820b62014-06-25 13:44:22 -07009189 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009190 LDSHARED='$(CC) -bundle'
9191 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009192 if test "$enable_framework" ; then
9193 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009194 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9195 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009196 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009197 else
9198 # No framework, use the Python app as bundle-loader
9199 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9200 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009201 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009202 fi
Ned Deily36820b62014-06-25 13:44:22 -07009203 else
9204 # building for OS X 10.3 and later
9205 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9206 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9207 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009208 fi
9209 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009210 Linux*|GNU*|QNX*)
9211 LDSHARED='$(CC) -shared'
9212 LDCXXSHARED='$(CXX) -shared';;
9213 BSD/OS*/4*)
9214 LDSHARED="gcc -shared"
9215 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009216 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009217 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009218 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009219 LDSHARED='$(CC) -shared'
9220 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009221 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009222 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009223 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009224 OpenBSD*)
9225 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9226 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009227 LDSHARED='$(CC) -shared $(CCSHARED)'
9228 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009229 else
9230 case `uname -r` in
9231 [01].* | 2.[0-7] | 2.[0-7].*)
9232 LDSHARED="ld -Bshareable ${LDFLAGS}"
9233 ;;
9234 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009235 LDSHARED='$(CC) -shared $(CCSHARED)'
9236 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009237 ;;
9238 esac
9239 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009240 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009241 LDSHARED='$(CC) -shared'
9242 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009243 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009244 if test "$GCC" = "yes" ; then
9245 LDSHARED='$(CC) -shared'
9246 LDCXXSHARED='$(CXX) -shared'
9247 else
9248 LDSHARED='$(CC) -G'
9249 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009250 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009251 SCO_SV*)
9252 LDSHARED='$(CC) -Wl,-G,-Bexport'
9253 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9254 CYGWIN*)
9255 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9256 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009257 *) LDSHARED="ld";;
9258 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9261$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009262LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009263BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009264# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009265# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9267$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009268if test -z "$CCSHARED"
9269then
Guido van Rossum07397971997-04-29 21:49:50 +00009270 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009271 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009272 then CCSHARED="-fPIC";
9273 elif test `uname -p` = sparc;
9274 then CCSHARED="-xcode=pic32";
9275 else CCSHARED="-Kpic";
9276 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009277 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009278 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009279 else CCSHARED="+z";
9280 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009281 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009282 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009283 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009284 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009285 if test "$GCC" = "yes"
9286 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009287 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009288 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009289 SCO_SV*)
9290 if test "$GCC" = "yes"
9291 then CCSHARED="-fPIC"
9292 else CCSHARED="-Kpic -belf"
9293 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009294 IRIX*/6*) case $CC in
9295 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009296 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009297 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009298 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9301$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009302# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009303# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9305$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306if test -z "$LINKFORSHARED"
9307then
Guido van Rossum07397971997-04-29 21:49:50 +00009308 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009309 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009310 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009311 LINKFORSHARED="-Wl,-E -Wl,+s";;
9312# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009313 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009314 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009315 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009316 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009317 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009318
9319 # Issue #18075: the default maximum stack size (8MBytes) is too
9320 # small for the default recursion limit. Increase the stack size
9321 # to ensure that tests don't crash
9322 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9323
Jack Jansene578a632001-08-15 01:27:14 +00009324 if test "$enable_framework"
9325 then
Jack Jansenda49e192005-01-07 13:08:22 +00009326 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009327 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009328 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009329 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009330 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009331 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009332 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009333 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9334 then
9335 LINKFORSHARED="-Wl,--export-dynamic"
9336 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009337 SunOS/5*) case $CC in
9338 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009339 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009340 then
9341 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009342 fi;;
9343 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009344 CYGWIN*)
9345 if test $enable_shared = "no"
9346 then
9347 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9348 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009349 QNX*)
9350 # -Wl,-E causes the symbols to be added to the dynamic
9351 # symbol table so that they can be found when a module
9352 # is loaded. -N 2048K causes the stack size to be set
9353 # to 2048 kilobytes so that the stack doesn't overflow
9354 # when running test_compile.py.
9355 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009356 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009357fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9359$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009360
Michael W. Hudson54241132001-12-07 15:38:26 +00009361
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009362
Matthias Kloseb9621712010-04-24 17:59:49 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9364$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009365if test ! "$LIBRARY" = "$LDLIBRARY"
9366then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009367 case $ac_sys_system in
9368 CYGWIN*)
9369 # Cygwin needs CCSHARED when building extension DLLs
9370 # but not when building the interpreter DLL.
9371 CFLAGSFORSHARED='';;
9372 *)
9373 CFLAGSFORSHARED='$(CCSHARED)'
9374 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9377$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009378
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009379# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9380# library (with --enable-shared).
9381# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009382# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9383# if it is not required, since it creates a dependency of the shared library
9384# to LIBS. This, in turn, means that applications linking the shared libpython
9385# don't need to link LIBS explicitly. The default should be only changed
9386# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009387
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9389$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009390case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009391 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009392 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009393esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9395$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009396
9397
Guido van Rossum627b2d71993-12-24 10:39:16 +00009398# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9400$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009401if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009402 $as_echo_n "(cached) " >&6
9403else
9404 ac_check_lib_save_LIBS=$LIBS
9405LIBS="-lsendfile $LIBS"
9406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9407/* end confdefs.h. */
9408
9409/* Override any GCC internal prototype to avoid an error.
9410 Use char because int might match the return type of a GCC
9411 builtin and then its argument prototype would still apply. */
9412#ifdef __cplusplus
9413extern "C"
9414#endif
9415char sendfile ();
9416int
9417main ()
9418{
9419return sendfile ();
9420 ;
9421 return 0;
9422}
9423_ACEOF
9424if ac_fn_c_try_link "$LINENO"; then :
9425 ac_cv_lib_sendfile_sendfile=yes
9426else
9427 ac_cv_lib_sendfile_sendfile=no
9428fi
9429rm -f core conftest.err conftest.$ac_objext \
9430 conftest$ac_exeext conftest.$ac_ext
9431LIBS=$ac_check_lib_save_LIBS
9432fi
9433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9434$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009435if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009436 cat >>confdefs.h <<_ACEOF
9437#define HAVE_LIBSENDFILE 1
9438_ACEOF
9439
9440 LIBS="-lsendfile $LIBS"
9441
9442fi
9443
Matthias Kloseb9621712010-04-24 17:59:49 +00009444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9445$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009446if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009447 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009448else
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009450LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454/* Override any GCC internal prototype to avoid an error.
9455 Use char because int might match the return type of a GCC
9456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009457#ifdef __cplusplus
9458extern "C"
9459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009460char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009461int
9462main ()
9463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 ;
9466 return 0;
9467}
9468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009471else
Matthias Kloseb9621712010-04-24 17:59:49 +00009472 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009474rm -f core conftest.err conftest.$ac_objext \
9475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009476LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9479$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009480if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 cat >>confdefs.h <<_ACEOF
9482#define HAVE_LIBDL 1
9483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009484
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009485 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009486
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009487fi
9488 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9490$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009491if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009492 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009493else
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009495LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499/* Override any GCC internal prototype to avoid an error.
9500 Use char because int might match the return type of a GCC
9501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502#ifdef __cplusplus
9503extern "C"
9504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009505char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009506int
9507main ()
9508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009509return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ;
9511 return 0;
9512}
9513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009516else
Matthias Kloseb9621712010-04-24 17:59:49 +00009517 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009519rm -f core conftest.err conftest.$ac_objext \
9520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009521LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9524$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009525if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 cat >>confdefs.h <<_ACEOF
9527#define HAVE_LIBDLD 1
9528_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009529
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009530 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009531
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009532fi
9533 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009534
Georg Brandlb1441c72009-01-03 22:33:39 +00009535# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009536if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9538$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009539if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009540 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009541else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009542 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009546/* Override any GCC internal prototype to avoid an error.
9547 Use char because int might match the return type of a GCC
9548 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549#ifdef __cplusplus
9550extern "C"
9551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009552char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009553int
9554main ()
9555{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 ;
9558 return 0;
9559}
9560_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561for ac_lib in '' pthread rt posix4; do
9562 if test -z "$ac_lib"; then
9563 ac_res="none required"
9564 else
9565 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009566 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009571rm -f core conftest.err conftest.$ac_objext \
9572 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009573 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576done
Victor Stinnere0be4232011-10-25 13:06:09 +02009577if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579else
9580 ac_cv_search_sem_init=no
9581fi
9582rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009583LIBS=$ac_func_search_save_LIBS
9584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9586$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009587ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009588if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009589 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009590
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009591fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009592 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009593 # posix4 on Solaris 2.6
9594 # pthread (first!) on Linux
9595fi
9596
Martin v. Löwis19d17342003-06-14 21:03:05 +00009597# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9599$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009600if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009601 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009602else
9603 ac_check_lib_save_LIBS=$LIBS
9604LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009606/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608/* Override any GCC internal prototype to avoid an error.
9609 Use char because int might match the return type of a GCC
9610 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009611#ifdef __cplusplus
9612extern "C"
9613#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009614char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009615int
9616main ()
9617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009624 ac_cv_lib_intl_textdomain=yes
9625else
Matthias Kloseb9621712010-04-24 17:59:49 +00009626 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009628rm -f core conftest.err conftest.$ac_objext \
9629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009630LIBS=$ac_check_lib_save_LIBS
9631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9633$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009634if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009635
Matthias Kloseb9621712010-04-24 17:59:49 +00009636$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009637
Brett Cannonc6d936e2009-06-07 20:09:53 +00009638 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009639fi
9640
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009641
9642# checks for system dependent C++ extensions support
9643case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009644 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9645$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009647/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009648
Georg Brandl59e87bd2011-02-15 19:48:59 +00009649 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009650int
9651main ()
9652{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009653loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 ;
9655 return 0;
9656}
Matthias Kloseb159a552010-04-25 21:00:44 +00009657
Martin v. Löwis11437992002-04-12 09:54:03 +00009658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009659if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009660
Matthias Kloseb159a552010-04-25 21:00:44 +00009661
Matthias Kloseb9621712010-04-24 17:59:49 +00009662$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009663
Matthias Kloseb159a552010-04-25 21:00:44 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009665$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009666
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009667else
Matthias Kloseb159a552010-04-25 21:00:44 +00009668
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009670$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009671
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009673rm -f core conftest.err conftest.$ac_objext \
9674 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009675 *) ;;
9676esac
9677
Christian Heimes985ecdc2013-11-20 11:46:18 +01009678# check for systems that require aligned memory access
9679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9680$as_echo_n "checking aligned memory access is required... " >&6; }
9681if test "$cross_compiling" = yes; then :
9682 aligned_required=yes
9683else
9684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9685/* end confdefs.h. */
9686
9687int main()
9688{
9689 char s[16];
9690 int i, *p1, *p2;
9691 for (i=0; i < 16; i++)
9692 s[i] = i;
9693 p1 = (int*)(s+1);
9694 p2 = (int*)(s+2);
9695 if (*p1 == *p2)
9696 return 1;
9697 return 0;
9698}
9699
9700_ACEOF
9701if ac_fn_c_try_run "$LINENO"; then :
9702 aligned_required=no
9703else
9704 aligned_required=yes
9705fi
9706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9707 conftest.$ac_objext conftest.beam conftest.$ac_ext
9708fi
9709
9710
9711if test "$aligned_required" = yes ; then
9712
9713$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9714
9715fi
9716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9717$as_echo "$aligned_required" >&6; }
9718
9719
9720# str, bytes and memoryview hash algorithm
9721
9722
9723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9724$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9725
9726# Check whether --with-hash_algorithm was given.
9727if test "${with_hash_algorithm+set}" = set; then :
9728 withval=$with_hash_algorithm;
9729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9730$as_echo "$withval" >&6; }
9731case "$withval" in
9732 siphash24)
9733 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9734
9735 ;;
9736 fnv)
9737 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9738
9739 ;;
9740 *)
9741 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9742 ;;
9743esac
9744
9745else
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9747$as_echo "default" >&6; }
9748fi
9749
9750
Charles-François Natalid30b0222014-05-08 23:08:51 +01009751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9752$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9753
9754# Check whether --with-address_sanitizer was given.
9755if test "${with_address_sanitizer+set}" = set; then :
9756 withval=$with_address_sanitizer;
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9758$as_echo "$withval" >&6; }
9759BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9760LDFLAGS="-fsanitize=address $LDFLAGS"
9761
9762else
9763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9764$as_echo "no" >&6; }
9765fi
9766
9767
Guido van Rossum70c7f481998-03-26 18:44:10 +00009768# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9770$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009771if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009773else
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009775LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009779/* Override any GCC internal prototype to avoid an error.
9780 Use char because int might match the return type of a GCC
9781 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009782#ifdef __cplusplus
9783extern "C"
9784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009785char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009786int
9787main ()
9788{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009789return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 ;
9791 return 0;
9792}
9793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009794if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009796else
Matthias Kloseb9621712010-04-24 17:59:49 +00009797 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009799rm -f core conftest.err conftest.$ac_objext \
9800 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009801LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9804$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009805if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009806 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009807fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009808 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9810$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009811if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009813else
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009815LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819/* Override any GCC internal prototype to avoid an error.
9820 Use char because int might match the return type of a GCC
9821 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009822#ifdef __cplusplus
9823extern "C"
9824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009825char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009826int
9827main ()
9828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ;
9831 return 0;
9832}
9833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009834if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009836else
Matthias Kloseb9621712010-04-24 17:59:49 +00009837 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009839rm -f core conftest.err conftest.$ac_objext \
9840 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009841LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9844$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009845if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009846 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009847fi
9848 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009849
Matthias Kloseb9621712010-04-24 17:59:49 +00009850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9851$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009854if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9857$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009858LIBS="$withval $LIBS"
9859
9860else
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9862$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863fi
9864
Guido van Rossum7f43da71994-08-01 12:15:30 +00009865
Victor Stinner8291b5e2015-03-20 16:03:14 +01009866
9867
9868
9869
9870
9871
9872
9873if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9874 if test -n "$ac_tool_prefix"; then
9875 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9876set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9878$as_echo_n "checking for $ac_word... " >&6; }
9879if ${ac_cv_path_PKG_CONFIG+:} false; then :
9880 $as_echo_n "(cached) " >&6
9881else
9882 case $PKG_CONFIG in
9883 [\\/]* | ?:[\\/]*)
9884 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9885 ;;
9886 *)
9887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9888for as_dir in $PATH
9889do
9890 IFS=$as_save_IFS
9891 test -z "$as_dir" && as_dir=.
9892 for ac_exec_ext in '' $ac_executable_extensions; do
9893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9894 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9896 break 2
9897 fi
9898done
9899 done
9900IFS=$as_save_IFS
9901
9902 ;;
9903esac
9904fi
9905PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9906if test -n "$PKG_CONFIG"; then
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9908$as_echo "$PKG_CONFIG" >&6; }
9909else
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9911$as_echo "no" >&6; }
9912fi
9913
9914
9915fi
9916if test -z "$ac_cv_path_PKG_CONFIG"; then
9917 ac_pt_PKG_CONFIG=$PKG_CONFIG
9918 # Extract the first word of "pkg-config", so it can be a program name with args.
9919set dummy pkg-config; ac_word=$2
9920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9921$as_echo_n "checking for $ac_word... " >&6; }
9922if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9923 $as_echo_n "(cached) " >&6
9924else
9925 case $ac_pt_PKG_CONFIG in
9926 [\\/]* | ?:[\\/]*)
9927 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9928 ;;
9929 *)
9930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9931for as_dir in $PATH
9932do
9933 IFS=$as_save_IFS
9934 test -z "$as_dir" && as_dir=.
9935 for ac_exec_ext in '' $ac_executable_extensions; do
9936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9937 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9939 break 2
9940 fi
9941done
9942 done
9943IFS=$as_save_IFS
9944
9945 ;;
9946esac
9947fi
9948ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9949if test -n "$ac_pt_PKG_CONFIG"; then
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9951$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9952else
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9954$as_echo "no" >&6; }
9955fi
9956
9957 if test "x$ac_pt_PKG_CONFIG" = x; then
9958 PKG_CONFIG=""
9959 else
9960 case $cross_compiling:$ac_tool_warned in
9961yes:)
9962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9964ac_tool_warned=yes ;;
9965esac
9966 PKG_CONFIG=$ac_pt_PKG_CONFIG
9967 fi
9968else
9969 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9970fi
9971
9972fi
9973if test -n "$PKG_CONFIG"; then
9974 _pkg_min_version=0.9.0
9975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9976$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9977 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9979$as_echo "yes" >&6; }
9980 else
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9982$as_echo "no" >&6; }
9983 PKG_CONFIG=""
9984 fi
9985fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009986
9987# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9989$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009990
9991# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009992if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009993 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009994else
9995 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009996fi
9997
9998
Matthias Kloseb9621712010-04-24 17:59:49 +00009999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10000$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010001
10002# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10004$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010005
10006# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010007if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010008 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +000010009else
10010 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010011fi
10012
10013
10014if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010015 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10016else
10017 LIBFFI_INCLUDEDIR=""
10018fi
10019
10020
Matthias Kloseb9621712010-04-24 17:59:49 +000010021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10022$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010023
Stefan Krah60187b52012-03-23 19:06:27 +010010024# Check for use of the system libmpdec library
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10026$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10027
10028# Check whether --with-system_libmpdec was given.
10029if test "${with_system_libmpdec+set}" = set; then :
10030 withval=$with_system_libmpdec;
10031else
10032 with_system_libmpdec="no"
10033fi
10034
10035
10036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10037$as_echo "$with_system_libmpdec" >&6; }
10038
Benjamin Peterson076ed002010-10-31 17:11:02 +000010039# Check for support for loadable sqlite extensions
10040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10041$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10042# Check whether --enable-loadable-sqlite-extensions was given.
10043if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10044 enableval=$enable_loadable_sqlite_extensions;
10045else
10046 enable_loadable_sqlite_extensions="no"
10047fi
10048
10049
10050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10051$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10052
Ned Deilyd819b932013-09-06 01:07:05 -070010053# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10054
10055
10056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10057$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10058
10059# Check whether --with-tcltk-includes was given.
10060if test "${with_tcltk_includes+set}" = set; then :
10061 withval=$with_tcltk_includes;
10062else
10063 with_tcltk_includes="default"
10064fi
10065
10066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10067$as_echo "$with_tcltk_includes" >&6; }
10068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10069$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10070
10071# Check whether --with-tcltk-libs was given.
10072if test "${with_tcltk_libs+set}" = set; then :
10073 withval=$with_tcltk_libs;
10074else
10075 with_tcltk_libs="default"
10076fi
10077
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10079$as_echo "$with_tcltk_libs" >&6; }
10080if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10081then
10082 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10083 then
10084 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10085 fi
10086 TCLTK_INCLUDES=""
10087 TCLTK_LIBS=""
10088else
10089 TCLTK_INCLUDES="$with_tcltk_includes"
10090 TCLTK_LIBS="$with_tcltk_libs"
10091fi
10092
Matthias Klose55708cc2009-04-30 08:06:49 +000010093# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10095$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010096
10097# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010098if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010099 withval=$with_dbmliborder;
10100if test x$with_dbmliborder = xyes
10101then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010102as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010103else
10104 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10105 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10106 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010107 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010108 fi
10109 done
10110fi
10111fi
10112
Matthias Kloseb9621712010-04-24 17:59:49 +000010113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10114$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010115
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010116# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010117
10118
Matthias Kloseb9621712010-04-24 17:59:49 +000010119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10120$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010123if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124 withval=$with_signal_module;
10125fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010126
10127
10128if test -z "$with_signal_module"
10129then with_signal_module="yes"
10130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10132$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010133
10134if test "${with_signal_module}" = "yes"; then
10135 USE_SIGNAL_MODULE=""
10136 SIGNAL_OBJS=""
10137else
10138 USE_SIGNAL_MODULE="#"
10139 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10140fi
10141
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010142# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010143
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010144USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146
Martin v. Löwis11437992002-04-12 09:54:03 +000010147
10148# Templates for things AC_DEFINEd more than once.
10149# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010150
10151
Martin v. Löwis11437992002-04-12 09:54:03 +000010152
Matthias Kloseb9621712010-04-24 17:59:49 +000010153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10154$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010156# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010157if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158 withval=$with_threads;
10159fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010160
10161
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010162# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010165if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010166 withval=$with_thread; with_threads=$with_thread
10167fi
10168
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010169
10170if test -z "$with_threads"
10171then with_threads="yes"
10172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10174$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010175
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010176
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010177if test "$with_threads" = "no"
10178then
10179 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010180elif test "$ac_cv_pthread_is_default" = yes
10181then
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010183
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010184 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010186
10187 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010189elif test "$ac_cv_kpthread" = "yes"
10190then
10191 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010192 if test "$ac_cv_cxx_thread" = "yes"; then
10193 CXX="$CXX -Kpthread"
10194 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010196
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010197 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010198 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010199elif test "$ac_cv_kthread" = "yes"
10200then
10201 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010202 if test "$ac_cv_cxx_thread" = "yes"; then
10203 CXX="$CXX -Kthread"
10204 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010206
10207 posix_threads=yes
10208 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010209elif test "$ac_cv_pthread" = "yes"
10210then
10211 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010212 if test "$ac_cv_cxx_thread" = "yes"; then
10213 CXX="$CXX -pthread"
10214 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010215 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010216
10217 posix_threads=yes
10218 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010219else
10220 if test ! -z "$with_threads" -a -d "$with_threads"
10221 then LDFLAGS="$LDFLAGS -L$with_threads"
10222 fi
10223 if test ! -z "$withval" -a -d "$withval"
10224 then LDFLAGS="$LDFLAGS -L$withval"
10225 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010226
10227 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010228 # define _POSIX_THREADS in unistd.h. Some apparently don't
10229 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10231$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010233/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010234
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010235#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010236#ifdef _POSIX_THREADS
10237yes
10238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010239
10240_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010243 unistd_defines_pthreads=yes
10244else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010245 unistd_defines_pthreads=no
10246fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010247rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010248
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10250$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010251
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010253
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010254 # Just looking for pthread_create in libpthread is not enough:
10255 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10256 # So we really have to include pthread.h, and then link.
10257 _libs=$LIBS
10258 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10260$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010262/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010263
10264#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010265#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010266
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010267void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010268int
10269main ()
10270{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010271
10272pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 ;
10274 return 0;
10275}
10276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010277if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010278
Matthias Kloseb9621712010-04-24 17:59:49 +000010279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10280$as_echo "yes" >&6; }
10281 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010282
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010283 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010284 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010285else
Martin v. Löwis11437992002-04-12 09:54:03 +000010286
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010287 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010289if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010291
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010292 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010293 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010294else
Guido van Rossumad678af1998-10-02 14:42:15 +000010295
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10297$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010298if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010300else
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010302LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010306/* Override any GCC internal prototype to avoid an error.
10307 Use char because int might match the return type of a GCC
10308 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010309#ifdef __cplusplus
10310extern "C"
10311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010312char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010313int
10314main ()
10315{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010316return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 ;
10318 return 0;
10319}
10320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010323else
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010326rm -f core conftest.err conftest.$ac_objext \
10327 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010328LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10331$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010332if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010334
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010335 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010336 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010337 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010338else
Greg Steinadf63d62000-07-05 10:38:09 +000010339
Matthias Kloseb9621712010-04-24 17:59:49 +000010340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10341$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010342if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010344else
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010346LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010348/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350/* Override any GCC internal prototype to avoid an error.
10351 Use char because int might match the return type of a GCC
10352 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010353#ifdef __cplusplus
10354extern "C"
10355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010356char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010357int
10358main ()
10359{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 ;
10362 return 0;
10363}
10364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010365if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010367else
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010370rm -f core conftest.err conftest.$ac_objext \
10371 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010372LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10375$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010376if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010378
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010379 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010380 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010381 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010382else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010383
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10385$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010386if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010388else
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010390LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394/* Override any GCC internal prototype to avoid an error.
10395 Use char because int might match the return type of a GCC
10396 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010397#ifdef __cplusplus
10398extern "C"
10399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010400char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010401int
10402main ()
10403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010404return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 ;
10406 return 0;
10407}
10408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010409if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010411else
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010414rm -f core conftest.err conftest.$ac_objext \
10415 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010416LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10419$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010420if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010422
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010423 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010424 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010425 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010426else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10429$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010430if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010432else
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010434LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438/* Override any GCC internal prototype to avoid an error.
10439 Use char because int might match the return type of a GCC
10440 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010441#ifdef __cplusplus
10442extern "C"
10443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010444char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010445int
10446main ()
10447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ;
10450 return 0;
10451}
10452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010455else
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010458rm -f core conftest.err conftest.$ac_objext \
10459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010460LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10463$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010464if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010466
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010467 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010468 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010469 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010470else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010471
Martin v. Löwis130fb172001-07-19 11:00:41 +000010472 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010473fi
10474
Guido van Rossum627b2d71993-12-24 10:39:16 +000010475
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010476fi
10477
Guido van Rossum0be3e491997-05-22 20:33:33 +000010478fi
10479
Guido van Rossum49545951997-12-02 19:28:29 +000010480fi
10481
Guido van Rossumb93a8621998-05-07 13:27:32 +000010482fi
10483
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010485rm -f core conftest.err conftest.$ac_objext \
10486 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010487
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10489$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010490if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010492else
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010494LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498/* Override any GCC internal prototype to avoid an error.
10499 Use char because int might match the return type of a GCC
10500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010501#ifdef __cplusplus
10502extern "C"
10503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010504char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010505int
10506main ()
10507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010508return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 ;
10510 return 0;
10511}
10512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010513if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010514 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010515else
Matthias Kloseb9621712010-04-24 17:59:49 +000010516 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010518rm -f core conftest.err conftest.$ac_objext \
10519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010520LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10523$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010524if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010526
Martin v. Löwis130fb172001-07-19 11:00:41 +000010527 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010528 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010529 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010530fi
10531
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010532
Neal Norwitza978ab02002-11-02 16:58:05 +000010533 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10535$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010536if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010538else
Martin v. Löwis11437992002-04-12 09:54:03 +000010539 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010540LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544/* Override any GCC internal prototype to avoid an error.
10545 Use char because int might match the return type of a GCC
10546 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010547#ifdef __cplusplus
10548extern "C"
10549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010550char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010551int
10552main ()
10553{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010554return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 ;
10556 return 0;
10557}
10558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010559if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010561else
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010564rm -f core conftest.err conftest.$ac_objext \
10565 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010566LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10569$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010570if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010572
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010573 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010574 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010575 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010576fi
10577
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010578 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010579fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010580
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010581if test "$posix_threads" = "yes"; then
10582 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010583
Matthias Kloseb9621712010-04-24 17:59:49 +000010584$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010585
10586 fi
10587
10588 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10589 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010590 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010591$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010592
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010593 ;;
10594 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010595$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596
10597 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010598 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010599$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010600
10601 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010602 esac
10603
Matthias Kloseb9621712010-04-24 17:59:49 +000010604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10605$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010606 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010608else
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010610 ac_cv_pthread_system_supported=no
10611else
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010613/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010614
10615 #include <stdio.h>
10616 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010617 void *foo(void *parm) {
10618 return NULL;
10619 }
10620 main() {
10621 pthread_attr_t attr;
10622 pthread_t id;
10623 if (pthread_attr_init(&attr)) exit(-1);
10624 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10625 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10626 exit(0);
10627 }
10628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010629if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010630 ac_cv_pthread_system_supported=yes
10631else
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010636fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010638
Guido van Rossum627b2d71993-12-24 10:39:16 +000010639fi
10640
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10642$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010643 if test "$ac_cv_pthread_system_supported" = "yes"; then
10644
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010646
10647 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 for ac_func in pthread_sigmask
10649do :
10650 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010651if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010652 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010653#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010654_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010655 case $ac_sys_system in
10656 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010659
10660 ;;
10661 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010662fi
10663done
10664
Christian Heimesf77b4b22013-08-21 13:26:05 +020010665 for ac_func in pthread_atfork
10666do :
10667 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10668if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10669 cat >>confdefs.h <<_ACEOF
10670#define HAVE_PTHREAD_ATFORK 1
10671_ACEOF
10672
10673fi
10674done
10675
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676fi
10677
10678
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010679# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010680
Matthias Kloseb9621712010-04-24 17:59:49 +000010681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10682$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010684if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010686 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10688$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010689 ipv6=no
10690 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10692$as_echo "yes" >&6; }
10693 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010694
10695 ipv6=yes
10696 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010697 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010698else
Martin v. Löwis11437992002-04-12 09:54:03 +000010699
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010701/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010702 /* AF_INET6 available check */
10703#include <sys/types.h>
10704#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010705int
10706main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010708int domain = AF_INET6;
10709 ;
10710 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711}
Martin v. Löwis11437992002-04-12 09:54:03 +000010712_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010713if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10716$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010717 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010718
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010719else
Matthias Kloseb159a552010-04-25 21:00:44 +000010720
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10722$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010724
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010725fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010728if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10730$as_echo_n "checking if RFC2553 API is available... " >&6; }
10731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010733
10734 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010735#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010736int
10737main ()
10738{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010739struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010740 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010741 ;
10742 return 0;
10743}
Matthias Kloseb159a552010-04-25 21:00:44 +000010744
Martin v. Löwis11437992002-04-12 09:54:03 +000010745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010746if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010747
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010749$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010750 ipv6=yes
10751
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010752else
Matthias Kloseb159a552010-04-25 21:00:44 +000010753
10754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010755$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010756 ipv6=no
10757
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010760fi
10761
10762if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010764
10765fi
10766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767fi
10768
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769
10770ipv6type=unknown
10771ipv6lib=none
10772ipv6trylibc=no
10773
10774if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10776$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010777 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10778 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779 case $i in
10780 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010782/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010783
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784#include <netinet/in.h>
10785#ifdef IPV6_INRIA_VERSION
10786yes
10787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010788_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010791 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010793rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794
10795 ;;
10796 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010798/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010799
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800#include <netinet/in.h>
10801#ifdef __KAME__
10802yes
10803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807 ipv6type=$i;
10808 ipv6lib=inet6
10809 ipv6libdir=/usr/local/v6/lib
10810 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010812rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010813
10814 ;;
10815 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010817/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010818
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819#include <features.h>
10820#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10821yes
10822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010823_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826 ipv6type=$i;
10827 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010829rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010830
10831 ;;
10832 linux-inet6)
10833 if test -d /usr/inet6; then
10834 ipv6type=$i
10835 ipv6lib=inet6
10836 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010837 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838 fi
10839 ;;
10840 solaris)
10841 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010842 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843 ipv6type=$i
10844 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010845 fi
10846 fi
10847 ;;
10848 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010850/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010851
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852#include <sys/param.h>
10853#ifdef _TOSHIBA_INET6
10854yes
10855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010856_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010857if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859 ipv6type=$i;
10860 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010861 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010862fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010863rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010864
10865 ;;
10866 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010868/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010870#include </usr/local/v6/include/sys/v6config.h>
10871#ifdef __V6D__
10872yes
10873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010874_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877 ipv6type=$i;
10878 ipv6lib=v6;
10879 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010880 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010881fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010882rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010883
10884 ;;
10885 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010887/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010888
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010889#include <sys/param.h>
10890#ifdef _ZETA_MINAMI_INET6
10891yes
10892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010893_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896 ipv6type=$i;
10897 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010898 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010900rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901
10902 ;;
10903 esac
10904 if test "$ipv6type" != "unknown"; then
10905 break
10906 fi
10907 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10909$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910fi
10911
10912if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10913 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10914 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10915 echo "using lib$ipv6lib"
10916 else
10917 if test $ipv6trylibc = "yes"; then
10918 echo "using libc"
10919 else
10920 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10921 echo "You need to fetch lib$ipv6lib.a from appropriate"
10922 echo 'ipv6 kit and compile beforehand.'
10923 exit 1
10924 fi
10925 fi
10926fi
10927
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10929$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10931/* end confdefs.h. */
10932 /* CAN_RAW_FD_FRAMES available check */
10933#include <linux/can/raw.h>
10934int
10935main ()
10936{
10937int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10938 ;
10939 return 0;
10940}
10941_ACEOF
10942if ac_fn_c_try_compile "$LINENO"; then :
10943
10944
10945$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10946
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10948$as_echo "yes" >&6; }
10949
10950else
10951
10952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10953$as_echo "no" >&6; }
10954
10955fi
10956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10957
Matthias Kloseb9621712010-04-24 17:59:49 +000010958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10959$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010961/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010962
10963 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010964int
10965main ()
10966{
10967FSIORefNum fRef = 0
10968 ;
10969 return 0;
10970}
Matthias Kloseb159a552010-04-25 21:00:44 +000010971
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010973if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010974
Matthias Kloseb159a552010-04-25 21:00:44 +000010975
Matthias Kloseb9621712010-04-24 17:59:49 +000010976$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010977
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10979$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010980
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010981else
Matthias Kloseb159a552010-04-25 21:00:44 +000010982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10984$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010985
10986fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10988
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010989# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10991$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010994if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995 withval=$with_doc_strings;
10996fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010997
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010998
10999if test -z "$with_doc_strings"
11000then with_doc_strings="yes"
11001fi
11002if test "$with_doc_strings" != "no"
11003then
11004
Matthias Kloseb9621712010-04-24 17:59:49 +000011005$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011006
11007fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11009$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011010
Antoine Pitrou042b1282010-08-13 21:15:58 +000011011# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000011012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
11013$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011016if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011017 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011018if test "$withval" != no
11019then
11020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011022
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11024$as_echo "yes" >&6; }
11025else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11026$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011027fi
11028else
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11030$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031fi
11032
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011033
11034# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11036$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011039if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011040 withval=$with_pymalloc;
11041fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011042
Neil Schemenauera35c6882001-02-27 04:45:05 +000011043
Neil Schemenauer16c22972002-03-22 15:34:49 +000011044if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011045then
11046 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011047fi
11048if test "$with_pymalloc" != "no"
11049then
Martin v. Löwis11437992002-04-12 09:54:03 +000011050
Matthias Kloseb9621712010-04-24 17:59:49 +000011051$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011052
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011053 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11056$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011057
Benjamin Peterson05159c42009-12-03 03:01:27 +000011058# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11060$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011061
11062# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011063if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011064 withval=$with_valgrind;
11065else
11066 with_valgrind=no
11067fi
11068
Matthias Kloseb9621712010-04-24 17:59:49 +000011069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11070$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011071if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 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 +020011073if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011074
Matthias Kloseb9621712010-04-24 17:59:49 +000011075$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011076
11077else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011078 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011079
11080fi
11081
11082
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011083 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011084fi
11085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011086# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011087
Guido van Rossum98935bf2001-09-05 19:13:16 +000011088DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011089
Guido van Rossume97ee181999-12-20 21:27:22 +000011090# the dlopen() function means we might want to use dynload_shlib.o. some
11091# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011092for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011093do :
11094 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011095if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011096 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011097#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011098_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011099
Guido van Rossume97ee181999-12-20 21:27:22 +000011100fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011101done
Guido van Rossume97ee181999-12-20 21:27:22 +000011102
Michael W. Hudson54241132001-12-07 15:38:26 +000011103
Guido van Rossume97ee181999-12-20 21:27:22 +000011104# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11105# loading of modules.
11106
Matthias Kloseb9621712010-04-24 17:59:49 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11108$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011109if test -z "$DYNLOADFILE"
11110then
11111 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011112 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11113 if test "$ac_cv_func_dlopen" = yes
11114 then DYNLOADFILE="dynload_shlib.o"
11115 else DYNLOADFILE="dynload_aix.o"
11116 fi
11117 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011118 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011119 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11120 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011121 *)
11122 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11123 # out any dynamic loading
11124 if test "$ac_cv_func_dlopen" = yes
11125 then DYNLOADFILE="dynload_shlib.o"
11126 else DYNLOADFILE="dynload_stub.o"
11127 fi
11128 ;;
11129 esac
11130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11132$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011133if test "$DYNLOADFILE" != "dynload_stub.o"
11134then
Martin v. Löwis11437992002-04-12 09:54:03 +000011135
Matthias Kloseb9621712010-04-24 17:59:49 +000011136$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011137
11138fi
11139
Neil Schemenauer4e425612001-06-19 15:44:15 +000011140# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11141
Michael W. Hudson54241132001-12-07 15:38:26 +000011142
Matthias Kloseb9621712010-04-24 17:59:49 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11144$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011145if test -z "$MACHDEP_OBJS"
11146then
Jack Jansene578a632001-08-15 01:27:14 +000011147 MACHDEP_OBJS=$extra_machdep_objs
11148else
11149 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011150fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011151if test -z "$MACHDEP_OBJS"; then
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11153$as_echo "none" >&6; }
11154else
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11156$as_echo "$MACHDEP_OBJS" >&6; }
11157fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011158
Guido van Rossum627b2d71993-12-24 10:39:16 +000011159# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011160for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011161 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011162 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011163 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011164 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011165 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011166 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011167 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11168 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011169 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011170 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011171 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011172 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011173 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011174 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011175 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11176 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011177 sigaction sigaltstack siginterrupt sigpending sigrelse \
11178 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011179 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011180 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011181 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011182do :
11183 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11184ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011185if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011187#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011188_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011189
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011190fi
11191done
11192
Michael W. Hudson54241132001-12-07 15:38:26 +000011193
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011194ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11195 #include <dirent.h>
11196"
11197if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11198
11199$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11200
11201fi
11202
11203
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011204# For some functions, having a definition is not sufficient, since
11205# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11207$as_echo_n "checking for chroot... " >&6; }
11208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011209/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011210#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011211int
11212main ()
11213{
11214void *x=chroot
11215 ;
11216 return 0;
11217}
11218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011222
Matthias Kloseb159a552010-04-25 21:00:44 +000011223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011224$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011225else
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11227$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011228
11229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11232$as_echo_n "checking for link... " >&6; }
11233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011235#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011236int
11237main ()
11238{
11239void *x=link
11240 ;
11241 return 0;
11242}
11243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011245
Matthias Kloseb9621712010-04-24 17:59:49 +000011246$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011247
Matthias Kloseb159a552010-04-25 21:00:44 +000011248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011249$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011250else
Matthias Kloseb9621712010-04-24 17:59:49 +000011251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11252$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011253
11254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11257$as_echo_n "checking for symlink... " >&6; }
11258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011259/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011260#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011261int
11262main ()
11263{
11264void *x=symlink
11265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011272
Matthias Kloseb159a552010-04-25 21:00:44 +000011273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011274$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011275else
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011278
11279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11282$as_echo_n "checking for fchdir... " >&6; }
11283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011284/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011285#include <unistd.h>
11286int
11287main ()
11288{
11289void *x=fchdir
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öwisa64988c2003-09-20 15:30:20 +000011295
Matthias Kloseb9621712010-04-24 17:59:49 +000011296$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +000011303
11304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11307$as_echo_n "checking for fsync... " >&6; }
11308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011309/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011310#include <unistd.h>
11311int
11312main ()
11313{
11314void *x=fsync
11315 ;
11316 return 0;
11317}
11318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011320
Matthias Kloseb9621712010-04-24 17:59:49 +000011321$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011322
Matthias Kloseb159a552010-04-25 21:00:44 +000011323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011325else
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11327$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011328
11329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11332$as_echo_n "checking for fdatasync... " >&6; }
11333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011334/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011335#include <unistd.h>
11336int
11337main ()
11338{
11339void *x=fdatasync
11340 ;
11341 return 0;
11342}
11343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011345
Matthias Kloseb9621712010-04-24 17:59:49 +000011346$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011347
Matthias Kloseb159a552010-04-25 21:00:44 +000011348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011350else
Matthias Kloseb9621712010-04-24 17:59:49 +000011351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11352$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011353
11354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11357$as_echo_n "checking for epoll... " >&6; }
11358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011359/* end confdefs.h. */
11360#include <sys/epoll.h>
11361int
11362main ()
11363{
11364void *x=epoll_create
11365 ;
11366 return 0;
11367}
11368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011370
Matthias Kloseb9621712010-04-24 17:59:49 +000011371$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011372
Matthias Kloseb159a552010-04-25 21:00:44 +000011373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011374$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011375else
Matthias Kloseb9621712010-04-24 17:59:49 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11377$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011378
11379fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11382$as_echo_n "checking for epoll_create1... " >&6; }
11383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11384/* end confdefs.h. */
11385#include <sys/epoll.h>
11386int
11387main ()
11388{
11389void *x=epoll_create1
11390 ;
11391 return 0;
11392}
11393_ACEOF
11394if ac_fn_c_try_compile "$LINENO"; then :
11395
11396$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11397
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11399$as_echo "yes" >&6; }
11400else
11401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402$as_echo "no" >&6; }
11403
11404fi
11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11407$as_echo_n "checking for kqueue... " >&6; }
11408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011409/* end confdefs.h. */
11410
11411#include <sys/types.h>
11412#include <sys/event.h>
11413
11414int
11415main ()
11416{
11417int x=kqueue()
11418 ;
11419 return 0;
11420}
11421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011422if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011423
Matthias Kloseb9621712010-04-24 17:59:49 +000011424$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011425
Matthias Kloseb159a552010-04-25 21:00:44 +000011426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011427$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011428else
Matthias Kloseb9621712010-04-24 17:59:49 +000011429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11430$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011431
11432fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11435$as_echo_n "checking for prlimit... " >&6; }
11436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11437/* end confdefs.h. */
11438
11439#include <sys/time.h>
11440#include <sys/resource.h>
11441
11442int
11443main ()
11444{
11445void *x=prlimit
11446 ;
11447 return 0;
11448}
11449_ACEOF
11450if ac_fn_c_try_compile "$LINENO"; then :
11451
11452$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11453
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11455$as_echo "yes" >&6; }
11456else
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11458$as_echo "no" >&6; }
11459
11460fi
11461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11462
Martin v. Löwisd5843682002-11-21 20:41:28 +000011463# On some systems (eg. FreeBSD 5), we would find a definition of the
11464# functions ctermid_r, setgroups in the library, but no prototype
11465# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11466# address to avoid compiler warnings and potential miscompilations
11467# because of the missing prototypes.
11468
Matthias Kloseb9621712010-04-24 17:59:49 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11470$as_echo_n "checking for ctermid_r... " >&6; }
11471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011472/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011473
Martin v. Löwisd5843682002-11-21 20:41:28 +000011474#include <stdio.h>
11475
Martin v. Löwisd5843682002-11-21 20:41:28 +000011476int
11477main ()
11478{
11479void* p = ctermid_r
11480 ;
11481 return 0;
11482}
11483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011485
Matthias Kloseb9621712010-04-24 17:59:49 +000011486$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011487
Matthias Kloseb159a552010-04-25 21:00:44 +000011488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011489$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011490else
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11492$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011493
11494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11496
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11498$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011499if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011500 $as_echo_n "(cached) " >&6
11501else
11502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011503/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011504#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011505int
11506main ()
11507{
11508void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011509
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011510 ;
11511 return 0;
11512}
11513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011514if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011515 ac_cv_flock_decl=yes
11516else
11517 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011518
11519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011521
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011522fi
11523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11524$as_echo "$ac_cv_flock_decl" >&6; }
11525if test "x${ac_cv_flock_decl}" = xyes; then
11526 for ac_func in flock
11527do :
11528 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011529if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011530 cat >>confdefs.h <<_ACEOF
11531#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011532_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011533
Antoine Pitroua3000072010-09-07 14:52:42 +000011534else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011536$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011537if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011538 $as_echo_n "(cached) " >&6
11539else
11540 ac_check_lib_save_LIBS=$LIBS
11541LIBS="-lbsd $LIBS"
11542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11543/* end confdefs.h. */
11544
11545/* Override any GCC internal prototype to avoid an error.
11546 Use char because int might match the return type of a GCC
11547 builtin and then its argument prototype would still apply. */
11548#ifdef __cplusplus
11549extern "C"
11550#endif
11551char flock ();
11552int
11553main ()
11554{
11555return flock ();
11556 ;
11557 return 0;
11558}
11559_ACEOF
11560if ac_fn_c_try_link "$LINENO"; then :
11561 ac_cv_lib_bsd_flock=yes
11562else
11563 ac_cv_lib_bsd_flock=no
11564fi
11565rm -f core conftest.err conftest.$ac_objext \
11566 conftest$ac_exeext conftest.$ac_ext
11567LIBS=$ac_check_lib_save_LIBS
11568fi
11569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11570$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011571if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011572 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011573
11574
11575$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11576
11577
11578fi
11579
11580
11581fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011582done
11583
Antoine Pitroua3000072010-09-07 14:52:42 +000011584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585
Matthias Kloseb9621712010-04-24 17:59:49 +000011586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11587$as_echo_n "checking for getpagesize... " >&6; }
11588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011589/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011590
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011591#include <unistd.h>
11592
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011593int
11594main ()
11595{
11596void* p = getpagesize
11597 ;
11598 return 0;
11599}
11600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011602
Matthias Kloseb9621712010-04-24 17:59:49 +000011603$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011604
Matthias Kloseb159a552010-04-25 21:00:44 +000011605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011606$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011607else
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11609$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011610
11611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011613
Victor Stinner984890f2011-11-24 13:53:38 +010011614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11615$as_echo_n "checking for broken unsetenv... " >&6; }
11616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11617/* end confdefs.h. */
11618
11619#include <stdlib.h>
11620
11621int
11622main ()
11623{
11624int res = unsetenv("DUMMY")
11625 ;
11626 return 0;
11627}
11628_ACEOF
11629if ac_fn_c_try_compile "$LINENO"; then :
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11631$as_echo "no" >&6; }
11632else
11633
11634$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11635
11636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11637$as_echo "yes" >&6; }
11638
11639fi
11640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11641
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011642for ac_prog in true
11643do
11644 # Extract the first word of "$ac_prog", so it can be a program name with args.
11645set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11647$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011648if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011650else
11651 if test -n "$TRUE"; then
11652 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11653else
11654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11655for as_dir in $PATH
11656do
11657 IFS=$as_save_IFS
11658 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011659 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011661 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011662 $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 +000011663 break 2
11664 fi
11665done
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011668
11669fi
11670fi
11671TRUE=$ac_cv_prog_TRUE
11672if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11674$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011675else
Matthias Kloseb9621712010-04-24 17:59:49 +000011676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11677$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011678fi
11679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011680
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011681 test -n "$TRUE" && break
11682done
11683test -n "$TRUE" || TRUE="/bin/true"
11684
11685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11687$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011688if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011690else
11691 ac_check_lib_save_LIBS=$LIBS
11692LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011694/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696/* Override any GCC internal prototype to avoid an error.
11697 Use char because int might match the return type of a GCC
11698 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011699#ifdef __cplusplus
11700extern "C"
11701#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011702char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011703int
11704main ()
11705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011706return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011707 ;
11708 return 0;
11709}
11710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011712 ac_cv_lib_c_inet_aton=yes
11713else
Matthias Kloseb9621712010-04-24 17:59:49 +000011714 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011715fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011716rm -f core conftest.err conftest.$ac_objext \
11717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011718LIBS=$ac_check_lib_save_LIBS
11719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11721$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011722if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011723 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011724else
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11726$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011727if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011728 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011729else
11730 ac_check_lib_save_LIBS=$LIBS
11731LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011733/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011735/* Override any GCC internal prototype to avoid an error.
11736 Use char because int might match the return type of a GCC
11737 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011738#ifdef __cplusplus
11739extern "C"
11740#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011741char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011742int
11743main ()
11744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011745return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011746 ;
11747 return 0;
11748}
11749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011751 ac_cv_lib_resolv_inet_aton=yes
11752else
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011755rm -f core conftest.err conftest.$ac_objext \
11756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011757LIBS=$ac_check_lib_save_LIBS
11758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11760$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011761if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011762 cat >>confdefs.h <<_ACEOF
11763#define HAVE_LIBRESOLV 1
11764_ACEOF
11765
11766 LIBS="-lresolv $LIBS"
11767
11768fi
11769
11770
11771fi
11772
11773
Christian Heimesd0764e22007-12-04 15:00:33 +000011774# On Tru64, chflags seems to be present, but calling it will
11775# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11777$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011778if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011780else
Matthias Kloseb9621712010-04-24 17:59:49 +000011781 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011782 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011785/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011786
Christian Heimesd0764e22007-12-04 15:00:33 +000011787#include <sys/stat.h>
11788#include <unistd.h>
11789int main(int argc, char*argv[])
11790{
11791 if(chflags(argv[0], 0) != 0)
11792 return 1;
11793 return 0;
11794}
Ned Deily3eb67d52011-06-28 00:00:28 -070011795
Christian Heimesd0764e22007-12-04 15:00:33 +000011796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011797if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011798 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011799else
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011804fi
11805
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011806
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11809$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011810if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011812if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011813 ac_cv_have_chflags="yes"
11814else
11815 ac_cv_have_chflags="no"
11816fi
11817
11818fi
11819if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011820
Matthias Kloseb9621712010-04-24 17:59:49 +000011821$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011822
11823fi
11824
Matthias Kloseb9621712010-04-24 17:59:49 +000011825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11826$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011827if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011829else
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011831 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011832else
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011834/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011835
Christian Heimesd0764e22007-12-04 15:00:33 +000011836#include <sys/stat.h>
11837#include <unistd.h>
11838int main(int argc, char*argv[])
11839{
11840 if(lchflags(argv[0], 0) != 0)
11841 return 1;
11842 return 0;
11843}
Ned Deily3eb67d52011-06-28 00:00:28 -070011844
Christian Heimesd0764e22007-12-04 15:00:33 +000011845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011846if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011847 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011848else
Matthias Kloseb9621712010-04-24 17:59:49 +000011849 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11852 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011853fi
11854
11855
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11858$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011859if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011860 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011861if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011862 ac_cv_have_lchflags="yes"
11863else
11864 ac_cv_have_lchflags="no"
11865fi
11866
11867fi
11868if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011869
Matthias Kloseb9621712010-04-24 17:59:49 +000011870$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011871
11872fi
11873
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011874case $ac_sys_system/$ac_sys_release in
11875Darwin/*)
11876 _CUR_CFLAGS="${CFLAGS}"
11877 _CUR_LDFLAGS="${LDFLAGS}"
11878 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11879 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11880 ;;
11881esac
11882
Matthias Kloseb9621712010-04-24 17:59:49 +000011883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11884$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011885if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011887else
11888 ac_check_lib_save_LIBS=$LIBS
11889LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011891/* end confdefs.h. */
11892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893/* Override any GCC internal prototype to avoid an error.
11894 Use char because int might match the return type of a GCC
11895 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011896#ifdef __cplusplus
11897extern "C"
11898#endif
11899char inflateCopy ();
11900int
11901main ()
11902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011903return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011904 ;
11905 return 0;
11906}
11907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011908if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011909 ac_cv_lib_z_inflateCopy=yes
11910else
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011913rm -f core conftest.err conftest.$ac_objext \
11914 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011915LIBS=$ac_check_lib_save_LIBS
11916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11918$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011919if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011920
Matthias Kloseb9621712010-04-24 17:59:49 +000011921$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011922
11923fi
11924
11925
11926case $ac_sys_system/$ac_sys_release in
11927Darwin/*)
11928 CFLAGS="${_CUR_CFLAGS}"
11929 LDFLAGS="${_CUR_LDFLAGS}"
11930 ;;
11931esac
11932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11934$as_echo_n "checking for hstrerror... " >&6; }
11935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011936/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011937
Martin v. Löwise9416172003-05-03 10:12:45 +000011938#include <netdb.h>
11939
Martin v. Löwise9416172003-05-03 10:12:45 +000011940int
11941main ()
11942{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011943void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011944 ;
11945 return 0;
11946}
11947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011949
Matthias Kloseb9621712010-04-24 17:59:49 +000011950$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011951
Matthias Kloseb159a552010-04-25 21:00:44 +000011952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011953$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011954else
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11956$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011957
11958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011959rm -f core conftest.err conftest.$ac_objext \
11960 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11963$as_echo_n "checking for inet_aton... " >&6; }
11964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011965/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011966
Martin v. Löwis86d66262006-02-17 08:40:11 +000011967#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011968#include <sys/socket.h>
11969#include <netinet/in.h>
11970#include <arpa/inet.h>
11971
Martin v. Löwise9416172003-05-03 10:12:45 +000011972int
11973main ()
11974{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011975void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011976 ;
11977 return 0;
11978}
11979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011980if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011981
Matthias Kloseb9621712010-04-24 17:59:49 +000011982$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011983
Matthias Kloseb159a552010-04-25 21:00:44 +000011984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011985$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011986else
Matthias Kloseb9621712010-04-24 17:59:49 +000011987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11988$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011989
11990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011991rm -f core conftest.err conftest.$ac_objext \
11992 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011993
Matthias Kloseb9621712010-04-24 17:59:49 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11995$as_echo_n "checking for inet_pton... " >&6; }
11996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011997/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011998
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011999#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012000#include <sys/socket.h>
12001#include <netinet/in.h>
12002#include <arpa/inet.h>
12003
Martin v. Löwise9416172003-05-03 10:12:45 +000012004int
12005main ()
12006{
12007void* p = inet_pton
12008 ;
12009 return 0;
12010}
12011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012013
Matthias Kloseb9621712010-04-24 17:59:49 +000012014$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012015
Matthias Kloseb159a552010-04-25 21:00:44 +000012016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012017$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012018else
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12020$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012021
12022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012024
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012025# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12027$as_echo_n "checking for setgroups... " >&6; }
12028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012029/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012030
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012031#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012032#ifdef HAVE_GRP_H
12033#include <grp.h>
12034#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012035
Martin v. Löwisd5843682002-11-21 20:41:28 +000012036int
12037main ()
12038{
12039void* p = setgroups
12040 ;
12041 return 0;
12042}
12043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012045
Matthias Kloseb9621712010-04-24 17:59:49 +000012046$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012047
Matthias Kloseb159a552010-04-25 21:00:44 +000012048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012049$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012050else
Matthias Kloseb9621712010-04-24 17:59:49 +000012051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12052$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012053
12054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012056
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012057# check for openpty and forkpty
12058
12059for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012060do :
12061 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012062if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012064#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012065_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012066
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012067else
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12069$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012070if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012072else
Martin v. Löwis11437992002-04-12 09:54:03 +000012073 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012074LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078/* Override any GCC internal prototype to avoid an error.
12079 Use char because int might match the return type of a GCC
12080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012081#ifdef __cplusplus
12082extern "C"
12083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012084char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012085int
12086main ()
12087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012088return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012089 ;
12090 return 0;
12091}
12092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012093if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012094 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012098rm -f core conftest.err conftest.$ac_objext \
12099 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012100LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12103$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012104if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012106 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012107else
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12109$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012110if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012112else
12113 ac_check_lib_save_LIBS=$LIBS
12114LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012116/* end confdefs.h. */
12117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118/* Override any GCC internal prototype to avoid an error.
12119 Use char because int might match the return type of a GCC
12120 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012121#ifdef __cplusplus
12122extern "C"
12123#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012124char openpty ();
12125int
12126main ()
12127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012129 ;
12130 return 0;
12131}
12132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012134 ac_cv_lib_bsd_openpty=yes
12135else
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012138rm -f core conftest.err conftest.$ac_objext \
12139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012140LIBS=$ac_check_lib_save_LIBS
12141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12143$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012146 LIBS="$LIBS -lbsd"
12147fi
12148
12149
12150fi
12151
Fred Drake8cef4cf2000-06-28 16:40:38 +000012152
12153fi
12154done
12155
12156for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012157do :
12158 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012159if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012161#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012162_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012163
Fred Drake8cef4cf2000-06-28 16:40:38 +000012164else
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12166$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012167if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012169else
Martin v. Löwis11437992002-04-12 09:54:03 +000012170 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012171LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012175/* Override any GCC internal prototype to avoid an error.
12176 Use char because int might match the return type of a GCC
12177 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012178#ifdef __cplusplus
12179extern "C"
12180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012181char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012182int
12183main ()
12184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012185return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 ;
12187 return 0;
12188}
12189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012190if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012192else
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012195rm -f core conftest.err conftest.$ac_objext \
12196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012197LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12200$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012201if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012203 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012204else
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12206$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012207if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012208 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012209else
12210 ac_check_lib_save_LIBS=$LIBS
12211LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012213/* end confdefs.h. */
12214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215/* Override any GCC internal prototype to avoid an error.
12216 Use char because int might match the return type of a GCC
12217 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012218#ifdef __cplusplus
12219extern "C"
12220#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012221char forkpty ();
12222int
12223main ()
12224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012226 ;
12227 return 0;
12228}
12229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012230if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012231 ac_cv_lib_bsd_forkpty=yes
12232else
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012235rm -f core conftest.err conftest.$ac_objext \
12236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012237LIBS=$ac_check_lib_save_LIBS
12238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12240$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012241if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012243 LIBS="$LIBS -lbsd"
12244fi
12245
12246
12247fi
12248
Fred Drake8cef4cf2000-06-28 16:40:38 +000012249
12250fi
12251done
12252
Jack Jansendd19cf82001-12-06 22:36:17 +000012253
Christian Heimesb186d002008-03-18 15:15:01 +000012254# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012255for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012256do :
12257 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012258if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012259 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012260#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012261_ACEOF
12262
12263fi
12264done
12265
12266
Michael W. Hudson54241132001-12-07 15:38:26 +000012267# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012268for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012269do :
12270 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12271ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012272if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012274#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012275_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012276
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012277fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012278done
12279
Michael W. Hudson54241132001-12-07 15:38:26 +000012280
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012281ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012282if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012283 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012284
Martin v. Löwis1142de32002-03-29 16:28:31 +000012285else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012287 *" dup2.$ac_objext "* ) ;;
12288 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012290esac
12291
Martin v. Löwis1142de32002-03-29 16:28:31 +000012292fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012293
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012294ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012295if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012296 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12297
12298else
12299 case " $LIBOBJS " in
12300 *" strdup.$ac_objext "* ) ;;
12301 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12302 ;;
12303esac
12304
12305fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012306
12307
12308for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012309do :
12310 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012311if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012313#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012316/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012317#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012318int
12319main ()
12320{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012321getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012322 ;
12323 return 0;
12324}
12325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012327
Matthias Kloseb9621712010-04-24 17:59:49 +000012328$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012329
Guido van Rossum627b2d71993-12-24 10:39:16 +000012330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012332
Guido van Rossum627b2d71993-12-24 10:39:16 +000012333fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012334done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012335
Jack Jansen150753c2003-03-29 22:07:47 +000012336for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012337do :
12338 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012339if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012340 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012344/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012345#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012346int
12347main ()
12348{
12349setpgrp(0,0);
12350 ;
12351 return 0;
12352}
12353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012354if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012357
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012360
12361fi
12362done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012363
Thomas Wouters3a584202000-08-05 23:28:51 +000012364for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012365do :
12366 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012367if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012369#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012372/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012373#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012374int
12375main ()
12376{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012377gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012378 ;
12379 return 0;
12380}
12381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012382if ac_fn_c_try_compile "$LINENO"; then :
12383
Guido van Rossum627b2d71993-12-24 10:39:16 +000012384else
Skip Montanaro6dead952003-09-25 14:50:04 +000012385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012387
Martin v. Löwis11437992002-04-12 09:54:03 +000012388
Guido van Rossum627b2d71993-12-24 10:39:16 +000012389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012391
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012392fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012393done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012394
Michael W. Hudson54241132001-12-07 15:38:26 +000012395
Victor Stinnere0be4232011-10-25 13:06:09 +020012396for ac_func in clock_gettime
12397do :
12398 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12399if test "x$ac_cv_func_clock_gettime" = xyes; then :
12400 cat >>confdefs.h <<_ACEOF
12401#define HAVE_CLOCK_GETTIME 1
12402_ACEOF
12403
12404else
12405
12406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12407$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12408if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12409 $as_echo_n "(cached) " >&6
12410else
12411 ac_check_lib_save_LIBS=$LIBS
12412LIBS="-lrt $LIBS"
12413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12414/* end confdefs.h. */
12415
12416/* Override any GCC internal prototype to avoid an error.
12417 Use char because int might match the return type of a GCC
12418 builtin and then its argument prototype would still apply. */
12419#ifdef __cplusplus
12420extern "C"
12421#endif
12422char clock_gettime ();
12423int
12424main ()
12425{
12426return clock_gettime ();
12427 ;
12428 return 0;
12429}
12430_ACEOF
12431if ac_fn_c_try_link "$LINENO"; then :
12432 ac_cv_lib_rt_clock_gettime=yes
12433else
12434 ac_cv_lib_rt_clock_gettime=no
12435fi
12436rm -f core conftest.err conftest.$ac_objext \
12437 conftest$ac_exeext conftest.$ac_ext
12438LIBS=$ac_check_lib_save_LIBS
12439fi
12440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12441$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12442if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12443
Victor Stinner7efb8332014-08-29 15:41:08 +020012444 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012445 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12446
12447
12448$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12449
12450
12451fi
12452
12453
12454fi
12455done
12456
12457
12458for ac_func in clock_getres
12459do :
12460 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12461if test "x$ac_cv_func_clock_getres" = xyes; then :
12462 cat >>confdefs.h <<_ACEOF
12463#define HAVE_CLOCK_GETRES 1
12464_ACEOF
12465
12466else
12467
12468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12469$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12470if ${ac_cv_lib_rt_clock_getres+:} false; then :
12471 $as_echo_n "(cached) " >&6
12472else
12473 ac_check_lib_save_LIBS=$LIBS
12474LIBS="-lrt $LIBS"
12475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12476/* end confdefs.h. */
12477
12478/* Override any GCC internal prototype to avoid an error.
12479 Use char because int might match the return type of a GCC
12480 builtin and then its argument prototype would still apply. */
12481#ifdef __cplusplus
12482extern "C"
12483#endif
12484char clock_getres ();
12485int
12486main ()
12487{
12488return clock_getres ();
12489 ;
12490 return 0;
12491}
12492_ACEOF
12493if ac_fn_c_try_link "$LINENO"; then :
12494 ac_cv_lib_rt_clock_getres=yes
12495else
12496 ac_cv_lib_rt_clock_getres=no
12497fi
12498rm -f core conftest.err conftest.$ac_objext \
12499 conftest$ac_exeext conftest.$ac_ext
12500LIBS=$ac_check_lib_save_LIBS
12501fi
12502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12503$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12504if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12505
12506 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12507
12508
12509fi
12510
12511
12512fi
12513done
12514
12515
Matthias Kloseb9621712010-04-24 17:59:49 +000012516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12517$as_echo_n "checking for major... " >&6; }
12518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012519/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012520
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012521#if defined(MAJOR_IN_MKDEV)
12522#include <sys/mkdev.h>
12523#elif defined(MAJOR_IN_SYSMACROS)
12524#include <sys/sysmacros.h>
12525#else
12526#include <sys/types.h>
12527#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012528
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012529int
12530main ()
12531{
12532
12533 makedev(major(0),minor(0));
12534
12535 ;
12536 return 0;
12537}
12538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012539if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012540
12541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012543
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12545$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012546
12547else
Skip Montanaro6dead952003-09-25 14:50:04 +000012548
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12550$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012551
12552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012553rm -f core conftest.err conftest.$ac_objext \
12554 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012555
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012556# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012557# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12559$as_echo_n "checking for getaddrinfo... " >&6; }
12560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012561/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012562
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012563#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012564#include <sys/socket.h>
12565#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012566#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012567
Martin v. Löwis11437992002-04-12 09:54:03 +000012568int
12569main ()
12570{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012571getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012572 ;
12573 return 0;
12574}
12575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012576if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012577 have_getaddrinfo=yes
12578else
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012581rm -f core conftest.err conftest.$ac_objext \
12582 conftest$ac_exeext conftest.$ac_ext
12583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12584$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012585if test $have_getaddrinfo = yes
12586then
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12588$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012589 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012590 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012591else
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012593
12594if test "${enable_ipv6+set}" = set; then
12595 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12596else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012597 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012598fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012599else
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012601/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012602
Stefan Krah19c21392012-11-22 23:47:32 +010012603#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012604#include <sys/types.h>
12605#include <netdb.h>
12606#include <string.h>
12607#include <sys/socket.h>
12608#include <netinet/in.h>
12609
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012610int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012611{
12612 int passive, gaierr, inet4 = 0, inet6 = 0;
12613 struct addrinfo hints, *ai, *aitop;
12614 char straddr[INET6_ADDRSTRLEN], strport[16];
12615
12616 for (passive = 0; passive <= 1; passive++) {
12617 memset(&hints, 0, sizeof(hints));
12618 hints.ai_family = AF_UNSPEC;
12619 hints.ai_flags = passive ? AI_PASSIVE : 0;
12620 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012621 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012622 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12623 (void)gai_strerror(gaierr);
12624 goto bad;
12625 }
12626 for (ai = aitop; ai; ai = ai->ai_next) {
12627 if (ai->ai_addr == NULL ||
12628 ai->ai_addrlen == 0 ||
12629 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12630 straddr, sizeof(straddr), strport, sizeof(strport),
12631 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12632 goto bad;
12633 }
12634 switch (ai->ai_family) {
12635 case AF_INET:
12636 if (strcmp(strport, "54321") != 0) {
12637 goto bad;
12638 }
12639 if (passive) {
12640 if (strcmp(straddr, "0.0.0.0") != 0) {
12641 goto bad;
12642 }
12643 } else {
12644 if (strcmp(straddr, "127.0.0.1") != 0) {
12645 goto bad;
12646 }
12647 }
12648 inet4++;
12649 break;
12650 case AF_INET6:
12651 if (strcmp(strport, "54321") != 0) {
12652 goto bad;
12653 }
12654 if (passive) {
12655 if (strcmp(straddr, "::") != 0) {
12656 goto bad;
12657 }
12658 } else {
12659 if (strcmp(straddr, "::1") != 0) {
12660 goto bad;
12661 }
12662 }
12663 inet6++;
12664 break;
12665 case AF_UNSPEC:
12666 goto bad;
12667 break;
12668 default:
12669 /* another family support? */
12670 break;
12671 }
12672 }
12673 }
12674
12675 if (!(inet4 == 0 || inet4 == 2))
12676 goto bad;
12677 if (!(inet6 == 0 || inet6 == 2))
12678 goto bad;
12679
12680 if (aitop)
12681 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012682 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012683
12684 bad:
12685 if (aitop)
12686 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012687 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012688}
12689
Martin v. Löwis11437992002-04-12 09:54:03 +000012690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012691if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012692 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012693else
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012700fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012701
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012703
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12705$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12706
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012707if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012708then
12709 if test $ipv6 = yes
12710 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012711 echo 'Fatal: You must get working getaddrinfo() function.'
12712 echo ' or you can specify "--disable-ipv6"'.
12713 exit 1
12714 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012715else
Martin v. Löwis11437992002-04-12 09:54:03 +000012716
Matthias Kloseb9621712010-04-24 17:59:49 +000012717$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012718
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012719fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012720
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012721for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012722do :
12723 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012724if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012725 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012726#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012727_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012728
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012729fi
12730done
12731
Michael W. Hudson54241132001-12-07 15:38:26 +000012732
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012733# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12735$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012736if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012738else
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012740/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012741#include <sys/types.h>
12742#include <sys/time.h>
12743#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012744
Martin v. Löwis11437992002-04-12 09:54:03 +000012745int
12746main ()
12747{
12748if ((struct tm *) 0)
12749return 0;
12750 ;
12751 return 0;
12752}
12753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012754if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012755 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012756else
Matthias Kloseb9621712010-04-24 17:59:49 +000012757 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12762$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012763if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012766
12767fi
12768
Matthias Kloseb9621712010-04-24 17:59:49 +000012769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12770$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012771if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012773else
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012775/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012776#include <sys/types.h>
12777#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012778
Martin v. Löwis11437992002-04-12 09:54:03 +000012779int
12780main ()
12781{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782struct tm tm;
12783 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 ;
12786 return 0;
12787}
12788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012789if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012790 ac_cv_struct_tm=time.h
12791else
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12797$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012798if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012801
12802fi
12803
Matthias Kloseb9621712010-04-24 17:59:49 +000012804ac_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 +000012805#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
Matthias Kloseb9621712010-04-24 17:59:49 +000012807"
Victor Stinnere0be4232011-10-25 13:06:09 +020012808if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012809
12810cat >>confdefs.h <<_ACEOF
12811#define HAVE_STRUCT_TM_TM_ZONE 1
12812_ACEOF
12813
12814
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012815fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012816
Martin v. Löwis11437992002-04-12 09:54:03 +000012817if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12818
Matthias Kloseb9621712010-04-24 17:59:49 +000012819$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012820
12821else
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12823"
Victor Stinnere0be4232011-10-25 13:06:09 +020012824if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826else
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828fi
12829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012830cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012831#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832_ACEOF
12833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12835$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012836if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012837 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838else
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012840/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012841#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842#if !HAVE_DECL_TZNAME
12843extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012845
Martin v. Löwis11437992002-04-12 09:54:03 +000012846int
12847main ()
12848{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012849return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012850 ;
12851 return 0;
12852}
12853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012854if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012855 ac_cv_var_tzname=yes
12856else
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012859rm -f core conftest.err conftest.$ac_objext \
12860 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12863$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012864 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012865
Matthias Kloseb9621712010-04-24 17:59:49 +000012866$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012867
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012868 fi
12869fi
12870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871ac_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 +020012872if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012873
12874cat >>confdefs.h <<_ACEOF
12875#define HAVE_STRUCT_STAT_ST_RDEV 1
12876_ACEOF
12877
12878
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012879fi
12880
Matthias Kloseb9621712010-04-24 17:59:49 +000012881ac_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 +020012882if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012883
Martin v. Löwis11437992002-04-12 09:54:03 +000012884cat >>confdefs.h <<_ACEOF
12885#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12886_ACEOF
12887
12888
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012889fi
12890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891ac_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 +020012892if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012893
12894cat >>confdefs.h <<_ACEOF
12895#define HAVE_STRUCT_STAT_ST_FLAGS 1
12896_ACEOF
12897
12898
12899fi
12900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901ac_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 +020012902if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012903
12904cat >>confdefs.h <<_ACEOF
12905#define HAVE_STRUCT_STAT_ST_GEN 1
12906_ACEOF
12907
12908
12909fi
12910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911ac_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 +020012912if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012913
12914cat >>confdefs.h <<_ACEOF
12915#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12916_ACEOF
12917
12918
12919fi
12920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921ac_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 +020012922if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012923
Martin v. Löwis11437992002-04-12 09:54:03 +000012924cat >>confdefs.h <<_ACEOF
12925#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12926_ACEOF
12927
12928
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012929fi
12930
Stefan Krah267b6392016-04-26 01:09:18 +020012931ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12932 #include <sys/types.h>
12933 #include <pwd.h>
12934
12935"
12936if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12937
12938cat >>confdefs.h <<_ACEOF
12939#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12940_ACEOF
12941
12942
12943fi
12944ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12945 #include <sys/types.h>
12946 #include <pwd.h>
12947
12948"
12949if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12950
12951cat >>confdefs.h <<_ACEOF
12952#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12953_ACEOF
12954
12955
12956fi
12957
Michael W. Hudson54241132001-12-07 15:38:26 +000012958
Matthias Kloseb9621712010-04-24 17:59:49 +000012959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12960$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012961if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012962 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012963else
Matthias Kloseb159a552010-04-25 21:00:44 +000012964
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012966/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012967#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012968int
12969main ()
12970{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012971return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012972 ;
12973 return 0;
12974}
12975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012976if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012977 ac_cv_header_time_altzone=yes
12978else
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983fi
12984
Matthias Kloseb9621712010-04-24 17:59:49 +000012985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12986$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012990
12991fi
12992
Guido van Rossumda88dad1995-01-26 00:46:29 +000012993was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12995$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012997/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012998
12999#include <sys/types.h>
13000#include <sys/select.h>
13001#include <sys/time.h>
13002
Martin v. Löwis11437992002-04-12 09:54:03 +000013003int
13004main ()
13005{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013006;
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 ;
13008 return 0;
13009}
13010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013011if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013012
13013
Matthias Kloseb9621712010-04-24 17:59:49 +000013014$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013015
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013016 was_it_defined=yes
13017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13021$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13024$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013025if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013026 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013027else
Matthias Kloseb9621712010-04-24 17:59:49 +000013028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013029/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013030#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013031int
13032main ()
13033{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013034struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013035 ;
13036 return 0;
13037}
13038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013039if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013040 ac_cv_struct_addrinfo=yes
13041else
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13045fi
13046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13048$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013049if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013050
Matthias Kloseb9621712010-04-24 17:59:49 +000013051$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013052
13053fi
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13056$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013057if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013061/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013062
13063# include <sys/types.h>
13064# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013065int
13066main ()
13067{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013068struct sockaddr_storage s
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 :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013074 ac_cv_struct_sockaddr_storage=yes
13075else
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13079fi
13080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13082$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013083if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013086
13087fi
13088
Guido van Rossum627b2d71993-12-24 10:39:16 +000013089# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13092$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013093if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013098$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013099int
13100main ()
13101{
13102static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013103test_array [0] = 0;
13104return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013105
13106 ;
13107 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013108}
Martin v. Löwis11437992002-04-12 09:54:03 +000013109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013110if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013111 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013112else
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13118$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013119if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013120 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013121
13122fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013123
Matthias Kloseb9621712010-04-24 17:59:49 +000013124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13125$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013126if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013128else
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013130/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013131
Martin v. Löwis11437992002-04-12 09:54:03 +000013132int
13133main ()
13134{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013135
Martin v. Löwis11437992002-04-12 09:54:03 +000013136#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013137 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013138 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013139 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013141 char const *const *pcpcc;
13142 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013143 /* NEC SVR4.0.2 mips cc rejects this. */
13144 struct point {int x, y;};
13145 static struct point const zero = {0,0};
13146 /* AIX XL C 1.02.0.0 rejects this.
13147 It does not let you subtract one const X* pointer from another in
13148 an arm of an if-expression whose if-part is not a constant
13149 expression */
13150 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013151 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013152 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013153 ++pcpcc;
13154 ppc = (char**) pcpcc;
13155 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013156 { /* SCO 3.2v4 cc rejects this sort of thing. */
13157 char tx;
13158 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013160
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013162 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013163 }
13164 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13165 int x[] = {25, 17};
13166 const int *foo = &x[0];
13167 ++foo;
13168 }
13169 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13170 typedef const int *iptr;
13171 iptr p = 0;
13172 ++p;
13173 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013174 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013175 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013176 struct s { int j; const int *ap[3]; } bx;
13177 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 }
13179 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13180 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013181 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013182 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013183 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013184#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013185
Martin v. Löwis11437992002-04-12 09:54:03 +000013186 ;
13187 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013188}
Martin v. Löwis11437992002-04-12 09:54:03 +000013189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013190if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013191 ac_cv_c_const=yes
13192else
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13198$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013199if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013202
13203fi
13204
Michael W. Hudson54241132001-12-07 15:38:26 +000013205
Guido van Rossumda88dad1995-01-26 00:46:29 +000013206works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13208$as_echo_n "checking for working volatile... " >&6; }
13209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013210/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013211
Martin v. Löwis11437992002-04-12 09:54:03 +000013212int
13213main ()
13214{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013215volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013216 ;
13217 return 0;
13218}
13219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013220if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013221 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013222else
Skip Montanaro6dead952003-09-25 14:50:04 +000013223
Matthias Kloseb9621712010-04-24 17:59:49 +000013224$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013225
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013226
Guido van Rossum627b2d71993-12-24 10:39:16 +000013227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13230$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013231
Guido van Rossumda88dad1995-01-26 00:46:29 +000013232works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13234$as_echo_n "checking for working signed char... " >&6; }
13235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013236/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013237
Martin v. Löwis11437992002-04-12 09:54:03 +000013238int
13239main ()
13240{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013241signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013242 ;
13243 return 0;
13244}
13245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013246if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013247 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013248else
Skip Montanaro6dead952003-09-25 14:50:04 +000013249
Matthias Kloseb9621712010-04-24 17:59:49 +000013250$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013251
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013252
Guido van Rossum7f43da71994-08-01 12:15:30 +000013253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13256$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013257
Guido van Rossumda88dad1995-01-26 00:46:29 +000013258have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13260$as_echo_n "checking for prototypes... " >&6; }
13261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013262/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013263int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013264int
13265main ()
13266{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013267return foo(10);
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_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Matthias Kloseb9621712010-04-24 17:59:49 +000013274$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013275
Matthias Kloseb159a552010-04-25 21:00:44 +000013276 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13280$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013281
Guido van Rossumda88dad1995-01-26 00:46:29 +000013282works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13284$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013286/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013287
13288#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013289int foo(int x, ...) {
13290 va_list va;
13291 va_start(va, x);
13292 va_arg(va, int);
13293 va_arg(va, char *);
13294 va_arg(va, double);
13295 return 0;
13296}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013297
Martin v. Löwis11437992002-04-12 09:54:03 +000013298int
13299main ()
13300{
Guido van Rossum90eea071996-08-30 20:58:57 +000013301return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 ;
13303 return 0;
13304}
13305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013307
13308
Matthias Kloseb9621712010-04-24 17:59:49 +000013309$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013310
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013311 works=yes
13312
Guido van Rossum627b2d71993-12-24 10:39:16 +000013313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13316$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013317
Martin v. Löwisd6320502004-08-12 13:45:08 +000013318# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13320$as_echo_n "checking for socketpair... " >&6; }
13321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013322/* end confdefs.h. */
13323
13324#include <sys/types.h>
13325#include <sys/socket.h>
13326
13327int
13328main ()
13329{
13330void *x=socketpair
13331 ;
13332 return 0;
13333}
13334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013335if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013336
Matthias Kloseb9621712010-04-24 17:59:49 +000013337$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013338
Matthias Kloseb159a552010-04-25 21:00:44 +000013339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013340$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013341else
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13343$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013344
13345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013347
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013348# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13350$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013352/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013353#include <sys/types.h>
13354#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013355int
13356main ()
13357{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013358struct sockaddr x;
13359x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 ;
13361 return 0;
13362}
13363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013364if ac_fn_c_try_compile "$LINENO"; then :
13365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13366$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013367
Matthias Kloseb9621712010-04-24 17:59:49 +000013368$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013369
13370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13372$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013373
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013376
Guido van Rossumda88dad1995-01-26 00:46:29 +000013377va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13379$as_echo_n "checking whether va_list is an array... " >&6; }
13380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013381/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382
13383#ifdef HAVE_STDARG_PROTOTYPES
13384#include <stdarg.h>
13385#else
13386#include <varargs.h>
13387#endif
13388
Martin v. Löwis11437992002-04-12 09:54:03 +000013389int
13390main ()
13391{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013392va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 ;
13394 return 0;
13395}
13396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013397if ac_fn_c_try_compile "$LINENO"; then :
13398
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013399else
Skip Montanaro6dead952003-09-25 14:50:04 +000013400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Matthias Kloseb9621712010-04-24 17:59:49 +000013402$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Guido van Rossumda88dad1995-01-26 00:46:29 +000013404 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013405
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13409$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013410
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013411# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
13413
Matthias Kloseb9621712010-04-24 17:59:49 +000013414ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013415if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13420$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013421 OLD_CFLAGS=$CFLAGS
13422 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013424/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013425
13426# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013427
Martin v. Löwis11437992002-04-12 09:54:03 +000013428int
13429main ()
13430{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013431
13432 char *name;
13433 struct hostent *he, *res;
13434 char buffer[2048];
13435 int buflen = 2048;
13436 int h_errnop;
13437
13438 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013439
13440 ;
13441 return 0;
13442}
13443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013447
Martin v. Löwis11437992002-04-12 09:54:03 +000013448
Matthias Kloseb9621712010-04-24 17:59:49 +000013449$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13452$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013454else
Skip Montanaro6dead952003-09-25 14:50:04 +000013455
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13457$as_echo "no" >&6; }
13458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13459$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013461/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013462
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013463# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
Martin v. Löwis11437992002-04-12 09:54:03 +000013465int
13466main ()
13467{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013468
13469 char *name;
13470 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013471 char buffer[2048];
13472 int buflen = 2048;
13473 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013474
Matthias Kloseb159a552010-04-25 21:00:44 +000013475 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013476
13477 ;
13478 return 0;
13479}
13480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013481if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013484
Martin v. Löwis11437992002-04-12 09:54:03 +000013485
Matthias Kloseb159a552010-04-25 21:00:44 +000013486$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013487
Matthias Kloseb9621712010-04-24 17:59:49 +000013488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13489$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013490
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013491else
Skip Montanaro6dead952003-09-25 14:50:04 +000013492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13494$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13496$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13498/* end confdefs.h. */
13499
13500# include <netdb.h>
13501
13502int
13503main ()
13504{
13505
13506 char *name;
13507 struct hostent *he;
13508 struct hostent_data data;
13509
13510 (void) gethostbyname_r(name, he, &data);
13511
13512 ;
13513 return 0;
13514}
13515_ACEOF
13516if ac_fn_c_try_compile "$LINENO"; then :
13517
13518 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13519
13520
13521$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13522
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13524$as_echo "yes" >&6; }
13525
13526else
13527
13528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13529$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013533
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013536
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013539 CFLAGS=$OLD_CFLAGS
13540
13541else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013542
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 for ac_func in gethostbyname
13544do :
13545 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013546if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013548#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013549_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013550
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013551fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013552done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013553
Michael W. Hudson54241132001-12-07 15:38:26 +000013554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013555fi
13556
Michael W. Hudson54241132001-12-07 15:38:26 +000013557
13558
13559
13560
13561
13562
Guido van Rossum627b2d71993-12-24 10:39:16 +000013563# checks for system services
13564# (none yet)
13565
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013566# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013567ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013568if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013569
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013570else
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13572$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013573if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575else
Martin v. Löwis11437992002-04-12 09:54:03 +000013576 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013577LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581/* Override any GCC internal prototype to avoid an error.
13582 Use char because int might match the return type of a GCC
13583 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013584#ifdef __cplusplus
13585extern "C"
13586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013587char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013588int
13589main ()
13590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013591return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013592 ;
13593 return 0;
13594}
13595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013598else
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013601rm -f core conftest.err conftest.$ac_objext \
13602 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013603LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13606$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013607if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013608 cat >>confdefs.h <<_ACEOF
13609#define HAVE_LIBIEEE 1
13610_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013611
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013612 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013613
Guido van Rossum627b2d71993-12-24 10:39:16 +000013614fi
13615
Michael W. Hudson54241132001-12-07 15:38:26 +000013616
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013617fi
13618
Michael W. Hudson54241132001-12-07 15:38:26 +000013619
Guido van Rossum7f253911997-05-09 02:42:48 +000013620# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13622$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013624# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013625if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013627if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013628then
13629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13633$as_echo "yes" >&6; }
13634else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13635$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013636fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013637else
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13639$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013640fi
13641
Guido van Rossum7f253911997-05-09 02:42:48 +000013642
Guido van Rossum7f43da71994-08-01 12:15:30 +000013643# check for --with-libm=...
13644
Guido van Rossum563e7081996-09-10 18:20:48 +000013645case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013646Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013647*) LIBM=-lm
13648esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13650$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013652# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013653if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013654 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013655if test "$withval" = no
13656then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13658$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013659elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013660then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13662$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013663else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013664fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13667$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668fi
13669
Guido van Rossum7f43da71994-08-01 12:15:30 +000013670
13671# check for --with-libc=...
13672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13674$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013676# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013677if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013678 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013679if test "$withval" = no
13680then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13682$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013683elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013684then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13686$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013687else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013688fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013689else
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13691$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013692fi
13693
Guido van Rossum7f43da71994-08-01 12:15:30 +000013694
Stefan Krah1919b7e2012-03-21 18:25:23 +010013695# **************************************
13696# * Check for gcc x64 inline assembler *
13697# **************************************
13698
13699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13700$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13702/* end confdefs.h. */
13703
13704int
13705main ()
13706{
13707
13708 __asm__ __volatile__ ("movq %rcx, %rax");
13709
13710 ;
13711 return 0;
13712}
13713_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013714if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013715 have_gcc_asm_for_x64=yes
13716else
13717 have_gcc_asm_for_x64=no
13718fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013719rm -f core conftest.err conftest.$ac_objext \
13720 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13722$as_echo "$have_gcc_asm_for_x64" >&6; }
13723if test "$have_gcc_asm_for_x64" = yes
13724then
13725
13726$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13727
13728fi
13729
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013730# **************************************************
13731# * Check for various properties of floating point *
13732# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013733
Matthias Kloseb9621712010-04-24 17:59:49 +000013734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13735$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013736if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013738else
13739
Matthias Kloseb9621712010-04-24 17:59:49 +000013740if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013741 ac_cv_little_endian_double=no
13742else
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013744/* end confdefs.h. */
13745
13746#include <string.h>
13747int main() {
13748 double x = 9006104071832581.0;
13749 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13750 return 0;
13751 else
13752 return 1;
13753}
13754
13755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013756if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013757 ac_cv_little_endian_double=yes
13758else
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13762 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013763fi
13764
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013765fi
13766
Matthias Kloseb9621712010-04-24 17:59:49 +000013767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13768$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013769if test "$ac_cv_little_endian_double" = yes
13770then
13771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013773
13774fi
13775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13777$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013778if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013780else
13781
Matthias Kloseb9621712010-04-24 17:59:49 +000013782if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013783 ac_cv_big_endian_double=no
13784else
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013786/* end confdefs.h. */
13787
13788#include <string.h>
13789int main() {
13790 double x = 9006104071832581.0;
13791 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13792 return 0;
13793 else
13794 return 1;
13795}
13796
13797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013798if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013799 ac_cv_big_endian_double=yes
13800else
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013805fi
13806
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013807fi
13808
Matthias Kloseb9621712010-04-24 17:59:49 +000013809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13810$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013811if test "$ac_cv_big_endian_double" = yes
13812then
13813
Matthias Kloseb9621712010-04-24 17:59:49 +000013814$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013815
13816fi
13817
13818# Some ARM platforms use a mixed-endian representation for doubles.
13819# While Python doesn't currently have full support for these platforms
13820# (see e.g., issue 1762561), we can at least make sure that float <-> string
13821# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13823$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013824if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013825 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013826else
13827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013829 ac_cv_mixed_endian_double=no
13830else
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013832/* end confdefs.h. */
13833
13834#include <string.h>
13835int main() {
13836 double x = 9006104071832581.0;
13837 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13838 return 0;
13839 else
13840 return 1;
13841}
13842
13843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013844if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013845 ac_cv_mixed_endian_double=yes
13846else
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013851fi
13852
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013853fi
13854
Matthias Kloseb9621712010-04-24 17:59:49 +000013855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13856$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857if test "$ac_cv_mixed_endian_double" = yes
13858then
13859
Matthias Kloseb9621712010-04-24 17:59:49 +000013860$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013861
13862fi
13863
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013864# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013865# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013866# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013867# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013868# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013869# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013870
13871# This inline assembler syntax may also work for suncc and icc,
13872# so we try it on all platforms.
13873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13875$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013877/* end confdefs.h. */
13878
13879int
13880main ()
13881{
13882
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013883 unsigned short cw;
13884 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13885 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013886
13887 ;
13888 return 0;
13889}
13890_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013891if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013892 have_gcc_asm_for_x87=yes
13893else
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013895fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013896rm -f core conftest.err conftest.$ac_objext \
13897 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13899$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013900if test "$have_gcc_asm_for_x87" = yes
13901then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013904
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013905fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013906
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13908$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13910/* end confdefs.h. */
13911
13912int
13913main ()
13914{
13915
13916 unsigned int fpcr;
13917 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13918 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13919
13920 ;
13921 return 0;
13922}
13923_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013924if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013925 have_gcc_asm_for_mc68881=yes
13926else
13927 have_gcc_asm_for_mc68881=no
13928fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013929rm -f core conftest.err conftest.$ac_objext \
13930 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13932$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13933if test "$have_gcc_asm_for_mc68881" = yes
13934then
13935
13936$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13937
13938fi
13939
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013940# Detect whether system arithmetic is subject to x87-style double
13941# rounding issues. The result of this test has little meaning on non
13942# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13943# mode is round-to-nearest and double rounding issues are present, and
13944# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13946$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013947# $BASECFLAGS may affect the result
13948ac_save_cc="$CC"
13949CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013950if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013951 ac_cv_x87_double_rounding=no
13952else
Matthias Kloseb9621712010-04-24 17:59:49 +000013953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013954/* end confdefs.h. */
13955
13956#include <stdlib.h>
13957#include <math.h>
13958int main() {
13959 volatile double x, y, z;
13960 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13961 x = 0.99999999999999989; /* 1-2**-53 */
13962 y = 1./x;
13963 if (y != 1.)
13964 exit(0);
13965 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13966 x = 1e16;
13967 y = 2.99999;
13968 z = x + y;
13969 if (z != 1e16+4.)
13970 exit(0);
13971 /* both tests show evidence of double rounding */
13972 exit(1);
13973}
13974
13975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013976if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013977 ac_cv_x87_double_rounding=no
13978else
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13982 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013983fi
13984
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013985CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13987$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013988if test "$ac_cv_x87_double_rounding" = yes
13989then
13990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013992
13993fi
13994
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013995# ************************************
13996# * Check for mathematical functions *
13997# ************************************
13998
13999LIBS_SAVE=$LIBS
14000LIBS="$LIBS $LIBM"
14001
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014002for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14003do :
14004 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14005ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014006if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014007 cat >>confdefs.h <<_ACEOF
14008#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14009_ACEOF
14010
14011fi
14012done
14013
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014014for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014015do :
14016 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14017ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014018if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014019 cat >>confdefs.h <<_ACEOF
14020#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14021_ACEOF
14022
14023fi
14024done
14025
14026ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14027"
Victor Stinnere0be4232011-10-25 13:06:09 +020014028if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014029 ac_have_decl=1
14030else
14031 ac_have_decl=0
14032fi
14033
14034cat >>confdefs.h <<_ACEOF
14035#define HAVE_DECL_ISINF $ac_have_decl
14036_ACEOF
14037ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14038"
Victor Stinnere0be4232011-10-25 13:06:09 +020014039if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014040 ac_have_decl=1
14041else
14042 ac_have_decl=0
14043fi
14044
14045cat >>confdefs.h <<_ACEOF
14046#define HAVE_DECL_ISNAN $ac_have_decl
14047_ACEOF
14048ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14049"
Victor Stinnere0be4232011-10-25 13:06:09 +020014050if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014051 ac_have_decl=1
14052else
14053 ac_have_decl=0
14054fi
14055
14056cat >>confdefs.h <<_ACEOF
14057#define HAVE_DECL_ISFINITE $ac_have_decl
14058_ACEOF
14059
14060
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014061# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14062# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14064$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014065if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014067else
14068
Matthias Kloseb9621712010-04-24 17:59:49 +000014069if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014070 ac_cv_tanh_preserves_zero_sign=no
14071else
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014073/* end confdefs.h. */
14074
14075#include <math.h>
14076#include <stdlib.h>
14077int main() {
14078 /* return 0 if either negative zeros don't exist
14079 on this platform or if negative zeros exist
14080 and tanh(-0.) == -0. */
14081 if (atan2(0., -1.) == atan2(-0., -1.) ||
14082 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14083 else exit(1);
14084}
14085
14086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014087if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014088 ac_cv_tanh_preserves_zero_sign=yes
14089else
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14093 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014094fi
14095
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014096fi
14097
Matthias Kloseb9621712010-04-24 17:59:49 +000014098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14099$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014100if test "$ac_cv_tanh_preserves_zero_sign" = yes
14101then
14102
Matthias Kloseb9621712010-04-24 17:59:49 +000014103$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014104
14105fi
14106
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014107if test "$ac_cv_func_log1p" = yes
14108then
14109 # On some versions of AIX, log1p(-0.) returns 0. instead of
14110 # -0. See issue #9920.
14111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14112$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014113 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014114 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014115else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014116
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014117 if test "$cross_compiling" = yes; then :
14118 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014119else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14121/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014122
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014123 #include <math.h>
14124 #include <stdlib.h>
14125 int main() {
14126 /* Fail if the signs of log1p(-0.) and -0. can be
14127 distinguished. */
14128 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14129 return 0;
14130 else
14131 return 1;
14132 }
14133
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014134_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014135if ac_fn_c_try_run "$LINENO"; then :
14136 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014137else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014138 ac_cv_log1p_drops_zero_sign=yes
14139fi
14140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14141 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014142fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014143
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014144fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014145
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14147$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14148fi
14149if test "$ac_cv_log1p_drops_zero_sign" = yes
14150then
14151
14152$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14153
14154fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014155
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014156LIBS=$LIBS_SAVE
14157
Mark Dickinsona614f042009-11-28 12:48:43 +000014158# For multiprocessing module, check that sem_open
14159# actually works. For FreeBSD versions <= 7.2,
14160# the kernel module that provides POSIX semaphores
14161# isn't loaded by default, so an attempt to call
14162# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14164$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014165if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014167else
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014169 ac_cv_posix_semaphores_enabled=yes
14170else
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014172/* end confdefs.h. */
14173
14174#include <unistd.h>
14175#include <fcntl.h>
14176#include <stdio.h>
14177#include <semaphore.h>
14178#include <sys/stat.h>
14179
14180int main(void) {
14181 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14182 if (a == SEM_FAILED) {
14183 perror("sem_open");
14184 return 1;
14185 }
14186 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014187 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014188 return 0;
14189}
14190
14191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014192if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014193 ac_cv_posix_semaphores_enabled=yes
14194else
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14198 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014199fi
14200
14201
Mark Dickinsona614f042009-11-28 12:48:43 +000014202fi
14203
Matthias Kloseb9621712010-04-24 17:59:49 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14205$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014206if test $ac_cv_posix_semaphores_enabled = no
14207then
14208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014210
14211fi
14212
Mark Dickinson10683072009-04-18 21:18:19 +000014213# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14215$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014216if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014218else
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014220 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014221else
Matthias Kloseb9621712010-04-24 17:59:49 +000014222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014223/* end confdefs.h. */
14224
14225#include <unistd.h>
14226#include <fcntl.h>
14227#include <stdio.h>
14228#include <semaphore.h>
14229#include <sys/stat.h>
14230
14231int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014232 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014233 int count;
14234 int res;
14235 if(a==SEM_FAILED){
14236 perror("sem_open");
14237 return 1;
14238
14239 }
14240 res = sem_getvalue(a, &count);
14241 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014242 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014243 return res==-1 ? 1 : 0;
14244}
14245
Mark Dickinson10683072009-04-18 21:18:19 +000014246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014247if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014248 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014249else
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14253 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014254fi
14255
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014256
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014257fi
14258
Matthias Kloseb9621712010-04-24 17:59:49 +000014259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14260$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014261if test $ac_cv_broken_sem_getvalue = yes
14262then
14263
Matthias Kloseb9621712010-04-24 17:59:49 +000014264$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014265
14266fi
14267
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014268ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14269"
14270if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14271 ac_have_decl=1
14272else
14273 ac_have_decl=0
14274fi
14275
14276cat >>confdefs.h <<_ACEOF
14277#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14278_ACEOF
14279ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14280"
14281if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14282 ac_have_decl=1
14283else
14284 ac_have_decl=0
14285fi
14286
14287cat >>confdefs.h <<_ACEOF
14288#define HAVE_DECL_RTLD_NOW $ac_have_decl
14289_ACEOF
14290ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14291"
14292if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14293 ac_have_decl=1
14294else
14295 ac_have_decl=0
14296fi
14297
14298cat >>confdefs.h <<_ACEOF
14299#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14300_ACEOF
14301ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14302"
14303if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14304 ac_have_decl=1
14305else
14306 ac_have_decl=0
14307fi
14308
14309cat >>confdefs.h <<_ACEOF
14310#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14311_ACEOF
14312ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14313"
14314if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14315 ac_have_decl=1
14316else
14317 ac_have_decl=0
14318fi
14319
14320cat >>confdefs.h <<_ACEOF
14321#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14322_ACEOF
14323ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14324"
14325if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14326 ac_have_decl=1
14327else
14328 ac_have_decl=0
14329fi
14330
14331cat >>confdefs.h <<_ACEOF
14332#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14333_ACEOF
14334ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14335"
14336if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14337 ac_have_decl=1
14338else
14339 ac_have_decl=0
14340fi
14341
14342cat >>confdefs.h <<_ACEOF
14343#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14344_ACEOF
14345
14346
Mark Dickinsonbd792642009-03-18 20:06:12 +000014347# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14349$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014350# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014351if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014352 enableval=$enable_big_digits; case $enable_big_digits in
14353yes)
14354 enable_big_digits=30 ;;
14355no)
14356 enable_big_digits=15 ;;
1435715|30)
14358 ;;
14359*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014360 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 +000014361esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14363$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014364
14365cat >>confdefs.h <<_ACEOF
14366#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14367_ACEOF
14368
14369
14370else
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14372$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014373fi
14374
14375
Guido van Rossumef2255b2000-03-10 22:30:29 +000014376# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014377ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014378if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014379
14380
Matthias Kloseb9621712010-04-24 17:59:49 +000014381$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014383 wchar_h="yes"
14384
Guido van Rossumef2255b2000-03-10 22:30:29 +000014385else
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014387
14388fi
14389
Michael W. Hudson54241132001-12-07 15:38:26 +000014390
Martin v. Löwis11437992002-04-12 09:54:03 +000014391
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014392# determine wchar_t size
14393if test "$wchar_h" = yes
14394then
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014396# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14397# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14398# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14400$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014401if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014403else
Matthias Kloseb9621712010-04-24 17:59:49 +000014404 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14405"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014406
Martin v. Löwis11437992002-04-12 09:54:03 +000014407else
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 if test "$ac_cv_type_wchar_t" = yes; then
14409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014411as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014412See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413 else
14414 ac_cv_sizeof_wchar_t=0
14415 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014417
Martin v. Löwis11437992002-04-12 09:54:03 +000014418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14420$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421
14422
14423
Martin v. Löwis11437992002-04-12 09:54:03 +000014424cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014425#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014426_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014427
Michael W. Hudson54241132001-12-07 15:38:26 +000014428
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014429fi
14430
Matthias Kloseb9621712010-04-24 17:59:49 +000014431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14432$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014433have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014435/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014436
14437#include <tcl.h>
14438#if TCL_UTF_MAX != 6
14439# error "NOT UCS4_TCL"
14440#endif
14441int
14442main ()
14443{
14444
14445 ;
14446 return 0;
14447}
14448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014450
14451
Matthias Kloseb9621712010-04-24 17:59:49 +000014452$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014453
14454 have_ucs4_tcl=yes
14455
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14459$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014460
Skip Montanaro6dead952003-09-25 14:50:04 +000014461# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014462if test "$wchar_h" = yes
14463then
14464 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14466$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014467 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014469else
14470
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014472 ac_cv_wchar_t_signed=yes
14473else
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014475/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014476
14477 #include <wchar.h>
14478 int main()
14479 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014480 /* Success: exit code 0 */
14481 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014482 }
14483
14484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014485if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014486 ac_cv_wchar_t_signed=yes
14487else
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14491 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014492fi
14493
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014494fi
14495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14497$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014498fi
14499
Georg Brandl52d168a2008-01-07 18:10:24 +000014500# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014501if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014502 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014503then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014504 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014505
Matthias Kloseb9621712010-04-24 17:59:49 +000014506$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014507
Georg Brandl52d168a2008-01-07 18:10:24 +000014508else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014509 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014510fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14512$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014513
14514# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14516$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014517if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014519else
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 ac_cv_c_bigendian=unknown
14521 # See if we're dealing with a universal compiler.
14522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14523/* end confdefs.h. */
14524#ifndef __APPLE_CC__
14525 not a universal capable compiler
14526 #endif
14527 typedef int dummy;
14528
Skip Montanaro6dead952003-09-25 14:50:04 +000014529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014530if ac_fn_c_try_compile "$LINENO"; then :
14531
14532 # Check for potential -arch flags. It is not universal unless
14533 # there are at least two -arch flags with different values.
14534 ac_arch=
14535 ac_prev=
14536 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14537 if test -n "$ac_prev"; then
14538 case $ac_word in
14539 i?86 | x86_64 | ppc | ppc64)
14540 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14541 ac_arch=$ac_word
14542 else
14543 ac_cv_c_bigendian=universal
14544 break
14545 fi
14546 ;;
14547 esac
14548 ac_prev=
14549 elif test "x$ac_word" = "x-arch"; then
14550 ac_prev=arch
14551 fi
14552 done
14553fi
14554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14555 if test $ac_cv_c_bigendian = unknown; then
14556 # See if sys/param.h defines the BYTE_ORDER macro.
14557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014558/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014559#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014561
Martin v. Löwis11437992002-04-12 09:54:03 +000014562int
14563main ()
14564{
Matthias Kloseb9621712010-04-24 17:59:49 +000014565#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14566 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14567 && LITTLE_ENDIAN)
14568 bogus endian macros
14569 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014570
14571 ;
14572 return 0;
14573}
14574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014575if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014576 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014578/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014579#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014581
Martin v. Löwis11437992002-04-12 09:54:03 +000014582int
14583main ()
14584{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014585#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 not big endian
14587 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014588
14589 ;
14590 return 0;
14591}
14592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014593if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014594 ac_cv_c_bigendian=yes
14595else
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014599fi
14600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14601 fi
14602 if test $ac_cv_c_bigendian = unknown; then
14603 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014605/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014606#include <limits.h>
14607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608int
14609main ()
14610{
Matthias Kloseb9621712010-04-24 17:59:49 +000014611#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14612 bogus endian macros
14613 #endif
14614
Martin v. Löwis11437992002-04-12 09:54:03 +000014615 ;
14616 return 0;
14617}
14618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014619if ac_fn_c_try_compile "$LINENO"; then :
14620 # It does; now see whether it defined to _BIG_ENDIAN or not.
14621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14622/* end confdefs.h. */
14623#include <limits.h>
14624
14625int
14626main ()
14627{
14628#ifndef _BIG_ENDIAN
14629 not big endian
14630 #endif
14631
14632 ;
14633 return 0;
14634}
14635_ACEOF
14636if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014638else
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14642fi
14643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14644 fi
14645 if test $ac_cv_c_bigendian = unknown; then
14646 # Compile a test program.
14647 if test "$cross_compiling" = yes; then :
14648 # Try to guess by grepping values from an object file.
14649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14650/* end confdefs.h. */
14651short int ascii_mm[] =
14652 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14653 short int ascii_ii[] =
14654 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14655 int use_ascii (int i) {
14656 return ascii_mm[i] + ascii_ii[i];
14657 }
14658 short int ebcdic_ii[] =
14659 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14660 short int ebcdic_mm[] =
14661 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14662 int use_ebcdic (int i) {
14663 return ebcdic_mm[i] + ebcdic_ii[i];
14664 }
14665 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666
Matthias Kloseb9621712010-04-24 17:59:49 +000014667int
14668main ()
14669{
14670return use_ascii (foo) == use_ebcdic (foo);
14671 ;
14672 return 0;
14673}
14674_ACEOF
14675if ac_fn_c_try_compile "$LINENO"; then :
14676 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14677 ac_cv_c_bigendian=yes
14678 fi
14679 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14680 if test "$ac_cv_c_bigendian" = unknown; then
14681 ac_cv_c_bigendian=no
14682 else
14683 # finding both strings is unlikely to happen, but who knows?
14684 ac_cv_c_bigendian=unknown
14685 fi
14686 fi
14687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014689else
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014691/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014692$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014693int
14694main ()
14695{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 /* Are we little or big endian? From Harbison&Steele. */
14698 union
14699 {
14700 long int l;
14701 char c[sizeof (long int)];
14702 } u;
14703 u.l = 1;
14704 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014705
14706 ;
14707 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014708}
Martin v. Löwis11437992002-04-12 09:54:03 +000014709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014710if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014711 ac_cv_c_bigendian=no
14712else
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014718
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14722$as_echo "$ac_cv_c_bigendian" >&6; }
14723 case $ac_cv_c_bigendian in #(
14724 yes)
14725 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14726;; #(
14727 no)
14728 ;; #(
14729 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014730
Matthias Kloseb9621712010-04-24 17:59:49 +000014731$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733 ;; #(
14734 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014735 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014736 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014738
Michael W. Hudson54241132001-12-07 15:38:26 +000014739
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014740# ABI version string for Python extension modules. This appears between the
14741# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14742# from the following attributes which affect the ABI of this Python build (in
14743# this order):
14744#
14745# * The Python implementation (always 'cpython-' for us)
14746# * The major and minor version numbers
14747# * --with-pydebug (adds a 'd')
14748# * --with-pymalloc (adds a 'm')
14749# * --with-wide-unicode (adds a 'u')
14750#
14751# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014752# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14753# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014754
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14756$as_echo_n "checking ABIFLAGS... " >&6; }
14757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14758$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14760$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014761SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14763$as_echo "$SOABI" >&6; }
14764
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014765
14766case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014767 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014768 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14769 *)
14770 EXT_SUFFIX=${SHLIB_SUFFIX};;
14771esac
14772
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14774$as_echo_n "checking LDVERSION... " >&6; }
14775LDVERSION='$(VERSION)$(ABIFLAGS)'
14776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14777$as_echo "$LDVERSION" >&6; }
14778
doko@python.org87421192013-01-26 11:39:31 +010014779
doko@ubuntu.com55532312016-06-14 08:55:19 +020014780if test x$PLATFORM_TRIPLET = x; then
14781 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14782else
14783 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14784fi
doko@python.org87421192013-01-26 11:39:31 +010014785
14786
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014787# Check whether right shifting a negative integer extends the sign bit
14788# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14790$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014791if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014793else
Martin v. Löwis11437992002-04-12 09:54:03 +000014794
Matthias Kloseb9621712010-04-24 17:59:49 +000014795if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014796 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014797else
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014799/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014800
14801int main()
14802{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014803 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014804}
14805
Martin v. Löwis11437992002-04-12 09:54:03 +000014806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014807if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014808 ac_cv_rshift_extends_sign=yes
14809else
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14813 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014814fi
14815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816fi
14817
Matthias Kloseb9621712010-04-24 17:59:49 +000014818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14819$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014820if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014821then
Martin v. Löwis11437992002-04-12 09:54:03 +000014822
Matthias Kloseb9621712010-04-24 17:59:49 +000014823$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014824
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014825fi
14826
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014827# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14829$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014830if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014832else
Martin v. Löwis11437992002-04-12 09:54:03 +000014833
Matthias Kloseb9621712010-04-24 17:59:49 +000014834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014835/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014836#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014837int
14838main ()
14839{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014840
14841 FILE *f = fopen("/dev/null", "r");
14842 flockfile(f);
14843 getc_unlocked(f);
14844 funlockfile(f);
14845
Martin v. Löwis11437992002-04-12 09:54:03 +000014846 ;
14847 return 0;
14848}
14849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014850if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014851 ac_cv_have_getc_unlocked=yes
14852else
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 ac_cv_have_getc_unlocked=no
14854fi
14855rm -f core conftest.err conftest.$ac_objext \
14856 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858
Matthias Kloseb9621712010-04-24 17:59:49 +000014859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14860$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014861if test "$ac_cv_have_getc_unlocked" = yes
14862then
Martin v. Löwis11437992002-04-12 09:54:03 +000014863
Matthias Kloseb9621712010-04-24 17:59:49 +000014864$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014865
14866fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014867
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014868# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014869# save the value of LIBS so we don't actually link Python with readline
14870LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014871
Gregory P. Smith18820942008-09-07 06:24:49 +000014872# On some systems we need to link readline to a termcap compatible
14873# library. NOTE: Keep the precedence of listed libraries synchronised
14874# with setup.py.
14875py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14877$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014878for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014879 if test -z "$py_libtermcap"; then
14880 READLINE_LIBS="-lreadline"
14881 else
14882 READLINE_LIBS="-lreadline -l$py_libtermcap"
14883 fi
14884 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014886/* end confdefs.h. */
14887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888/* Override any GCC internal prototype to avoid an error.
14889 Use char because int might match the return type of a GCC
14890 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014891#ifdef __cplusplus
14892extern "C"
14893#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014894char readline ();
14895int
14896main ()
14897{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014898return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014899 ;
14900 return 0;
14901}
14902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014903if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014904 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014906rm -f core conftest.err conftest.$ac_objext \
14907 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014908 if test $py_cv_lib_readline = yes; then
14909 break
14910 fi
14911done
14912# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14913#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014914if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14916$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014917else
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14919$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014920
Matthias Kloseb9621712010-04-24 17:59:49 +000014921$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014922
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014923fi
14924
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014925# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14927$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014928if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014930else
14931 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014932LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014934/* end confdefs.h. */
14935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936/* Override any GCC internal prototype to avoid an error.
14937 Use char because int might match the return type of a GCC
14938 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014939#ifdef __cplusplus
14940extern "C"
14941#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014942char rl_callback_handler_install ();
14943int
14944main ()
14945{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014947 ;
14948 return 0;
14949}
14950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014951if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014952 ac_cv_lib_readline_rl_callback_handler_install=yes
14953else
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014956rm -f core conftest.err conftest.$ac_objext \
14957 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014958LIBS=$ac_check_lib_save_LIBS
14959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14961$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014962if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014963
Matthias Kloseb9621712010-04-24 17:59:49 +000014964$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014965
14966fi
14967
14968
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014969# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014971/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014972#include <readline/readline.h>
14973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014974if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014975 have_readline=yes
14976else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014977 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014978
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014979fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014980rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014981if test $have_readline = yes
14982then
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014984/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014985#include <readline/readline.h>
14986
14987_ACEOF
14988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014990
Matthias Kloseb9621712010-04-24 17:59:49 +000014991$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014992
14993fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014994rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014995
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014997/* end confdefs.h. */
14998#include <readline/readline.h>
14999
15000_ACEOF
15001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015003
Matthias Kloseb9621712010-04-24 17:59:49 +000015004$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015005
15006fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015007rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015008
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015009fi
15010
Martin v. Löwis0daad592001-09-30 21:09:59 +000015011# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15013$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015014if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015015 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015016else
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015018LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022/* Override any GCC internal prototype to avoid an error.
15023 Use char because int might match the return type of a GCC
15024 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015025#ifdef __cplusplus
15026extern "C"
15027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015028char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015029int
15030main ()
15031{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 ;
15034 return 0;
15035}
15036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015037if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015039else
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015042rm -f core conftest.err conftest.$ac_objext \
15043 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015044LIBS=$ac_check_lib_save_LIBS
15045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15047$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015048if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015049
Matthias Kloseb9621712010-04-24 17:59:49 +000015050$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015051
Martin v. Löwis0daad592001-09-30 21:09:59 +000015052fi
15053
Michael W. Hudson54241132001-12-07 15:38:26 +000015054
Thomas Wouters89d996e2007-09-08 17:39:28 +000015055# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15057$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015058if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015060else
15061 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015062LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015064/* end confdefs.h. */
15065
15066/* Override any GCC internal prototype to avoid an error.
15067 Use char because int might match the return type of a GCC
15068 builtin and then its argument prototype would still apply. */
15069#ifdef __cplusplus
15070extern "C"
15071#endif
15072char rl_completion_display_matches_hook ();
15073int
15074main ()
15075{
15076return rl_completion_display_matches_hook ();
15077 ;
15078 return 0;
15079}
15080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015081if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015082 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15083else
Matthias Kloseb9621712010-04-24 17:59:49 +000015084 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015086rm -f core conftest.err conftest.$ac_objext \
15087 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015088LIBS=$ac_check_lib_save_LIBS
15089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15091$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015092if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015093
Matthias Kloseb9621712010-04-24 17:59:49 +000015094$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015095
15096fi
15097
15098
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015099# also in 4.0, but not in editline
15100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15101$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15102if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15103 $as_echo_n "(cached) " >&6
15104else
15105 ac_check_lib_save_LIBS=$LIBS
15106LIBS="-lreadline $READLINE_LIBS $LIBS"
15107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15108/* end confdefs.h. */
15109
15110/* Override any GCC internal prototype to avoid an error.
15111 Use char because int might match the return type of a GCC
15112 builtin and then its argument prototype would still apply. */
15113#ifdef __cplusplus
15114extern "C"
15115#endif
15116char rl_resize_terminal ();
15117int
15118main ()
15119{
15120return rl_resize_terminal ();
15121 ;
15122 return 0;
15123}
15124_ACEOF
15125if ac_fn_c_try_link "$LINENO"; then :
15126 ac_cv_lib_readline_rl_resize_terminal=yes
15127else
15128 ac_cv_lib_readline_rl_resize_terminal=no
15129fi
15130rm -f core conftest.err conftest.$ac_objext \
15131 conftest$ac_exeext conftest.$ac_ext
15132LIBS=$ac_check_lib_save_LIBS
15133fi
15134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15135$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15136if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15137
15138$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15139
15140fi
15141
15142
Martin v. Löwis0daad592001-09-30 21:09:59 +000015143# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15145$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015146if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015147 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015148else
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015150LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154/* Override any GCC internal prototype to avoid an error.
15155 Use char because int might match the return type of a GCC
15156 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015157#ifdef __cplusplus
15158extern "C"
15159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015160char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015161int
15162main ()
15163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 ;
15166 return 0;
15167}
15168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015169if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015171else
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015174rm -f core conftest.err conftest.$ac_objext \
15175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015176LIBS=$ac_check_lib_save_LIBS
15177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15179$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015180if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015181
Matthias Kloseb9621712010-04-24 17:59:49 +000015182$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015183
Guido van Rossum353ae582001-07-10 16:45:32 +000015184fi
15185
Jack Jansendd19cf82001-12-06 22:36:17 +000015186
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015187# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015189/* end confdefs.h. */
15190#include <readline/readline.h>
15191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015192if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015193 have_readline=yes
15194else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015195 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015196
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015197fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015198rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015199if test $have_readline = yes
15200then
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015202/* end confdefs.h. */
15203#include <readline/readline.h>
15204
15205_ACEOF
15206if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015207 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015208
Matthias Kloseb9621712010-04-24 17:59:49 +000015209$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015210
15211fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015212rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015213
15214fi
15215
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15217$as_echo_n "checking for append_history in -lreadline... " >&6; }
15218if ${ac_cv_lib_readline_append_history+:} false; then :
15219 $as_echo_n "(cached) " >&6
15220else
15221 ac_check_lib_save_LIBS=$LIBS
15222LIBS="-lreadline $READLINE_LIBS $LIBS"
15223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15224/* end confdefs.h. */
15225
15226/* Override any GCC internal prototype to avoid an error.
15227 Use char because int might match the return type of a GCC
15228 builtin and then its argument prototype would still apply. */
15229#ifdef __cplusplus
15230extern "C"
15231#endif
15232char append_history ();
15233int
15234main ()
15235{
15236return append_history ();
15237 ;
15238 return 0;
15239}
15240_ACEOF
15241if ac_fn_c_try_link "$LINENO"; then :
15242 ac_cv_lib_readline_append_history=yes
15243else
15244 ac_cv_lib_readline_append_history=no
15245fi
15246rm -f core conftest.err conftest.$ac_objext \
15247 conftest$ac_exeext conftest.$ac_ext
15248LIBS=$ac_check_lib_save_LIBS
15249fi
15250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15251$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15252if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15253
15254$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15255
15256fi
15257
15258
Martin v. Löwis82bca632006-02-10 20:49:30 +000015259# End of readline checks: restore LIBS
15260LIBS=$LIBS_no_readline
15261
Matthias Kloseb9621712010-04-24 17:59:49 +000015262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15263$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015264if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015266else
Martin v. Löwis11437992002-04-12 09:54:03 +000015267
Matthias Kloseb9621712010-04-24 17:59:49 +000015268if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015269 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015270else
Matthias Kloseb9621712010-04-24 17:59:49 +000015271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015272/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015273
15274int main()
15275{
15276 int val1 = nice(1);
15277 if (val1 != -1 && val1 == nice(2))
15278 exit(0);
15279 exit(1);
15280}
15281
Martin v. Löwis11437992002-04-12 09:54:03 +000015282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015283if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015284 ac_cv_broken_nice=yes
15285else
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15289 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015290fi
15291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292fi
15293
Matthias Kloseb9621712010-04-24 17:59:49 +000015294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15295$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015296if test "$ac_cv_broken_nice" = yes
15297then
Martin v. Löwis11437992002-04-12 09:54:03 +000015298
Matthias Kloseb9621712010-04-24 17:59:49 +000015299$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015300
15301fi
15302
Matthias Kloseb9621712010-04-24 17:59:49 +000015303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15304$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015305if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015306 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015307else
Matthias Kloseb9621712010-04-24 17:59:49 +000015308 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015309 ac_cv_broken_poll=no
15310else
Matthias Kloseb9621712010-04-24 17:59:49 +000015311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015312/* end confdefs.h. */
15313
15314#include <poll.h>
15315
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015316int main()
15317{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015318 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015319 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015320
15321 close (42);
15322
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015323 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015324 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015325 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015326 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015327 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015328 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015329 return 1;
15330}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015331
15332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015333if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015334 ac_cv_broken_poll=yes
15335else
Matthias Kloseb9621712010-04-24 17:59:49 +000015336 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15339 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015341
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015342fi
15343
Matthias Kloseb9621712010-04-24 17:59:49 +000015344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15345$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015346if test "$ac_cv_broken_poll" = yes
15347then
15348
Matthias Kloseb9621712010-04-24 17:59:49 +000015349$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015350
15351fi
15352
Brett Cannon43802422005-02-10 20:48:03 +000015353# 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 +000015354# (which is not required by ISO C or UNIX spec) and/or if we support
15355# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015356ac_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 +000015357#include <$ac_cv_struct_tm>
15358
Matthias Kloseb9621712010-04-24 17:59:49 +000015359"
Victor Stinnere0be4232011-10-25 13:06:09 +020015360if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015361
15362cat >>confdefs.h <<_ACEOF
15363#define HAVE_STRUCT_TM_TM_ZONE 1
15364_ACEOF
15365
15366
15367fi
15368
15369if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15370
Matthias Kloseb9621712010-04-24 17:59:49 +000015371$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015372
15373else
Matthias Kloseb9621712010-04-24 17:59:49 +000015374 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15375"
Victor Stinnere0be4232011-10-25 13:06:09 +020015376if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015378else
Matthias Kloseb9621712010-04-24 17:59:49 +000015379 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015380fi
15381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015382cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015383#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384_ACEOF
15385
Matthias Kloseb9621712010-04-24 17:59:49 +000015386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15387$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015388if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390else
Matthias Kloseb9621712010-04-24 17:59:49 +000015391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015392/* end confdefs.h. */
15393#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394#if !HAVE_DECL_TZNAME
15395extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015396#endif
15397
15398int
15399main ()
15400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015401return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015402 ;
15403 return 0;
15404}
15405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015406if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015407 ac_cv_var_tzname=yes
15408else
Matthias Kloseb9621712010-04-24 17:59:49 +000015409 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015411rm -f core conftest.err conftest.$ac_objext \
15412 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15415$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015416 if test $ac_cv_var_tzname = yes; then
15417
Matthias Kloseb9621712010-04-24 17:59:49 +000015418$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015419
15420 fi
15421fi
15422
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015423
Martin v. Löwis1d459062005-03-14 21:23:33 +000015424# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15426$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015427if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015428 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015429else
15430
Matthias Kloseb9621712010-04-24 17:59:49 +000015431if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015432 ac_cv_working_tzset=no
15433else
Matthias Kloseb9621712010-04-24 17:59:49 +000015434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015435/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015436
15437#include <stdlib.h>
15438#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015439#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015440
15441#if HAVE_TZNAME
15442extern char *tzname[];
15443#endif
15444
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015445int main()
15446{
Brett Cannon18367812003-09-19 00:59:16 +000015447 /* Note that we need to ensure that not only does tzset(3)
15448 do 'something' with localtime, but it works as documented
15449 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015450 This includes making sure that tzname is set properly if
15451 tm->tm_zone does not exist since it is the alternative way
15452 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015453
15454 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015455 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015456 */
15457
Martin v. Löwis1d459062005-03-14 21:23:33 +000015458 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015459 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15460
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015461 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015462 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015463 if (localtime(&groundhogday)->tm_hour != 0)
15464 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015465#if HAVE_TZNAME
15466 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15467 if (strcmp(tzname[0], "UTC") ||
15468 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15469 exit(1);
15470#endif
Brett Cannon18367812003-09-19 00:59:16 +000015471
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015472 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015473 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015474 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015475 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015476#if HAVE_TZNAME
15477 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15478 exit(1);
15479#endif
Brett Cannon18367812003-09-19 00:59:16 +000015480
15481 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15482 tzset();
15483 if (localtime(&groundhogday)->tm_hour != 11)
15484 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015485#if HAVE_TZNAME
15486 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15487 exit(1);
15488#endif
15489
15490#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015491 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15492 exit(1);
15493 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15494 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015495#endif
Brett Cannon18367812003-09-19 00:59:16 +000015496
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015497 exit(0);
15498}
15499
15500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015501if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015502 ac_cv_working_tzset=yes
15503else
Matthias Kloseb9621712010-04-24 17:59:49 +000015504 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15507 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015508fi
15509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015510fi
15511
Matthias Kloseb9621712010-04-24 17:59:49 +000015512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15513$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015514if test "$ac_cv_working_tzset" = yes
15515then
15516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015518
15519fi
15520
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015521# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15523$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015524if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015525 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015526else
Matthias Kloseb9621712010-04-24 17:59:49 +000015527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015528/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015529#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015530int
15531main ()
15532{
15533
15534struct stat st;
15535st.st_mtim.tv_nsec = 1;
15536
15537 ;
15538 return 0;
15539}
15540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015541if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015542 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015543else
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15547fi
15548
Matthias Kloseb9621712010-04-24 17:59:49 +000015549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15550$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015551if test "$ac_cv_stat_tv_nsec" = yes
15552then
15553
Matthias Kloseb9621712010-04-24 17:59:49 +000015554$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015555
15556fi
15557
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015558# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15560$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015561if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015562 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015563else
Matthias Kloseb9621712010-04-24 17:59:49 +000015564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015565/* end confdefs.h. */
15566#include <sys/stat.h>
15567int
15568main ()
15569{
15570
15571struct stat st;
15572st.st_mtimespec.tv_nsec = 1;
15573
15574 ;
15575 return 0;
15576}
15577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015579 ac_cv_stat_tv_nsec2=yes
15580else
Matthias Kloseb9621712010-04-24 17:59:49 +000015581 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15584fi
15585
Matthias Kloseb9621712010-04-24 17:59:49 +000015586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15587$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015588if test "$ac_cv_stat_tv_nsec2" = yes
15589then
15590
Matthias Kloseb9621712010-04-24 17:59:49 +000015591$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015592
15593fi
15594
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015595# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015596ac_save_cppflags="$CPPFLAGS"
15597CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015598
15599for ac_header in curses.h ncurses.h
15600do :
15601 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15602ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15603if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15604 cat >>confdefs.h <<_ACEOF
15605#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15606_ACEOF
15607
15608fi
15609
15610done
15611
15612
15613# On Solaris, term.h requires curses.h
15614for ac_header in term.h
15615do :
15616 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15617#ifdef HAVE_CURSES_H
15618#include <curses.h>
15619#endif
15620
15621"
15622if test "x$ac_cv_header_term_h" = xyes; then :
15623 cat >>confdefs.h <<_ACEOF
15624#define HAVE_TERM_H 1
15625_ACEOF
15626
15627fi
15628
15629done
15630
15631
Jack Jansen666b1e72001-10-31 12:11:48 +000015632# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15634$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015635if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015636 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015637else
Matthias Kloseb9621712010-04-24 17:59:49 +000015638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015639/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015640#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015641int
15642main ()
15643{
Jack Jansen666b1e72001-10-31 12:11:48 +000015644
15645 int rtn;
15646 rtn = mvwdelch(0,0,0);
15647
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 ;
15649 return 0;
15650}
15651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015652if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015653 ac_cv_mvwdelch_is_expression=yes
15654else
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15658fi
15659
Matthias Kloseb9621712010-04-24 17:59:49 +000015660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15661$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015662
15663if test "$ac_cv_mvwdelch_is_expression" = yes
15664then
Martin v. Löwis11437992002-04-12 09:54:03 +000015665
Matthias Kloseb9621712010-04-24 17:59:49 +000015666$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015667
15668fi
15669
Matthias Kloseb9621712010-04-24 17:59:49 +000015670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15671$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015672if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015673 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015674else
Matthias Kloseb9621712010-04-24 17:59:49 +000015675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015676/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015677#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015678int
15679main ()
15680{
Jack Jansen666b1e72001-10-31 12:11:48 +000015681
15682 WINDOW *w;
15683 w->_flags = 0;
15684
Martin v. Löwis11437992002-04-12 09:54:03 +000015685 ;
15686 return 0;
15687}
15688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015689if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015690 ac_cv_window_has_flags=yes
15691else
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15695fi
15696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15698$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015699
Jack Jansen666b1e72001-10-31 12:11:48 +000015700
15701if test "$ac_cv_window_has_flags" = yes
15702then
Martin v. Löwis11437992002-04-12 09:54:03 +000015703
Matthias Kloseb9621712010-04-24 17:59:49 +000015704$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015705
15706fi
15707
Matthias Kloseb9621712010-04-24 17:59:49 +000015708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15709$as_echo_n "checking for is_term_resized... " >&6; }
15710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015711/* end confdefs.h. */
15712#include <curses.h>
15713int
15714main ()
15715{
15716void *x=is_term_resized
15717 ;
15718 return 0;
15719}
15720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015721if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015724
Matthias Kloseb159a552010-04-25 21:00:44 +000015725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015726$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015727else
Matthias Kloseb9621712010-04-24 17:59:49 +000015728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15729$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015730
15731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15733
Matthias Kloseb9621712010-04-24 17:59:49 +000015734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15735$as_echo_n "checking for resize_term... " >&6; }
15736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015737/* end confdefs.h. */
15738#include <curses.h>
15739int
15740main ()
15741{
15742void *x=resize_term
15743 ;
15744 return 0;
15745}
15746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015747if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015748
Matthias Kloseb9621712010-04-24 17:59:49 +000015749$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015750
Matthias Kloseb159a552010-04-25 21:00:44 +000015751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015752$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015753else
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15755$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015756
15757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15759
Matthias Kloseb9621712010-04-24 17:59:49 +000015760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15761$as_echo_n "checking for resizeterm... " >&6; }
15762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015763/* end confdefs.h. */
15764#include <curses.h>
15765int
15766main ()
15767{
15768void *x=resizeterm
15769 ;
15770 return 0;
15771}
15772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015773if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015774
Matthias Kloseb9621712010-04-24 17:59:49 +000015775$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015776
Matthias Kloseb159a552010-04-25 21:00:44 +000015777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015778$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015779else
Matthias Kloseb9621712010-04-24 17:59:49 +000015780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15781$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015782
15783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015785# last curses configure check
15786CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015787
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15789$as_echo "$as_me: checking for device files" >&6;}
15790
15791if test "x$cross_compiling" = xyes; then
15792 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15794$as_echo_n "checking for /dev/ptmx... " >&6; }
15795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15796$as_echo "not set" >&6; }
15797 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15798 fi
15799 if test "${ac_cv_file__dev_ptc+set}" != set; then
15800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15801$as_echo_n "checking for /dev/ptc... " >&6; }
15802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15803$as_echo "not set" >&6; }
15804 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15805 fi
15806fi
15807
Matthias Kloseb9621712010-04-24 17:59:49 +000015808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15809$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015810if ${ac_cv_file__dev_ptmx+:} false; then :
15811 $as_echo_n "(cached) " >&6
15812else
15813 test "$cross_compiling" = yes &&
15814 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15815if test -r "/dev/ptmx"; then
15816 ac_cv_file__dev_ptmx=yes
15817else
15818 ac_cv_file__dev_ptmx=no
15819fi
15820fi
15821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15822$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15823if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015824
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015825fi
15826
15827if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015828
Matthias Kloseb9621712010-04-24 17:59:49 +000015829$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015830
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15833$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015834if ${ac_cv_file__dev_ptc+:} false; then :
15835 $as_echo_n "(cached) " >&6
15836else
15837 test "$cross_compiling" = yes &&
15838 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15839if test -r "/dev/ptc"; then
15840 ac_cv_file__dev_ptc=yes
15841else
15842 ac_cv_file__dev_ptc=no
15843fi
15844fi
15845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15846$as_echo "$ac_cv_file__dev_ptc" >&6; }
15847if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015848
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015849fi
15850
15851if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015852
Matthias Kloseb9621712010-04-24 17:59:49 +000015853$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015854
Neal Norwitz865400f2003-03-21 01:42:58 +000015855fi
15856
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015857if test "$have_long_long" = yes
15858then
Matthias Kloseb9621712010-04-24 17:59:49 +000015859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15860$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015861 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015862 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015863else
Matthias Kloseb9621712010-04-24 17:59:49 +000015864 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015865 ac_cv_have_long_long_format="cross -- assuming no"
15866 if test x$GCC = xyes; then
15867 save_CFLAGS=$CFLAGS
15868 CFLAGS="$CFLAGS -Werror -Wformat"
15869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15870/* end confdefs.h. */
15871
15872 #include <stdio.h>
15873 #include <stddef.h>
15874
15875int
15876main ()
15877{
15878
15879 char *buffer;
15880 sprintf(buffer, "%lld", (long long)123);
15881 sprintf(buffer, "%lld", (long long)-123);
15882 sprintf(buffer, "%llu", (unsigned long long)123);
15883
15884 ;
15885 return 0;
15886}
15887_ACEOF
15888if ac_fn_c_try_compile "$LINENO"; then :
15889 ac_cv_have_long_long_format=yes
15890
15891fi
15892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15893 CFLAGS=$save_CFLAGS
15894 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015895else
Matthias Kloseb9621712010-04-24 17:59:49 +000015896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015897/* end confdefs.h. */
15898
15899 #include <stdio.h>
15900 #include <stddef.h>
15901 #include <string.h>
15902
15903 #ifdef HAVE_SYS_TYPES_H
15904 #include <sys/types.h>
15905 #endif
15906
15907 int main()
15908 {
15909 char buffer[256];
15910
15911 if (sprintf(buffer, "%lld", (long long)123) < 0)
15912 return 1;
15913 if (strcmp(buffer, "123"))
15914 return 1;
15915
15916 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15917 return 1;
15918 if (strcmp(buffer, "-123"))
15919 return 1;
15920
15921 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15922 return 1;
15923 if (strcmp(buffer, "123"))
15924 return 1;
15925
15926 return 0;
15927 }
15928
15929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015930if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015931 ac_cv_have_long_long_format=yes
15932else
Matthias Kloseb9621712010-04-24 17:59:49 +000015933 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015937fi
15938
15939
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015940fi
15941
Matthias Kloseb9621712010-04-24 17:59:49 +000015942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15943$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015944fi
15945
Mark Dickinson89d7d412009-12-31 20:50:59 +000015946if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015947then
15948
Matthias Kloseb9621712010-04-24 17:59:49 +000015949$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015950
15951fi
15952
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015953if test $ac_sys_system = Darwin
15954then
15955 LIBS="$LIBS -framework CoreFoundation"
15956fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015957
Matthias Kloseb9621712010-04-24 17:59:49 +000015958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15959$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015960if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015961 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015962else
Matthias Kloseb9621712010-04-24 17:59:49 +000015963 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015964 ac_cv_have_size_t_format="cross -- assuming yes"
15965
Thomas Wouters477c8d52006-05-27 19:21:47 +000015966else
Matthias Kloseb9621712010-04-24 17:59:49 +000015967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015968/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015969
Thomas Wouters477c8d52006-05-27 19:21:47 +000015970#include <stdio.h>
15971#include <stddef.h>
15972#include <string.h>
15973
Christian Heimes2c181612007-12-17 20:04:13 +000015974#ifdef HAVE_SYS_TYPES_H
15975#include <sys/types.h>
15976#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015977
15978#ifdef HAVE_SSIZE_T
15979typedef ssize_t Py_ssize_t;
15980#elif SIZEOF_VOID_P == SIZEOF_LONG
15981typedef long Py_ssize_t;
15982#else
15983typedef int Py_ssize_t;
15984#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015985
Christian Heimes2c181612007-12-17 20:04:13 +000015986int main()
15987{
15988 char buffer[256];
15989
Thomas Wouters477c8d52006-05-27 19:21:47 +000015990 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15991 return 1;
15992
Thomas Wouters89f507f2006-12-13 04:49:30 +000015993 if (strcmp(buffer, "123"))
15994 return 1;
15995
15996 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15997 return 1;
15998
15999 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016000 return 1;
16001
16002 return 0;
16003}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016004
Thomas Wouters477c8d52006-05-27 19:21:47 +000016005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016006if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016007 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016008else
Matthias Kloseb9621712010-04-24 17:59:49 +000016009 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16012 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016013fi
16014
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16017$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016018if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016019
Matthias Kloseb9621712010-04-24 17:59:49 +000016020$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016021
16022fi
16023
Matthias Kloseb9621712010-04-24 17:59:49 +000016024ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016025#ifdef HAVE_SYS_TYPES_H
16026#include <sys/types.h>
16027#endif
16028#ifdef HAVE_SYS_SOCKET_H
16029#include <sys/socket.h>
16030#endif
16031
Matthias Kloseb9621712010-04-24 17:59:49 +000016032"
Victor Stinnere0be4232011-10-25 13:06:09 +020016033if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016034
Martin v. Löwis11437992002-04-12 09:54:03 +000016035else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016038
16039fi
16040
Michael W. Hudson54241132001-12-07 15:38:26 +000016041
Matthias Kloseb9621712010-04-24 17:59:49 +000016042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16043$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016044if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016045 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016046else
Matthias Kloseb9621712010-04-24 17:59:49 +000016047 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016048 ac_cv_broken_mbstowcs=no
16049else
Matthias Kloseb9621712010-04-24 17:59:49 +000016050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016051/* end confdefs.h. */
16052
Stefan Krah19c21392012-11-22 23:47:32 +010016053#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016054#include<stdlib.h>
16055int main() {
16056 size_t len = -1;
16057 const char *str = "text";
16058 len = mbstowcs(NULL, str, 0);
16059 return (len != 4);
16060}
16061
16062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016063if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016064 ac_cv_broken_mbstowcs=no
16065else
Matthias Kloseb9621712010-04-24 17:59:49 +000016066 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16069 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016070fi
16071
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016072fi
16073
Matthias Kloseb9621712010-04-24 17:59:49 +000016074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16075$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016076if test "$ac_cv_broken_mbstowcs" = yes
16077then
16078
Matthias Kloseb9621712010-04-24 17:59:49 +000016079$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016080
16081fi
16082
Antoine Pitroub52ec782009-01-25 16:34:23 +000016083# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16085$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016086
16087# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016088if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016089 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016090if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016091then
16092
Matthias Kloseb9621712010-04-24 17:59:49 +000016093$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016094
Matthias Kloseb9621712010-04-24 17:59:49 +000016095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16096$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016097fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016098if test "$withval" = no
16099then
16100
16101$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16102
Matthias Kloseb9621712010-04-24 17:59:49 +000016103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16104$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016105fi
16106
Antoine Pitrou042b1282010-08-13 21:15:58 +000016107else
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16109$as_echo "no value specified" >&6; }
16110fi
16111
Antoine Pitroub52ec782009-01-25 16:34:23 +000016112
Matthias Kloseb17289e2012-03-15 19:51:34 +010016113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16114$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16115if ${ac_cv_computed_gotos+:} false; then :
16116 $as_echo_n "(cached) " >&6
16117else
16118 if test "$cross_compiling" = yes; then :
16119 if test "${with_computed_gotos+set}" = set; then
16120 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16121 else
16122 ac_cv_computed_gotos=no
16123 fi
16124else
16125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16126/* end confdefs.h. */
16127
16128int main(int argc, char **argv)
16129{
16130 static void *targets[1] = { &&LABEL1 };
16131 goto LABEL2;
16132LABEL1:
16133 return 0;
16134LABEL2:
16135 goto *targets[0];
16136 return 1;
16137}
16138
16139_ACEOF
16140if ac_fn_c_try_run "$LINENO"; then :
16141 ac_cv_computed_gotos=yes
16142else
16143 ac_cv_computed_gotos=no
16144fi
16145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16146 conftest.$ac_objext conftest.beam conftest.$ac_ext
16147fi
16148
16149fi
16150
16151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16152$as_echo "$ac_cv_computed_gotos" >&6; }
16153case "$ac_cv_computed_gotos" in yes*)
16154
16155$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16156
16157esac
16158
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016159case $ac_sys_system in
16160AIX*)
16161
16162$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16163 ;;
16164esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016165
Michael W. Hudson54241132001-12-07 15:38:26 +000016166
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016167
16168
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016169for h in `(cd $srcdir;echo Python/thread_*.h)`
16170do
16171 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16172done
16173
Michael W. Hudson54241132001-12-07 15:38:26 +000016174
Ned Deily0db50cf2014-07-25 12:41:31 -070016175SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16177$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016178for dir in $SRCDIRS; do
16179 if test ! -d $dir; then
16180 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016181 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016182done
Matthias Kloseb9621712010-04-24 17:59:49 +000016183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16184$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016185
Stefan Krah1919b7e2012-03-21 18:25:23 +010016186# Availability of -O2:
16187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16188$as_echo_n "checking for -O2... " >&6; }
16189saved_cflags="$CFLAGS"
16190CFLAGS="-O2"
16191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16192/* end confdefs.h. */
16193
16194int
16195main ()
16196{
16197
16198
16199 ;
16200 return 0;
16201}
16202_ACEOF
16203if ac_fn_c_try_compile "$LINENO"; then :
16204 have_O2=yes
16205else
16206 have_O2=no
16207fi
16208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16210$as_echo "$have_O2" >&6; }
16211CFLAGS="$saved_cflags"
16212
16213# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16214# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16216$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16217saved_cflags="$CFLAGS"
16218CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16219if test "$have_O2" = no; then
16220 CFLAGS=""
16221fi
16222if test "$cross_compiling" = yes; then :
16223 have_glibc_memmove_bug=undefined
16224else
16225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16226/* end confdefs.h. */
16227
16228#include <stdio.h>
16229#include <stdlib.h>
16230#include <string.h>
16231void foo(void *p, void *q) { memmove(p, q, 19); }
16232int main() {
16233 char a[32] = "123456789000000000";
16234 foo(&a[9], a);
16235 if (strcmp(a, "123456789123456789000000000") != 0)
16236 return 1;
16237 foo(a, &a[9]);
16238 if (strcmp(a, "123456789000000000") != 0)
16239 return 1;
16240 return 0;
16241}
16242
16243_ACEOF
16244if ac_fn_c_try_run "$LINENO"; then :
16245 have_glibc_memmove_bug=no
16246else
16247 have_glibc_memmove_bug=yes
16248fi
16249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16250 conftest.$ac_objext conftest.beam conftest.$ac_ext
16251fi
16252
16253CFLAGS="$saved_cflags"
16254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16255$as_echo "$have_glibc_memmove_bug" >&6; }
16256if test "$have_glibc_memmove_bug" = yes; then
16257
16258$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16259
16260fi
16261
16262if test "$have_gcc_asm_for_x87" = yes; then
16263 # Some versions of gcc miscompile inline asm:
16264 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16265 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16266 case $CC in
16267 *gcc*)
16268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16269$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16270 saved_cflags="$CFLAGS"
16271 CFLAGS="-O2"
16272 if test "$cross_compiling" = yes; then :
16273 have_ipa_pure_const_bug=undefined
16274else
16275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16276/* end confdefs.h. */
16277
16278 __attribute__((noinline)) int
16279 foo(int *p) {
16280 int r;
16281 asm ( "movl \$6, (%1)\n\t"
16282 "xorl %0, %0\n\t"
16283 : "=r" (r) : "r" (p) : "memory"
16284 );
16285 return r;
16286 }
16287 int main() {
16288 int p = 8;
16289 if ((foo(&p) ? : p) != 6)
16290 return 1;
16291 return 0;
16292 }
16293
16294_ACEOF
16295if ac_fn_c_try_run "$LINENO"; then :
16296 have_ipa_pure_const_bug=no
16297else
16298 have_ipa_pure_const_bug=yes
16299fi
16300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16301 conftest.$ac_objext conftest.beam conftest.$ac_ext
16302fi
16303
16304 CFLAGS="$saved_cflags"
16305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16306$as_echo "$have_ipa_pure_const_bug" >&6; }
16307 if test "$have_ipa_pure_const_bug" = yes; then
16308
16309$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16310
16311 fi
16312 ;;
16313 esac
16314fi
16315
Victor Stinner4f5366e2015-01-09 02:13:19 +010016316# Check for stdatomic.h
16317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16318$as_echo_n "checking for stdatomic.h... " >&6; }
16319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16320/* end confdefs.h. */
16321
16322
16323 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016324 atomic_int value = ATOMIC_VAR_INIT(1);
16325 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016326 int main() {
16327 int loaded_value = atomic_load(&value);
16328 return 0;
16329 }
16330
16331
16332_ACEOF
16333if ac_fn_c_try_link "$LINENO"; then :
16334 have_stdatomic_h=yes
16335else
16336 have_stdatomic_h=no
16337fi
16338rm -f core conftest.err conftest.$ac_objext \
16339 conftest$ac_exeext conftest.$ac_ext
16340
16341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16342$as_echo "$have_stdatomic_h" >&6; }
16343
16344if test "$have_stdatomic_h" = yes; then
16345
16346$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16347
16348fi
16349
16350# Check for GCC >= 4.7 __atomic builtins
16351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16352$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16354/* end confdefs.h. */
16355
16356
16357 volatile int val = 1;
16358 int main() {
16359 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16360 return 0;
16361 }
16362
16363
16364_ACEOF
16365if ac_fn_c_try_link "$LINENO"; then :
16366 have_builtin_atomic=yes
16367else
16368 have_builtin_atomic=no
16369fi
16370rm -f core conftest.err conftest.$ac_objext \
16371 conftest$ac_exeext conftest.$ac_ext
16372
16373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16374$as_echo "$have_builtin_atomic" >&6; }
16375
16376if test "$have_builtin_atomic" = yes; then
16377
16378$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16379
16380fi
16381
Ned Deily322f5ba2013-11-21 23:01:59 -080016382# ensurepip option
16383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16384$as_echo_n "checking for ensurepip... " >&6; }
16385
16386# Check whether --with-ensurepip was given.
16387if test "${with_ensurepip+set}" = set; then :
16388 withval=$with_ensurepip;
16389else
16390 with_ensurepip=upgrade
16391fi
16392
16393case $with_ensurepip in #(
16394 yes|upgrade) :
16395 ENSUREPIP=upgrade ;; #(
16396 install) :
16397 ENSUREPIP=install ;; #(
16398 no) :
16399 ENSUREPIP=no ;; #(
16400 *) :
16401 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16402esac
16403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16404$as_echo "$ENSUREPIP" >&6; }
16405
16406
Victor Stinner35a97c02015-03-08 02:59:09 +010016407# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16409$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16411/* end confdefs.h. */
16412
16413
16414 #include <dirent.h>
16415
16416 int main() {
16417 struct dirent entry;
16418 return entry.d_type == DT_UNKNOWN;
16419 }
16420
16421
16422_ACEOF
16423if ac_fn_c_try_link "$LINENO"; then :
16424 have_dirent_d_type=yes
16425else
16426 have_dirent_d_type=no
16427fi
16428rm -f core conftest.err conftest.$ac_objext \
16429 conftest$ac_exeext conftest.$ac_ext
16430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16431$as_echo "$have_dirent_d_type" >&6; }
16432
16433if test "$have_dirent_d_type" = yes; then
16434
16435$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16436
16437fi
16438
Victor Stinner9eb57c52015-03-19 22:21:49 +010016439# check if the Linux getrandom() syscall is available
16440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16441$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16443/* end confdefs.h. */
16444
16445
Victor Stinner1b80b242016-04-12 22:34:58 +020016446 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016447 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016448 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016449
16450 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016451 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016452 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016453 const int flags = GRND_NONBLOCK;
16454 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016455 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016456 return 0;
16457 }
16458
16459
16460_ACEOF
16461if ac_fn_c_try_link "$LINENO"; then :
16462 have_getrandom_syscall=yes
16463else
16464 have_getrandom_syscall=no
16465fi
16466rm -f core conftest.err conftest.$ac_objext \
16467 conftest$ac_exeext conftest.$ac_ext
16468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16469$as_echo "$have_getrandom_syscall" >&6; }
16470
16471if test "$have_getrandom_syscall" = yes; then
16472
16473$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16474
16475fi
16476
Victor Stinner3abf44e2015-09-18 15:38:37 +020016477# check if the getrandom() function is available
16478# the test was written for the Solaris function of <sys/random.h>
16479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16480$as_echo_n "checking for the getrandom() function... " >&6; }
16481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16482/* end confdefs.h. */
16483
16484
16485 #include <sys/random.h>
16486
16487 int main() {
16488 char buffer[1];
16489 const size_t buflen = sizeof(buffer);
16490 const int flags = 0;
16491 /* ignore the result, Python checks for ENOSYS at runtime */
16492 (void)getrandom(buffer, buflen, flags);
16493 return 0;
16494 }
16495
16496
16497_ACEOF
16498if ac_fn_c_try_link "$LINENO"; then :
16499 have_getrandom=yes
16500else
16501 have_getrandom=no
16502fi
16503rm -f core conftest.err conftest.$ac_objext \
16504 conftest$ac_exeext conftest.$ac_ext
16505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16506$as_echo "$have_getrandom" >&6; }
16507
16508if test "$have_getrandom" = yes; then
16509
16510$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16511
16512fi
16513
Guido van Rossum627b2d71993-12-24 10:39:16 +000016514# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016515ac_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 +000016516
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016517ac_config_files="$ac_config_files Modules/ld_so_aix"
16518
Martin v. Löwis11437992002-04-12 09:54:03 +000016519cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016520# This file is a shell script that caches the results of configure
16521# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016522# scripts and configure runs, see configure's option --config-cache.
16523# It is not useful on other systems. If it contains results you don't
16524# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016525#
Martin v. Löwis11437992002-04-12 09:54:03 +000016526# config.status only pays attention to the cache file if you give it
16527# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016528#
Skip Montanaro6dead952003-09-25 14:50:04 +000016529# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016530# loading this file, other *unset* `ac_cv_foo' will be assigned the
16531# following values.
16532
16533_ACEOF
16534
Guido van Rossumf78abae1997-01-21 22:02:36 +000016535# The following way of writing the cache mishandles newlines in values,
16536# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016537# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016538# Ultrix sh set writes to stderr and can't be redirected directly,
16539# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016540(
16541 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16542 eval ac_val=\$$ac_var
16543 case $ac_val in #(
16544 *${as_nl}*)
16545 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016546 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16547$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016548 esac
16549 case $ac_var in #(
16550 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016551 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16552 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016553 esac ;;
16554 esac
16555 done
16556
Martin v. Löwis11437992002-04-12 09:54:03 +000016557 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016558 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16559 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016560 # `set' does not quote correctly, so add quotes: double-quote
16561 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016562 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016563 "s/'/'\\\\''/g;
16564 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016565 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016566 *)
16567 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016569 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016570 esac |
16571 sort
16572) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016574 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016575 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016576 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016577 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16578 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016579 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16580 :end' >>confcache
16581if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16582 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016583 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016584 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16585$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016586 if test ! -f "$cache_file" || test -h "$cache_file"; then
16587 cat confcache >"$cache_file"
16588 else
16589 case $cache_file in #(
16590 */* | ?:*)
16591 mv -f confcache "$cache_file"$$ &&
16592 mv -f "$cache_file"$$ "$cache_file" ;; #(
16593 *)
16594 mv -f confcache "$cache_file" ;;
16595 esac
16596 fi
16597 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016598 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016599 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16600$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016601 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016602fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016603rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016604
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016605test "x$prefix" = xNONE && prefix=$ac_default_prefix
16606# Let make expand exec_prefix.
16607test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016608
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016609DEFS=-DHAVE_CONFIG_H
16610
Skip Montanaro6dead952003-09-25 14:50:04 +000016611ac_libobjs=
16612ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016613U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016614for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16615 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016617 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016618 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16619 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016620 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16621 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016622done
16623LIBOBJS=$ac_libobjs
16624
16625LTLIBOBJS=$ac_ltlibobjs
16626
16627
Martin v. Löwis11437992002-04-12 09:54:03 +000016628
Matthias Kloseb9621712010-04-24 17:59:49 +000016629
Victor Stinnere0be4232011-10-25 13:06:09 +020016630: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016631ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016632ac_clean_files_save=$ac_clean_files
16633ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016634{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16635$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16636as_write_fail=0
16637cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016638#! $SHELL
16639# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016640# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016641# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016642# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016643
Martin v. Löwis11437992002-04-12 09:54:03 +000016644debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016645ac_cs_recheck=false
16646ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016647
Matthias Kloseb9621712010-04-24 17:59:49 +000016648SHELL=\${CONFIG_SHELL-$SHELL}
16649export SHELL
16650_ASEOF
16651cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16652## -------------------- ##
16653## M4sh Initialization. ##
16654## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016656# Be more Bourne compatible
16657DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016658if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016659 emulate sh
16660 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016661 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016662 # is contrary to our usage. Disable this feature.
16663 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016665else
Matthias Kloseb9621712010-04-24 17:59:49 +000016666 case `(set -o) 2>/dev/null` in #(
16667 *posix*) :
16668 set -o posix ;; #(
16669 *) :
16670 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016671esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016672fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016673
16674
Matthias Kloseb9621712010-04-24 17:59:49 +000016675as_nl='
16676'
16677export as_nl
16678# Printing a long string crashes Solaris 7 /usr/bin/printf.
16679as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16680as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16681as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16682# Prefer a ksh shell builtin over an external printf program on Solaris,
16683# but without wasting forks for bash or zsh.
16684if test -z "$BASH_VERSION$ZSH_VERSION" \
16685 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16686 as_echo='print -r --'
16687 as_echo_n='print -rn --'
16688elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16689 as_echo='printf %s\n'
16690 as_echo_n='printf %s'
16691else
16692 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16693 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16694 as_echo_n='/usr/ucb/echo -n'
16695 else
16696 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16697 as_echo_n_body='eval
16698 arg=$1;
16699 case $arg in #(
16700 *"$as_nl"*)
16701 expr "X$arg" : "X\\(.*\\)$as_nl";
16702 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16703 esac;
16704 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16705 '
16706 export as_echo_n_body
16707 as_echo_n='sh -c $as_echo_n_body as_echo'
16708 fi
16709 export as_echo_body
16710 as_echo='sh -c $as_echo_body as_echo'
16711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016712
16713# The user is always right.
16714if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016715 PATH_SEPARATOR=:
16716 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16717 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16718 PATH_SEPARATOR=';'
16719 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722
16723# IFS
16724# We need space, tab and new line, in precisely that order. Quoting is
16725# there to prevent editors from complaining about space-tab.
16726# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16727# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728IFS=" "" $as_nl"
16729
16730# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016731as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016732case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016733 *[\\/]* ) as_myself=$0 ;;
16734 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016735for as_dir in $PATH
16736do
16737 IFS=$as_save_IFS
16738 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016739 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016743 ;;
16744esac
16745# We did not find ourselves, most probably we were run as `sh COMMAND'
16746# in which case we are not to be found in the path.
16747if test "x$as_myself" = x; then
16748 as_myself=$0
16749fi
16750if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016751 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16752 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753fi
16754
Matthias Kloseb9621712010-04-24 17:59:49 +000016755# Unset variables that we do not need and which cause bugs (e.g. in
16756# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16757# suppresses any "Segmentation fault" message there. '((' could
16758# trigger a bug in pdksh 5.2.14.
16759for as_var in BASH_ENV ENV MAIL MAILPATH
16760do eval test x\${$as_var+set} = xset \
16761 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016762done
16763PS1='$ '
16764PS2='> '
16765PS4='+ '
16766
16767# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016768LC_ALL=C
16769export LC_ALL
16770LANGUAGE=C
16771export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016772
Matthias Kloseb9621712010-04-24 17:59:49 +000016773# CDPATH.
16774(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16775
16776
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016777# as_fn_error STATUS ERROR [LINENO LOG_FD]
16778# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016779# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16780# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016781# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016782as_fn_error ()
16783{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016784 as_status=$1; test $as_status -eq 0 && as_status=1
16785 if test "$4"; then
16786 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16787 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016788 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016789 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016790 as_fn_exit $as_status
16791} # as_fn_error
16792
16793
16794# as_fn_set_status STATUS
16795# -----------------------
16796# Set $? to STATUS, without forking.
16797as_fn_set_status ()
16798{
16799 return $1
16800} # as_fn_set_status
16801
16802# as_fn_exit STATUS
16803# -----------------
16804# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16805as_fn_exit ()
16806{
16807 set +e
16808 as_fn_set_status $1
16809 exit $1
16810} # as_fn_exit
16811
16812# as_fn_unset VAR
16813# ---------------
16814# Portably unset VAR.
16815as_fn_unset ()
16816{
16817 { eval $1=; unset $1;}
16818}
16819as_unset=as_fn_unset
16820# as_fn_append VAR VALUE
16821# ----------------------
16822# Append the text in VALUE to the end of the definition contained in VAR. Take
16823# advantage of any shell optimizations that allow amortized linear growth over
16824# repeated appends, instead of the typical quadratic growth present in naive
16825# implementations.
16826if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16827 eval 'as_fn_append ()
16828 {
16829 eval $1+=\$2
16830 }'
16831else
16832 as_fn_append ()
16833 {
16834 eval $1=\$$1\$2
16835 }
16836fi # as_fn_append
16837
16838# as_fn_arith ARG...
16839# ------------------
16840# Perform arithmetic evaluation on the ARGs, and store the result in the
16841# global $as_val. Take advantage of shells that can avoid forks. The arguments
16842# must be portable across $(()) and expr.
16843if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16844 eval 'as_fn_arith ()
16845 {
16846 as_val=$(( $* ))
16847 }'
16848else
16849 as_fn_arith ()
16850 {
16851 as_val=`expr "$@" || test $? -eq 1`
16852 }
16853fi # as_fn_arith
16854
16855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016856if expr a : '\(a\)' >/dev/null 2>&1 &&
16857 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16858 as_expr=expr
16859else
16860 as_expr=false
16861fi
16862
16863if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16864 as_basename=basename
16865else
16866 as_basename=false
16867fi
16868
Matthias Kloseb9621712010-04-24 17:59:49 +000016869if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16870 as_dirname=dirname
16871else
16872 as_dirname=false
16873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875as_me=`$as_basename -- "$0" ||
16876$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16877 X"$0" : 'X\(//\)$' \| \
16878 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016879$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016880 sed '/^.*\/\([^/][^/]*\)\/*$/{
16881 s//\1/
16882 q
16883 }
16884 /^X\/\(\/\/\)$/{
16885 s//\1/
16886 q
16887 }
16888 /^X\/\(\/\).*/{
16889 s//\1/
16890 q
16891 }
16892 s/.*/./; q'`
16893
Matthias Kloseb9621712010-04-24 17:59:49 +000016894# Avoid depending upon Character Ranges.
16895as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16896as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16897as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16898as_cr_digits='0123456789'
16899as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016900
16901ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016902case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016903-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016906 xy) ECHO_C='\c';;
16907 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16908 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016909 esac;;
16910*)
16911 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016913
Martin v. Löwis11437992002-04-12 09:54:03 +000016914rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016915if test -d conf$$.dir; then
16916 rm -f conf$$.dir/conf$$.file
16917else
16918 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016919 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016921if (echo >conf$$.file) 2>/dev/null; then
16922 if ln -s conf$$.file conf$$ 2>/dev/null; then
16923 as_ln_s='ln -s'
16924 # ... but there are two gotchas:
16925 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16926 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016927 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016928 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016929 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016930 elif ln conf$$.file conf$$ 2>/dev/null; then
16931 as_ln_s=ln
16932 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016933 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016934 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016935else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016936 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016938rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16939rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016940
Matthias Kloseb9621712010-04-24 17:59:49 +000016941
16942# as_fn_mkdir_p
16943# -------------
16944# Create "$as_dir" as a directory, including parents if necessary.
16945as_fn_mkdir_p ()
16946{
16947
16948 case $as_dir in #(
16949 -*) as_dir=./$as_dir;;
16950 esac
16951 test -d "$as_dir" || eval $as_mkdir_p || {
16952 as_dirs=
16953 while :; do
16954 case $as_dir in #(
16955 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16956 *) as_qdir=$as_dir;;
16957 esac
16958 as_dirs="'$as_qdir' $as_dirs"
16959 as_dir=`$as_dirname -- "$as_dir" ||
16960$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16961 X"$as_dir" : 'X\(//\)[^/]' \| \
16962 X"$as_dir" : 'X\(//\)$' \| \
16963 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16964$as_echo X"$as_dir" |
16965 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16966 s//\1/
16967 q
16968 }
16969 /^X\(\/\/\)[^/].*/{
16970 s//\1/
16971 q
16972 }
16973 /^X\(\/\/\)$/{
16974 s//\1/
16975 q
16976 }
16977 /^X\(\/\).*/{
16978 s//\1/
16979 q
16980 }
16981 s/.*/./; q'`
16982 test -d "$as_dir" && break
16983 done
16984 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016985 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016986
16987
16988} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016989if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016990 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016991else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016992 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016993 as_mkdir_p=false
16994fi
16995
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016996
16997# as_fn_executable_p FILE
16998# -----------------------
16999# Test if FILE is an executable regular file.
17000as_fn_executable_p ()
17001{
17002 test -f "$1" && test -x "$1"
17003} # as_fn_executable_p
17004as_test_x='test -x'
17005as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017006
17007# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017008as_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 +000017009
17010# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017011as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017012
17013
Martin v. Löwis11437992002-04-12 09:54:03 +000017014exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017015## ----------------------------------- ##
17016## Main body of $CONFIG_STATUS script. ##
17017## ----------------------------------- ##
17018_ASEOF
17019test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017020
Matthias Kloseb9621712010-04-24 17:59:49 +000017021cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17022# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017023# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017024# values after options handling.
17025ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017026This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017027generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017028
17029 CONFIG_FILES = $CONFIG_FILES
17030 CONFIG_HEADERS = $CONFIG_HEADERS
17031 CONFIG_LINKS = $CONFIG_LINKS
17032 CONFIG_COMMANDS = $CONFIG_COMMANDS
17033 $ $0 $@
17034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035on `(hostname || uname -n) 2>/dev/null | sed 1q`
17036"
17037
Martin v. Löwis11437992002-04-12 09:54:03 +000017038_ACEOF
17039
Matthias Kloseb9621712010-04-24 17:59:49 +000017040case $ac_config_files in *"
17041"*) set x $ac_config_files; shift; ac_config_files=$*;;
17042esac
17043
17044case $ac_config_headers in *"
17045"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17046esac
17047
17048
17049cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017050# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017051config_files="$ac_config_files"
17052config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017054_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017055
Matthias Kloseb9621712010-04-24 17:59:49 +000017056cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017057ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017058\`$as_me' instantiates files and other configuration actions
17059from templates according to the current configuration. Unless the files
17060and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017061
Matthias Kloseb9621712010-04-24 17:59:49 +000017062Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017063
17064 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017066 --config print configuration, then exit
17067 -q, --quiet, --silent
17068 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017069 -d, --debug don't remove temporary files
17070 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017071 --file=FILE[:TEMPLATE]
17072 instantiate the configuration file FILE
17073 --header=FILE[:TEMPLATE]
17074 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017075
17076Configuration files:
17077$config_files
17078
17079Configuration headers:
17080$config_headers
17081
Matthias Kloseb9621712010-04-24 17:59:49 +000017082Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017085cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17086ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017087ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017088python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017089configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017090 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017091
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017092Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017093This config.status script is free software; the Free Software Foundation
17094gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095
17096ac_pwd='$ac_pwd'
17097srcdir='$srcdir'
17098INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017099MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017100test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017101_ACEOF
17102
Matthias Kloseb9621712010-04-24 17:59:49 +000017103cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17104# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017105ac_need_defaults=:
17106while test $# != 0
17107do
17108 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017109 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017110 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17111 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017112 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017113 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017114 --*=)
17115 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17116 ac_optarg=
17117 ac_shift=:
17118 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017119 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017120 ac_option=$1
17121 ac_optarg=$2
17122 ac_shift=shift
17123 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017124 esac
17125
Skip Montanaro6dead952003-09-25 14:50:04 +000017126 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017127 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017128 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17129 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017130 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017131 $as_echo "$ac_cs_version"; exit ;;
17132 --config | --confi | --conf | --con | --co | --c )
17133 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017134 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017135 debug=: ;;
17136 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017137 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017138 case $ac_optarg in
17139 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017140 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017141 esac
17142 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017143 ac_need_defaults=false;;
17144 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017145 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017146 case $ac_optarg in
17147 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17148 esac
17149 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017150 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017151 --he | --h)
17152 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017153 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017154Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017155 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017156 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017157 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17158 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17159 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017160
17161 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017162 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017163Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017164
Matthias Kloseb9621712010-04-24 17:59:49 +000017165 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017167
17168 esac
17169 shift
17170done
17171
Skip Montanaro6dead952003-09-25 14:50:04 +000017172ac_configure_extra_args=
17173
17174if $ac_cs_silent; then
17175 exec 6>/dev/null
17176 ac_configure_extra_args="$ac_configure_extra_args --silent"
17177fi
17178
17179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017180cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017181if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017182 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017183 shift
17184 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17185 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017187 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017188fi
17189
Martin v. Löwis11437992002-04-12 09:54:03 +000017190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017191cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192exec 5>>config.log
17193{
17194 echo
17195 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17196## Running $as_me. ##
17197_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017198 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017199} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017200
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_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017204
Matthias Kloseb9621712010-04-24 17:59:49 +000017205cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017206
17207# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017208for ac_config_target in $ac_config_targets
17209do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210 case $ac_config_target in
17211 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17212 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17213 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017214 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17215 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17217 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017218 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017219 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017220 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017221
Victor Stinnere0be4232011-10-25 13:06:09 +020017222 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017223 esac
17224done
17225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226
Martin v. Löwis11437992002-04-12 09:54:03 +000017227# If the user did not use the arguments to specify the items to instantiate,
17228# then the envvar interface is used. Set only those that are not.
17229# We use the long form for the default assignment because of an extremely
17230# bizarre bug on SunOS 4.1.3.
17231if $ac_need_defaults; then
17232 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17233 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17234fi
17235
Skip Montanaro6dead952003-09-25 14:50:04 +000017236# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017237# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017238# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239# Hook for its removal unless debugging.
17240# Note that there is a small window in which the directory will not be cleaned:
17241# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017242$debug ||
17243{
Victor Stinnere0be4232011-10-25 13:06:09 +020017244 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017245 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017246 : "${ac_tmp:=$tmp}"
17247 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017249 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017250}
Martin v. Löwis11437992002-04-12 09:54:03 +000017251# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017252
Martin v. Löwis11437992002-04-12 09:54:03 +000017253{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017254 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017255 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017256} ||
17257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258 tmp=./conf$$-$RANDOM
17259 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017260} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017261ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017262
Matthias Kloseb9621712010-04-24 17:59:49 +000017263# Set up the scripts for CONFIG_FILES section.
17264# No need to generate them if there are no CONFIG_FILES.
17265# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017266if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017267
Matthias Kloseb9621712010-04-24 17:59:49 +000017268
17269ac_cr=`echo X | tr X '\015'`
17270# On cygwin, bash can eat \r inside `` if the user requested igncr.
17271# But we know of no other shell where ac_cr would be empty at this
17272# point, so we can use a bashism as a fallback.
17273if test "x$ac_cr" = x; then
17274 eval ac_cr=\$\'\\r\'
17275fi
17276ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17277if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017278 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017279else
17280 ac_cs_awk_cr=$ac_cr
17281fi
17282
Victor Stinnere0be4232011-10-25 13:06:09 +020017283echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017284_ACEOF
17285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286
Matthias Kloseb9621712010-04-24 17:59:49 +000017287{
17288 echo "cat >conf$$subs.awk <<_ACEOF" &&
17289 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17290 echo "_ACEOF"
17291} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017292 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17293ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017294ac_delim='%!_!# '
17295for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017296 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017297 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017298
Matthias Kloseb9621712010-04-24 17:59:49 +000017299 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17300 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301 break
17302 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017303 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017304 else
17305 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017306 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307done
Matthias Kloseb9621712010-04-24 17:59:49 +000017308rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017309
Matthias Kloseb9621712010-04-24 17:59:49 +000017310cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017311cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017313sed -n '
17314h
17315s/^/S["/; s/!.*/"]=/
17316p
17317g
17318s/^[^!]*!//
17319:repl
17320t repl
17321s/'"$ac_delim"'$//
17322t delim
17323:nl
17324h
17325s/\(.\{148\}\)..*/\1/
17326t more1
17327s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17328p
17329n
17330b repl
17331:more1
17332s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17333p
17334g
17335s/.\{148\}//
17336t nl
17337:delim
17338h
17339s/\(.\{148\}\)..*/\1/
17340t more2
17341s/["\\]/\\&/g; s/^/"/; s/$/"/
17342p
17343b
17344:more2
17345s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17346p
17347g
17348s/.\{148\}//
17349t delim
17350' <conf$$subs.awk | sed '
17351/^[^""]/{
17352 N
17353 s/\n//
17354}
17355' >>$CONFIG_STATUS || ac_write_fail=1
17356rm -f conf$$subs.awk
17357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17358_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017359cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017360 for (key in S) S_is_set[key] = 1
17361 FS = ""
17362
17363}
17364{
17365 line = $ 0
17366 nfields = split(line, field, "@")
17367 substed = 0
17368 len = length(field[1])
17369 for (i = 2; i < nfields; i++) {
17370 key = field[i]
17371 keylen = length(key)
17372 if (S_is_set[key]) {
17373 value = S[key]
17374 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17375 len += length(value) + length(field[++i])
17376 substed = 1
17377 } else
17378 len += 1 + keylen
17379 }
17380
17381 print line
17382}
17383
17384_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017386cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17387if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17388 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17389else
17390 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017391fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017392 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017393_ACEOF
17394
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017395# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17396# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397# trailing colons and then remove the whole line if VPATH becomes empty
17398# (actually we leave an empty line to preserve line numbers).
17399if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017400 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17401h
17402s///
17403s/^/:/
17404s/[ ]*$/:/
17405s/:\$(srcdir):/:/g
17406s/:\${srcdir}:/:/g
17407s/:@srcdir@:/:/g
17408s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017410x
17411s/\(=[ ]*\).*/\1/
17412G
17413s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414s/^[^=]*=[ ]*$//
17415}'
17416fi
17417
Matthias Kloseb9621712010-04-24 17:59:49 +000017418cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017419fi # test -n "$CONFIG_FILES"
17420
Matthias Kloseb9621712010-04-24 17:59:49 +000017421# Set up the scripts for CONFIG_HEADERS section.
17422# No need to generate them if there are no CONFIG_HEADERS.
17423# This happens for instance with `./config.status Makefile'.
17424if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017425cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017426BEGIN {
17427_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017428
Matthias Kloseb9621712010-04-24 17:59:49 +000017429# Transform confdefs.h into an awk script `defines.awk', embedded as
17430# here-document in config.status, that substitutes the proper values into
17431# config.h.in to produce config.h.
17432
17433# Create a delimiter string that does not exist in confdefs.h, to ease
17434# handling of long lines.
17435ac_delim='%!_!# '
17436for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017437 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17438 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017439 break
17440 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017441 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017442 else
17443 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17444 fi
17445done
17446
17447# For the awk script, D is an array of macro values keyed by name,
17448# likewise P contains macro parameters if any. Preserve backslash
17449# newline sequences.
17450
17451ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17452sed -n '
17453s/.\{148\}/&'"$ac_delim"'/g
17454t rset
17455:rset
17456s/^[ ]*#[ ]*define[ ][ ]*/ /
17457t def
17458d
17459:def
17460s/\\$//
17461t bsnl
17462s/["\\]/\\&/g
17463s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17464D["\1"]=" \3"/p
17465s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17466d
17467:bsnl
17468s/["\\]/\\&/g
17469s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17470D["\1"]=" \3\\\\\\n"\\/p
17471t cont
17472s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17473t cont
17474d
17475:cont
17476n
17477s/.\{148\}/&'"$ac_delim"'/g
17478t clear
17479:clear
17480s/\\$//
17481t bsnlc
17482s/["\\]/\\&/g; s/^/"/; s/$/"/p
17483d
17484:bsnlc
17485s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17486b cont
17487' <confdefs.h | sed '
17488s/'"$ac_delim"'/"\\\
17489"/g' >>$CONFIG_STATUS || ac_write_fail=1
17490
17491cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17492 for (key in D) D_is_set[key] = 1
17493 FS = ""
17494}
17495/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17496 line = \$ 0
17497 split(line, arg, " ")
17498 if (arg[1] == "#") {
17499 defundef = arg[2]
17500 mac1 = arg[3]
17501 } else {
17502 defundef = substr(arg[1], 2)
17503 mac1 = arg[2]
17504 }
17505 split(mac1, mac2, "(") #)
17506 macro = mac2[1]
17507 prefix = substr(line, 1, index(line, defundef) - 1)
17508 if (D_is_set[macro]) {
17509 # Preserve the white space surrounding the "#".
17510 print prefix "define", macro P[macro] D[macro]
17511 next
17512 } else {
17513 # Replace #undef with comments. This is necessary, for example,
17514 # in the case of _POSIX_SOURCE, which is predefined and required
17515 # on some systems where configure will not decide to define it.
17516 if (defundef == "undef") {
17517 print "/*", prefix defundef, macro, "*/"
17518 next
17519 }
17520 }
17521}
17522{ print }
17523_ACAWK
17524_ACEOF
17525cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017526 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017527fi # test -n "$CONFIG_HEADERS"
17528
17529
17530eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17531shift
17532for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533do
17534 case $ac_tag in
17535 :[FHLC]) ac_mode=$ac_tag; continue;;
17536 esac
17537 case $ac_mode$ac_tag in
17538 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017539 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540 :[FH]-) ac_tag=-:-;;
17541 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17542 esac
17543 ac_save_IFS=$IFS
17544 IFS=:
17545 set x $ac_tag
17546 IFS=$ac_save_IFS
17547 shift
17548 ac_file=$1
17549 shift
17550
17551 case $ac_mode in
17552 :L) ac_source=$1;;
17553 :[FH])
17554 ac_file_inputs=
17555 for ac_f
17556 do
17557 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017558 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017559 *) # Look for the file first in the build tree, then in the source tree
17560 # (if the path is not absolute). The absolute path cannot be DOS-style,
17561 # because $ac_f cannot contain `:'.
17562 test -f "$ac_f" ||
17563 case $ac_f in
17564 [\\/$]*) false;;
17565 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17566 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017567 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017569 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17570 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571 done
17572
17573 # Let's still pretend it is `configure' which instantiates (i.e., don't
17574 # use $as_me), people would be surprised to read:
17575 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017576 configure_input='Generated from '`
17577 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17578 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579 if test x"$ac_file" != x-; then
17580 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017581 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17582$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017584 # Neutralize special characters interpreted by sed in replacement strings.
17585 case $configure_input in #(
17586 *\&* | *\|* | *\\* )
17587 ac_sed_conf_input=`$as_echo "$configure_input" |
17588 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17589 *) ac_sed_conf_input=$configure_input;;
17590 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017591
17592 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017593 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17594 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017595 esac
17596 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017597 esac
17598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017600$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017601 X"$ac_file" : 'X\(//\)[^/]' \| \
17602 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017603 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017604$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17606 s//\1/
17607 q
17608 }
17609 /^X\(\/\/\)[^/].*/{
17610 s//\1/
17611 q
17612 }
17613 /^X\(\/\/\)$/{
17614 s//\1/
17615 q
17616 }
17617 /^X\(\/\).*/{
17618 s//\1/
17619 q
17620 }
17621 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017622 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017623 ac_builddir=.
17624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625case "$ac_dir" in
17626.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17627*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017628 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017630 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017631 case $ac_top_builddir_sub in
17632 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17633 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17634 esac ;;
17635esac
17636ac_abs_top_builddir=$ac_pwd
17637ac_abs_builddir=$ac_pwd$ac_dir_suffix
17638# for backward compatibility:
17639ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017640
17641case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017643 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644 ac_top_srcdir=$ac_top_builddir_sub
17645 ac_abs_top_srcdir=$ac_pwd ;;
17646 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017647 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648 ac_top_srcdir=$srcdir
17649 ac_abs_top_srcdir=$srcdir ;;
17650 *) # Relative name.
17651 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17652 ac_top_srcdir=$ac_top_build_prefix$srcdir
17653 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017654esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017656
Martin v. Löwis11437992002-04-12 09:54:03 +000017657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658 case $ac_mode in
17659 :F)
17660 #
17661 # CONFIG_FILE
17662 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017663
17664 case $INSTALL in
17665 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017667 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017668 ac_MKDIR_P=$MKDIR_P
17669 case $MKDIR_P in
17670 [\\/$]* | ?:[\\/]* ) ;;
17671 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17672 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017673_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674
Matthias Kloseb9621712010-04-24 17:59:49 +000017675cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017676# If the template does not know about datarootdir, expand it.
17677# FIXME: This hack should be removed a few years after 2.60.
17678ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017679ac_sed_dataroot='
17680/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017681 p
17682 q
17683}
17684/@datadir@/p
17685/@docdir@/p
17686/@infodir@/p
17687/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017688/@mandir@/p'
17689case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690*datarootdir*) ac_datarootdir_seen=yes;;
17691*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17693$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017695cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017696 ac_datarootdir_hack='
17697 s&@datadir@&$datadir&g
17698 s&@docdir@&$docdir&g
17699 s&@infodir@&$infodir&g
17700 s&@localedir@&$localedir&g
17701 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017702 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703esac
17704_ACEOF
17705
17706# Neutralize VPATH when `$srcdir' = `.'.
17707# Shell code in configure.ac might set extrasub.
17708# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017709cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17710ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017711$extrasub
17712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017713cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017714:t
17715/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017716s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017718s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719s&@srcdir@&$ac_srcdir&;t t
17720s&@abs_srcdir@&$ac_abs_srcdir&;t t
17721s&@top_srcdir@&$ac_top_srcdir&;t t
17722s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17723s&@builddir@&$ac_builddir&;t t
17724s&@abs_builddir@&$ac_abs_builddir&;t t
17725s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17726s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017727s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017729"
Victor Stinnere0be4232011-10-25 13:06:09 +020017730eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17731 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017734 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17735 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17736 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017738which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017739$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017740which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017741
Victor Stinnere0be4232011-10-25 13:06:09 +020017742 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017743 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017744 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17745 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017746 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017747 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748 ;;
17749 :H)
17750 #
17751 # CONFIG_HEADER
17752 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017753 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017754 {
17755 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017756 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17757 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017758 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017759 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017760 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17761$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017762 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017763 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017764 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017765 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017766 fi
17767 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017768 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017769 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017770 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017771 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774
17775 esac
17776
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017777
17778 case $ac_file$ac_mode in
17779 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17780
17781 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782done # for ac_tag
17783
Guido van Rossum627b2d71993-12-24 10:39:16 +000017784
Matthias Kloseb9621712010-04-24 17:59:49 +000017785as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017786_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017787ac_clean_files=$ac_clean_files_save
17788
Matthias Kloseb9621712010-04-24 17:59:49 +000017789test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017790 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017791
Martin v. Löwis11437992002-04-12 09:54:03 +000017792
17793# configure is writing to config.log, and then calls config.status.
17794# config.status does its own redirection, appending to config.log.
17795# Unfortunately, on DOS this fails, as config.log is still kept open
17796# by configure, so config.status won't be able to write to it; its
17797# output is simply discarded. So we exec the FD to /dev/null,
17798# effectively closing config.log, so it can be properly (re)opened and
17799# appended to by config.status. When coming back to configure, we
17800# need to make the FD available again.
17801if test "$no_create" != yes; then
17802 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017803 ac_config_status_args=
17804 test "$silent" = yes &&
17805 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017806 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017807 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017808 exec 5>>config.log
17809 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17810 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017811 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017812fi
17813if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17815$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017816fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017817
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017818
Christian Heimes75ed8902013-11-20 01:11:18 +010017819echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017820if test ! -f Modules/Setup
17821then
17822 cp $srcdir/Modules/Setup.dist Modules/Setup
17823fi
17824
Christian Heimes75ed8902013-11-20 01:11:18 +010017825echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017826if test ! -f Modules/Setup.local
17827then
17828 echo "# Edit this file for local setup changes" >Modules/Setup.local
17829fi
17830
Christian Heimes75ed8902013-11-20 01:11:18 +010017831echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017832$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17833 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017834 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017835mv config.c Modules